:root {
  --red: #d71920;
  --red-dark: #9f1118;
  --yellow: #ffcf2f;
  --green: #16845b;
  --ink: #202327;
  --muted: #667078;
  --line: #e2e6e8;
  --soft: #f6f8f7;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(32, 35, 39, .13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.notice-bar {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 9px 16px;
  background: var(--red-dark);
  color: #fff;
  font-size: .9rem;
  font-weight: 750;
}

.notice-bar a { color: var(--yellow); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px min(5vw, 52px);
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--red-dark);
  border: 4px solid var(--red);
  font-weight: 900;
}

.brand strong { font-size: 1.14rem; }

.header-search {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.header-search input {
  min-height: 46px;
  border: 0;
  padding: 0 14px;
  outline: 0;
}

.header-search button,
.cart-open,
.btn,
.add-to-cart,
.checkout-submit {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  font-weight: 850;
}

.header-search button {
  padding: 0 18px;
  background: var(--red);
  color: #fff;
  border-radius: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.header-actions a {
  padding: 10px 8px;
  color: var(--muted);
}

.cart-open {
  padding: 0 14px;
  background: var(--yellow);
  color: #3d2300;
}

.cart-open span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin-left: 4px;
  border-radius: 999px;
  background: #fff;
}

.category-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  padding: 11px min(5vw, 52px);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #fff;
}

.category-nav strong {
  color: var(--red);
  text-transform: uppercase;
  font-size: .78rem;
}

.category-nav a {
  color: #3d454b;
  font-weight: 750;
  font-size: .92rem;
}

.hero {
  min-height: clamp(420px, 58vh, 660px);
  display: grid;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-content {
  width: min(760px, calc(100% - 32px));
  margin-left: min(5vw, 52px);
  padding: 34px 0;
}

.kicker {
  margin: 0 0 9px;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: 0;
}

.hero .kicker { color: var(--yellow); }

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: .95;
  letter-spacing: 0;
}

.hero p:not(.kicker) {
  max-width: 580px;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.6vw, 1.24rem);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  padding: 0 18px;
}

.btn.primary,
.add-to-cart,
.checkout-submit {
  background: var(--red);
  color: #fff;
}

.btn.ghost {
  border: 1px solid rgba(255,255,255,.8);
  color: #fff;
  background: rgba(255,255,255,.12);
}

.product-info .btn.ghost {
  color: var(--red);
  border-color: var(--red);
  background: #fff;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.trust-strip article {
  min-height: 98px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px min(4vw, 32px);
  background: #fff;
}

.trust-strip strong { font-size: 1.1rem; }
.trust-strip span { color: var(--muted); }

.section,
.answer-section {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2,
.answer-section h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.4rem);
}

.section-head a {
  color: var(--red);
  font-weight: 850;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  position: relative;
  min-height: 220px;
  display: grid;
  align-content: end;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  color: #fff;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
  transition: transform .25s ease;
}

.category-card:hover img { transform: scale(1.05); }

.category-card span,
.category-card small {
  position: relative;
  z-index: 1;
  padding-inline: 16px;
  text-shadow: 0 1px 16px rgba(0,0,0,.55);
}

.category-card span {
  font-size: 1.28rem;
  font-weight: 900;
  padding-bottom: 4px;
}

.category-card small { padding-bottom: 16px; }

.featured-section {
  width: 100%;
  max-width: none;
  padding-inline: min(5vw, 52px);
  background: var(--soft);
}

.product-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: grid;
  grid-template-rows: 220px 1fr;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.product-image {
  position: relative;
  display: block;
  background: var(--soft);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stock-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: .75rem;
  font-weight: 850;
}

.stock-badge.ok { background: var(--green); }
.stock-badge.out { background: var(--red-dark); }

.product-copy {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.product-title {
  min-height: 44px;
  font-weight: 850;
  line-height: 1.25;
}

.product-meta {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.25;
}

.product-copy strong {
  font-size: 1.13rem;
}

.add-to-cart {
  width: 100%;
}

.add-to-cart:disabled {
  background: #c7cdd1;
  cursor: not-allowed;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) minmax(150px, 210px) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.filters input,
.filters select,
.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
}

.checkout-form textarea {
  padding-block: 10px;
  resize: vertical;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  background: #eaf6f1;
  color: var(--green);
  font-size: .84rem;
  font-weight: 800;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.pagination a {
  padding: 10px 14px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.answer-section {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.faq-grid article {
  padding: 18px;
  border-radius: 8px;
  background: var(--soft);
}

.faq-grid p { color: var(--muted); }

.product-detail {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(320px, 1fr);
  gap: 34px;
}

.product-media {
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
}

.product-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-info {
  align-self: center;
  display: grid;
  gap: 14px;
}

.product-info h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.back-link,
.detail-meta,
.stock-note {
  color: var(--muted);
}

.detail-price {
  color: var(--red);
  font-size: 2rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px min(5vw, 52px);
  background: var(--ink);
  color: #fff;
}

.site-footer p { color: #c9d0d4; }
.footer-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.footer-links a { color: var(--yellow); font-weight: 800; }

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,0,0,.44);
}

.cart-drawer {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  box-shadow: var(--shadow);
}

.cart-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.cart-head button {
  border: 0;
  background: var(--soft);
  border-radius: 7px;
  padding: 9px 12px;
  font-weight: 800;
}

.cart-items {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 10px;
  align-items: center;
}

.cart-item img {
  width: 62px;
  height: 62px;
  border-radius: 7px;
  object-fit: cover;
}

.cart-item strong {
  display: block;
  line-height: 1.2;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.qty-controls button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-block: 1px solid var(--line);
  background: var(--soft);
  font-size: 1.1rem;
}

.checkout-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.checkout-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.form-two {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}

.pay-options {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pay-options legend {
  color: var(--muted);
  font-weight: 850;
}

.pay-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: .92rem;
}

.checkout-message {
  min-height: 20px;
  margin: 0;
  color: var(--red-dark);
  font-weight: 800;
}

.qr-result {
  margin: 0 16px 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.qr-result img {
  width: min(280px, 100%);
  margin: 12px auto;
}

@media (max-width: 1120px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-search { grid-column: 1 / -1; order: 3; }
  .category-grid, .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .answer-section { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .notice-bar { justify-content: flex-start; overflow-x: auto; }
  .site-header { padding: 12px; gap: 10px; }
  .brand { min-width: 0; }
  .brand strong { display: none; }
  .category-grid, .product-grid, .faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 540px) {
  .hero-content { margin-inline: 16px; width: auto; }
  .category-grid, .product-grid { grid-template-columns: 1fr; }
  .product-row { grid-auto-columns: minmax(230px, 78vw); }
  .form-two { grid-template-columns: 1fr; }
}
