:root {
  --green: #39a926;
  --green-dark: #123d16;
  --green-deep: #0d2d12;
  --green-soft: #eaf7e6;
  --ink: #151a16;
  --muted: #667168;
  --paper: #f5f7f3;
  --white: #fff;
  --line: #dfe6dd;
  --danger: #ae2424;
  --shadow: 0 16px 48px rgba(18, 61, 22, .14);
  --radius: 22px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; padding: 10px clamp(18px, 4vw, 64px); background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(18,61,22,.08); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 24px; font-weight: 850; letter-spacing: -.7px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
nav { display: flex; gap: 6px; }
nav a, nav button { color: var(--muted); text-decoration: none; padding: 9px 12px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 700; }
nav a.active { color: var(--green-deep); background: var(--green-soft); }

.hero { position: relative; min-height: 430px; padding: 76px clamp(24px, 7vw, 110px); overflow: hidden; color: white; background: var(--green); scroll-margin-top: 72px; }
.hero > *:not(.hero-orb) { position: relative; z-index: 2; }
.hero .age { position: absolute; top: 28px; right: clamp(24px, 7vw, 110px); padding: 8px 16px; border-radius: 999px; background: var(--green-deep); font-weight: 850; }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.dark { color: var(--green-dark); }
.hero h1 { margin: 0; max-width: 820px; font-size: clamp(54px, 10vw, 112px); line-height: .87; letter-spacing: -.065em; text-transform: uppercase; }
.hero h1 strong { color: var(--green-deep); }
.hero > p:last-of-type { max-width: 480px; margin: 28px 0 0; color: rgba(255,255,255,.9); font-size: clamp(16px, 2vw, 20px); font-weight: 650; }
.hero-orb { position: absolute; z-index: 1; border-radius: 50%; background: rgba(255,255,255,.1); }
.orb-one { width: 420px; height: 420px; left: -170px; top: -180px; }
.orb-two { width: 640px; height: 640px; right: -230px; bottom: -470px; background: rgba(7,72,22,.18); }

.store-hero { position: relative; min-height: 360px; overflow: hidden; color: white; background: linear-gradient(135deg, var(--green-dark), var(--green)); scroll-margin-top: 72px; }
.store-hero-picture, .store-hero-picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.store-hero-picture img { object-fit: cover; }
.store-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,27,10,.88), rgba(6,27,10,.48) 58%, rgba(6,27,10,.18)); }
.store-hero-content { position: relative; z-index: 2; display: flex; min-height: 360px; padding: 34px clamp(24px, 7vw, 110px) 48px; flex-direction: column; justify-content: space-between; }
.store-back { align-self: flex-start; padding: 10px 14px; color: white; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; cursor: pointer; font-weight: 800; backdrop-filter: blur(8px); }
.store-identity { display: flex; align-items: flex-end; gap: 20px; }
.store-identity h1 { max-width: 900px; margin: 7px 0 0; font-size: clamp(40px, 7vw, 82px); line-height: .94; letter-spacing: -.055em; }
.store-identity p { margin: 12px 0 0; color: rgba(255,255,255,.9); font-weight: 700; }
.store-logo, .store-logo-fallback { flex: 0 0 auto; width: 54px; height: 54px; border: 3px solid white; border-radius: 16px; background: white; box-shadow: 0 12px 36px rgba(0,0,0,.22); }
.store-mark { flex: 0 0 auto; }
.store-logo { object-fit: cover; }
.store-logo-fallback { display: grid; place-items: center; color: white; background: var(--green-dark); font-size: 22px; font-weight: 900; }
.store-logo-large { width: clamp(78px, 10vw, 118px); height: clamp(78px, 10vw, 118px); border-width: 4px; border-radius: 24px; font-size: 38px; }
.store-hero .preview-badge { display: inline-flex; padding: 5px 10px; color: #5f4200; background: #fff0b8; border-radius: 999px; font-size: 12px; font-weight: 850; }

.catalogue-shell { max-width: 1320px; margin: 0 auto; padding: 54px clamp(18px, 4vw, 54px) 120px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
h2 { margin: 0; font-size: clamp(30px, 5vw, 50px); letter-spacing: -.045em; }
.result-count { color: var(--muted); font-weight: 650; }
.catalogue-status { display: flex; align-items: center; gap: 8px; }
.location-gate { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0 38px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(18,61,22,.04); }
.location-gate h3 { margin: 0 0 6px; font-size: 20px; }
.location-gate p { max-width: 660px; margin: 0; color: var(--muted); line-height: 1.5; }
.location-gate.error { border-color: rgba(174,36,36,.35); }
.location-button { flex: 0 0 auto; width: auto; min-width: 190px; }
.filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(170px, 250px); gap: 12px; margin: 28px 0 38px; }
.filters input, .filters select { width: 100%; min-height: 52px; padding: 0 16px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 15px; outline: none; }
.filters input:focus, .filters select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,169,38,.14); }

