:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-strong: #111827;
  --surface-soft: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --brand: #ef4444;
  --brand-dark: #b91c1c;
  --hero-start: #111827;
  --hero-middle: #7f1d1d;
  --hero-end: #ef4444;
  --success: #14532d;
  --radius: 24px;
  --radius-lg: 32px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--hero-end) 18%, white), transparent 32%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 100%);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 80px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--hero-start) 0%, var(--hero-middle) 45%, var(--hero-end) 100%);
  color: #fff;
  padding: clamp(24px, 4vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 26px;
  align-items: center;
  box-shadow: var(--shadow);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.hero::before {
  width: 280px;
  height: 280px;
  right: -80px;
  top: -120px;
  background: rgba(255,255,255,.10);
}
.hero::after {
  width: 220px;
  height: 220px;
  left: -90px;
  bottom: -120px;
  background: rgba(255,255,255,.06);
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 10px;
  color: color-mix(in srgb, var(--hero-end) 42%, white);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .75rem;
}
.hero__content { display: grid; gap: 12px; }
.hero__brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.store-logo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  padding: 8px;
  box-shadow: 0 18px 42px rgba(0,0,0,.18);
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: .95;
  margin: 0;
  max-width: 760px;
}
.hero__subtitle {
  margin: 10px 0 0;
  font-size: 1.06rem;
  line-height: 1.55;
  color: rgba(255,255,255,.88);
  max-width: 660px;
}
.hero__meta,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.meta-pill,
.chip {
  border-radius: 999px;
  padding: 10px 14px;
}
.meta-pill {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff;
  backdrop-filter: blur(8px);
}
.hero__panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.hero__panel-summary { display: grid; gap: 4px; }
.hero__panel strong {
  font-size: 1.55rem;
  line-height: 1.1;
}
.hero__panel span {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1;
}
.hero__panel small {
  color: rgba(255,255,255,.78);
  font-size: .92rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}
.catalog,
.order { min-width: 0; }

.toolbar,
.order,
.state-card,
.product-card,
.promotion-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.toolbar {
  padding: 20px;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}
.search span {
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
}
.search input,
.checkout input,
.checkout select,
.checkout textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.search input::placeholder,
.checkout input::placeholder,
.checkout textarea::placeholder { color: #9ca3af; }
.search input:focus,
.checkout input:focus,
.checkout select:focus,
.checkout textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}
.chips {
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: all .2s ease;
}
.chip:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.chip.is-active {
  background: var(--surface-strong);
  color: #fff;
  border-color: var(--surface-strong);
}
.promotions {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.promotion-card {
  padding: 16px 18px;
  background: #fff7ed;
  border-color: #fed7aa;
}
.promotion-card strong { display: block; margin-bottom: 4px; }
.state-card {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.state-card--error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
  text-align: left;
}
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, .12);
}
.product-card__image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f3f4f6, #fee2e2);
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 800;
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-card__body {
  padding: 16px;
  display: grid;
  gap: 10px;
  flex: 1;
}
.product-card__category {
  color: var(--brand-dark);
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.product-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}
.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.price {
  font-size: 1.32rem;
  font-weight: 900;
}
.button {
  border: 0;
  border-radius: 16px;
  background: var(--brand);
  color: white;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .2s, background .2s, box-shadow .2s;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 25%, transparent);
}
.button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}
.button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.button--light {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: none;
}
.button--light:hover { background: #f8fafc; }
.button--wide { width: 100%; }
.link-button {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 900;
  cursor: pointer;
}
.order {
  position: sticky;
  top: 16px;
  padding: 20px;
  scroll-margin-top: 16px;
}
.order__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.order h2,
.checkout h3 { margin: 0; }
.cart-items {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.cart-empty {
  color: var(--muted);
  background: #f9fafb;
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: var(--surface-soft);
}
.cart-line strong { display: block; }
.cart-line small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.qty button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: white;
  cursor: pointer;
  font-weight: 900;
}
.totals {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin: 14px 0;
}
.totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.totals__grand {
  font-size: 1.2rem;
  font-weight: 900;
}
.checkout {
  display: grid;
  gap: 12px;
}
.checkout label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}
.checkout textarea { resize: vertical; }
.success,
.payment-hint {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: var(--success);
}
.payment-hint {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}
.modifiers {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: #f9fafb;
}
.modifiers > span {
  color: var(--brand-dark);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.modifiers label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: .92rem;
}
.modifiers b {
  margin-left: auto;
  color: var(--brand-dark);
}
.item-note {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}
.item-note input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}
.mobile-cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--hero-start) 88%, black);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
}
.mobile-cart-bar__meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.mobile-cart-bar__meta strong,
.mobile-cart-bar__meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-cart-bar__button {
  flex-shrink: 0;
  padding: 10px 14px;
}
body.has-mobile-bar { padding-bottom: 90px; }

@media (max-width: 1120px) {
  .layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); }
}

@media (max-width: 980px) {
  .shell { width: min(100% - 24px, 1280px); }
  .hero,
  .layout { grid-template-columns: 1fr; }
  .hero__panel { max-width: 360px; }
  .order {
    position: static;
    margin-top: 2px;
  }
}

@media (max-width: 720px) {
  .shell { padding-top: 12px; }
  .hero {
    min-height: auto;
    padding: 24px;
    border-radius: 26px;
    gap: 20px;
  }
  .hero__brand {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
  }
  .store-logo {
    width: 84px;
    height: 84px;
    border-radius: 22px;
  }
  .hero h1 { font-size: clamp(2rem, 9vw, 3.2rem); }
  .hero__subtitle { font-size: 1rem; }
  .hero__panel {
    max-width: none;
    grid-template-columns: 1fr;
  }
  .products { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

@media (max-width: 560px) {
  .shell { width: calc(100% - 18px); }
  .toolbar,
  .order,
  .product-card,
  .promotion-card,
  .state-card {
    border-radius: 22px;
  }
  .toolbar,
  .order { padding: 16px; }
  .hero { border-radius: 24px; padding: 22px; }
  .meta-pill,
  .chip { padding: 9px 13px; }
  .products { grid-template-columns: 1fr; gap: 14px; }
  .product-card__footer {
    align-items: stretch;
    flex-direction: column;
  }
  .product-card__footer .button { width: 100%; }
  .cart-line { grid-template-columns: 1fr; }
  .mobile-cart-bar { display: flex; }
}

.verify-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
}
.verify-modal__card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}
.verify-modal__card h3 { margin: 0 0 8px; font-size: 20px; }
.verify-modal__card p { color: var(--muted); font-weight: 600; margin: 0 0 14px; }
.verify-modal__code {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
}
.verify-modal__status {
  margin-top: 14px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
}
.verify-modal__cancel {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