.store-list { display: grid; gap: 48px; }
.store-section { min-width: 0; }
.store-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.store-head.selected { justify-content: flex-end; }
.store-head h3 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.store-head span { color: var(--muted); font-size: 13px; }
.store-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.store-title-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.store-title .store-logo-fallback { color: white; font-size: 22px; }
.store-actions { display: flex; align-items: center; gap: 12px; }
.view-store { padding: 9px 13px; color: var(--green-dark); background: var(--green-soft); border: 0; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 850; }
.store-head .preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #704d00;
  background: #fff0b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-grid.store-preview-row {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  padding-bottom: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scrollbar-width: none;
}
.store-preview-row::-webkit-scrollbar { display: none; }
.store-preview-row .product-card { scroll-snap-align: start; }
.product-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(18,61,22,.04); }
.product-image { aspect-ratio: 1; width: 100%; object-fit: cover; background: #e8eee6; }
.product-copy { display: flex; flex: 1; flex-direction: column; padding: 15px; }
.product-meta { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.product-card h4 { margin: 0 0 14px; font-size: 17px; line-height: 1.25; letter-spacing: -.02em; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.price { font-size: 17px; font-weight: 850; }
.add-button, .primary, .secondary { border: 0; border-radius: 13px; cursor: pointer; font-weight: 800; }
.add-button { min-width: 74px; padding: 10px 13px; color: white; background: var(--green-dark); }
.add-button:disabled { cursor: default; color: var(--muted); background: #e7ece6; }
.primary { display: block; width: 100%; padding: 15px 18px; color: white; background: var(--green-dark); font-size: 16px; text-align: center; text-decoration: none; }
.secondary { width: 100%; padding: 14px 18px; color: var(--green-dark); background: white; border: 1px solid var(--line); }
.text-button { border: 0; padding: 7px; color: var(--green-dark); background: transparent; cursor: pointer; font-weight: 750; }
.notice { margin: 0 0 28px; padding: 16px 18px; border-radius: 14px; color: var(--green-deep); background: var(--green-soft); }
.notice.error { color: var(--danger); background: #fae8e8; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); background: white; border: 1px dashed var(--line); border-radius: var(--radius); }

.cart-bar { position: fixed; z-index: 30; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; width: min(660px, calc(100% - 28px)); padding: 17px 20px; color: white; background: var(--green-deep); border: 0; border-radius: 18px; box-shadow: var(--shadow); cursor: pointer; }
.cart-bar span:first-child { text-align: left; }
.cart-bar strong:last-child { text-align: right; }

.checkout-dialog { width: min(620px, 100%); max-height: min(88vh, 850px); margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 26px; box-shadow: 0 26px 90px rgba(0,0,0,.32); }
.checkout-dialog::backdrop { background: rgba(8,25,11,.62); backdrop-filter: blur(4px); }
.checkout-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.checkout-head h2 { font-size: 30px; }
.icon-button { width: 42px; height: 42px; color: var(--ink); background: var(--paper); border: 0; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.checkout-body { min-height: 260px; max-height: calc(88vh - 90px); padding: 22px 24px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; }
.basket-lines { display: grid; gap: 12px; margin-bottom: 22px; }
.basket-line { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 12px; }
.basket-line img { width: 58px; height: 58px; object-fit: cover; border-radius: 13px; }
.basket-line h3 { margin: 0; font-size: 15px; }
.basket-line p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.quantity-control { display: flex; align-items: center; gap: 8px; }
.quantity-control button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; }
.total-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.total-row.grand { font-size: 19px; font-weight: 850; }
.checkout-actions { display: grid; gap: 10px; margin-top: 20px; }
.step-copy { color: var(--muted); margin: 5px 0 22px; }
.field { display: grid; gap: 7px; margin: 14px 0; font-size: 13px; font-weight: 750; }
.field input, .field textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; outline: none; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,169,38,.14); }
.pin-note { margin: 16px 0; color: var(--green-dark); font-size: 13px; font-weight: 750; }
.option-list { display: grid; gap: 10px; }
.delivery-option { width: 100%; padding: 16px; text-align: left; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; }
.delivery-option strong, .delivery-option span { display: block; }
.delivery-option span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.progress { display: grid; place-items: center; min-height: 220px; text-align: center; }
.spinner { width: 42px; height: 42px; margin-bottom: 15px; border: 4px solid var(--green-soft); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.error-box { padding: 14px 16px; color: var(--danger); background: #fae8e8; border-radius: 13px; }
.success-mark { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; color: white; background: var(--green); border-radius: 50%; font-size: 27px; }
.order-list { display: grid; gap: 12px; }
.order-card { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.order-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.order-card h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.order-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.status-pill { flex: none; padding: 6px 9px; color: var(--green-deep); background: var(--green-soft); border-radius: 999px; font-size: 11px; font-weight: 850; }
.status-pill.terminal { color: var(--muted); background: var(--paper); }
.order-card-total { display: flex; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 800; }
.order-tracking-form { margin-top: 14px; }
.order-tracking-form .primary { padding: 12px 14px; font-size: 14px; }
.order-tracking-note { margin: 14px 2px 0; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 92px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 16px; color: white; background: var(--green-deep); border-radius: 999px; box-shadow: var(--shadow); font-size: 14px; font-weight: 700; }
.noscript { padding: 30px; text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 960px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .topbar { min-height: 64px; }
  .brand { font-size: 21px; }
  .brand img { width: 30px; height: 30px; }
  nav a, nav button { padding: 8px 7px; font-size: 12px; }
  .hero { min-height: 385px; padding-top: 70px; }
  .hero, .store-hero { scroll-margin-top: 64px; }
  .hero h1 { font-size: clamp(48px, 16vw, 78px); }
  .store-hero, .store-hero-content { min-height: 330px; }
  .store-hero-content { padding: 22px 18px 30px; }
  .store-hero-shade { background: linear-gradient(0deg, rgba(6,27,10,.9), rgba(6,27,10,.22) 80%); }
  .store-identity { align-items: flex-start; gap: 14px; }
  .store-identity h1 { font-size: clamp(36px, 12vw, 56px); }
  .catalogue-shell { padding-top: 36px; }
  .store-list { gap: 38px; }
  .store-head:not(.selected) { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
  .store-title { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; width: 100%; gap: 10px; }
  .store-title .store-logo, .store-title .store-logo-fallback { width: 46px; height: 46px; border-radius: 14px; }
  .store-title-copy { display: grid; min-width: 0; gap: 5px; }
  .store-title-copy h3 { overflow-wrap: anywhere; font-size: 22px; }
  .store-head .preview-badge { width: max-content; max-width: 100%; }
  .store-head:not(.selected) .store-actions { justify-content: space-between; width: 100%; }
  .view-store { min-height: 40px; padding: 10px 16px; }
  .filters { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; }
  .catalogue-status { align-items: flex-end; flex-direction: column; }
  .location-gate { align-items: stretch; flex-direction: column; }
  .location-button { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .product-grid.store-preview-row {
    grid-auto-columns: calc(100vw - 72px);
    gap: 12px;
    padding-bottom: 12px;
    scroll-snap-type: inline mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .store-preview-row .product-bottom { align-items: center; flex-direction: row; }
  .store-preview-row .add-button { width: auto; }
  .product-copy { padding: 12px; }
  .product-card h4 { font-size: 15px; }
  .product-bottom { align-items: flex-end; flex-direction: column; }
  .add-button { width: 100%; }
  .checkout-dialog { width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .checkout-body { max-height: calc(92vh - 86px); }
  .cart-bar { grid-template-columns: auto 1fr auto; gap: 10px; }
  .cart-bar span:nth-child(2) { text-align: center; }
}

@media (max-width: 390px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-bottom { flex-direction: row; align-items: center; }
  .add-button { width: auto; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation-duration: .01ms !important; } }
