/* =========================================================
   STORE THEME — change colours and fonts here
   ========================================================= */
:root {
  --green: #0e4a3a;        /* main brand colour */
  --green-2: #16634e;
  --mint: #e4f0ea;
  --marigold: #f2b33d;     /* price tags & highlights */
  --marigold-soft: #fdf1d8;
  --sale: #cf3a28;         /* sale & flash badges */
  --ink: #17201c;
  --muted: #5b6b64;
  --line: #dde5e0;
  --paper: #f6f8f6;
  --white: #ffffff;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 22px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1240px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-2); }
.btn-gold { background: var(--marigold); color: var(--ink); }
.btn-gold:hover { background: #e6a52a; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- announcement + header ---------- */
.topbar { background: var(--green); color: #d8ebe2; font-size: 14px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar-contact { display: flex; gap: 18px; }

.header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 26px; text-decoration: none; color: var(--green); display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px 10px 10px 2px; background: var(--marigold); display: grid; place-items: center; color: var(--green); font-size: 18px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--mint); }
.nav a.active { color: var(--green); background: var(--mint); }
.cart-link { position: relative; display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--white); }
.cart-count { background: var(--marigold); color: var(--ink); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; font-size: 13px; display: grid; place-items: center; }
.cart-count.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.35); } }
.menu-btn { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; padding: 4px 8px; }

@media (max-width: 860px) {
  .menu-btn { display: block; order: 3; }
  .header .wrap { gap: 12px; }
  .cart-link { margin-left: auto; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 10px 20px 18px; border-bottom: 1px solid var(--line); margin: 0; }
  .nav.open { display: flex; }
  .topbar-contact { display: none; }
}

/* ---------- hero ---------- */
.hero { background: var(--white); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 66px); font-weight: 800; color: var(--green); max-width: 12ch; }
.hero p { font-size: 19px; color: var(--muted); max-width: 44ch; margin: 18px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.aisles { display: grid; gap: 14px; }
.aisle {
  display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 18px;
  padding: 16px 22px 16px 16px; border-radius: var(--r-lg); text-decoration: none;
  border: 2px solid transparent; transition: border-color .15s, transform .15s;
}
.aisle:hover { border-color: var(--ink); transform: translateX(-4px); }
.aisle:nth-child(1) { background: #dcefd7; }
.aisle:nth-child(2) { background: #f7e1da; margin-left: 28px; }
.aisle:nth-child(3) { background: #dce6f5; margin-left: 56px; }
.aisle-icon { width: 84px; height: 84px; border-radius: 18px; background: var(--white); display: grid; place-items: center; font-size: 44px; }
.aisle h3 { font-size: 23px; }
.aisle small { color: var(--muted); font-size: 15px; }
.aisle-go { font-weight: 700; font-size: 15px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 36px; }
  .aisle:nth-child(n) { margin-left: 0; }
}

/* ---------- sections ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3vw, 34px); }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-head a { font-weight: 700; color: var(--green); }

.flash-band { background: var(--ink); color: var(--white); }
.flash-band .section-head p { color: #aebbb5; }
.flash-band .section-head a { color: var(--marigold); }
.flash-title { display: flex; align-items: center; gap: 12px; }
.bolt { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sale); font-size: 22px; }

.page-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 34px 0 26px; }
.page-head h1 { font-size: clamp(32px, 4vw, 46px); color: var(--green); }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.toolbar input[type="search"], .toolbar select {
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white);
}
.toolbar input[type="search"] { flex: 1 1 240px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 700; cursor: pointer; text-decoration: none; }
.tab[aria-selected="true"] { background: var(--green); color: var(--white); border-color: var(--green); }
.result-count { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }

/* ---------- product grid & card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card {
  background: var(--white); border-radius: var(--r-md); border: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden; position: relative; color: var(--ink);
}
.card-media { position: relative; aspect-ratio: 1; background: var(--mint); cursor: pointer; border: 0; padding: 0; width: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.badge { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 4px; background: var(--sale); color: var(--white); }
.badge.flash { background: var(--ink); color: var(--marigold); }
.badge.out { background: #6b7771; }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: 13px; color: var(--muted); text-transform: capitalize; }
.card-title { font-weight: 700; font-size: 16px; line-height: 1.3; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.card-title:hover { color: var(--green); text-decoration: underline; }

/* the price tag — the store's signature element */
.tag {
  align-self: flex-start; position: relative; display: inline-flex; align-items: baseline; gap: 8px;
  background: var(--marigold); color: var(--ink); font-weight: 800; font-size: 17px;
  padding: 4px 12px 4px 22px; margin-top: auto;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
}
.tag::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--white); }
.tag > * { white-space: nowrap; }
.tag { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.tag s { font-weight: 600; font-size: 13px; color: #6d5413; }
.tag.on-sale { background: var(--sale); color: var(--white); }
.tag.on-sale s { color: #ffd9d3; }
.countdown { font-size: 13px; font-weight: 700; color: var(--sale); }
.flash-band .card { border-color: #2f3a35; }
.card-actions { display: flex; gap: 8px; margin-top: 6px; }
.card-actions .btn { flex: 1; padding: 10px 14px; font-size: 15px; }

.empty { text-align: center; padding: 50px 20px; background: var(--white); border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 8px; }
.loading { color: var(--muted); padding: 30px 0; }

/* ---------- product modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 25, 21, .6); }
.modal.open { display: flex; }
.modal-box { background: var(--white); border-radius: var(--r-lg); max-width: 880px; width: 100%; max-height: 92vh; overflow: auto; position: relative; animation: pop .2s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper); font-size: 22px; cursor: pointer; z-index: 2; }
.pd { display: grid; grid-template-columns: 1fr 1fr; }
.pd-media { background: var(--mint); }
.pd-media > img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.thumbs { display: flex; gap: 8px; padding: 10px; flex-wrap: wrap; }
.thumbs button { width: 60px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: var(--white); }
.thumbs button[aria-current="true"] { border-color: var(--green); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; }
.pd-info h2 { font-size: 28px; }
.pd-info .tag { margin-top: 0; font-size: 22px; }
.pd-details { margin: 0; padding-left: 18px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: var(--paper); font-size: 18px; cursor: pointer; }
.qty input { width: 46px; height: 38px; border: 0; text-align: center; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pd-buy { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
@media (max-width: 700px) { .pd { grid-template-columns: 1fr; } .pd-info { padding: 22px; } }

/* ---------- cart ---------- */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.panel h2 { font-size: 22px; margin-bottom: 16px; }
.cart-row { display: grid; grid-template-columns: 76px 1fr auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 76px; height: 76px; border-radius: var(--r-sm); object-fit: cover; background: var(--mint); }
.cart-row .name { font-weight: 700; }
.cart-row .unit { color: var(--muted); font-size: 14px; }
.line-total { font-weight: 800; min-width: 96px; text-align: right; }
.remove { background: none; border: 0; color: var(--sale); font-weight: 600; cursor: pointer; padding: 0; font-size: 14px; }
.summary { position: sticky; top: 92px; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; }
.sum-row.total { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 14px; font-size: 20px; font-weight: 800; }
.hint { font-size: 14px; color: var(--muted); background: var(--marigold-soft); padding: 10px 12px; border-radius: var(--r-sm); margin: 12px 0; }
.mini-item { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; }
.mini-item span:first-child { color: var(--muted); }
@media (max-width: 900px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .cart-row { grid-template-columns: 64px 1fr; }
  .cart-row img { width: 64px; height: 64px; }
  .cart-row .qty, .cart-row .line-total { grid-column: 2; justify-self: start; text-align: left; }
}

/* ---------- checkout form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field label .req { color: var(--sale); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #c9d4ce; border-radius: var(--r-sm); background: var(--white);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); outline: 2px solid var(--mint); }
.field .help { font-size: 13px; color: var(--muted); margin-top: 4px; }
.field .err { font-size: 13px; color: var(--sale); margin-top: 4px; display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--sale); }
.field.invalid .err { display: block; }
.fieldset-title { font-family: var(--font-display); font-size: 19px; margin: 26px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.fieldset-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.pay-note { display: flex; gap: 12px; background: var(--mint); border-radius: var(--r-sm); padding: 14px; font-size: 15px; }
.form-error { background: #fde9e6; color: #8a2518; padding: 12px 14px; border-radius: var(--r-sm); margin-top: 16px; display: none; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* thank-you popup */
.thanks { max-width: 460px; text-align: center; padding: 40px 30px 32px; }
.thanks-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--mint); color: var(--green); display: grid; place-items: center; margin: 0 auto 18px; font-size: 38px; }
.thanks h2 { font-size: 28px; color: var(--green); margin-bottom: 10px; }
.thanks p { color: var(--muted); margin: 0 0 8px; }
.order-no { display: inline-block; margin: 10px 0 22px; padding: 6px 14px; background: var(--marigold-soft); border-radius: var(--r-sm); font-weight: 800; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 999px; z-index: 90; display: flex; gap: 14px; align-items: center; transition: transform .25s; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast a { color: var(--marigold); font-weight: 700; white-space: nowrap; }

/* ---------- footer ---------- */
.footer { background: var(--green); color: #cfe3da; margin-top: 60px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding-top: 44px; padding-bottom: 30px; }
.footer h3 { color: var(--white); font-size: 18px; margin-bottom: 12px; }
.footer a { color: #cfe3da; text-decoration: none; display: block; padding: 3px 0; }
.footer a:hover { color: var(--white); }
.footer p { margin: 0 0 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 16px 0; font-size: 14px; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.disabled { opacity: .55; }
.mini-item b { white-space: nowrap; }
.field label.check { display: flex; align-items: center; gap: 8px; font-size: 15px; }

/* ---------- phones: two products per row, compact header ---------- */
@media (max-width: 560px) {
  .header .wrap { height: 62px; }
  .nav { top: 62px; }
  .logo { font-size: 20px; gap: 8px; min-width: 0; }
  .logo > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
  .logo-mark { width: 30px; height: 30px; font-size: 16px; flex: none; }
  .cart-link { padding: 7px 12px; }
  .topbar { font-size: 13px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px 10px 12px; gap: 6px; }
  .card-title { font-size: 14px; }
  .card-cat { font-size: 12px; }
  .tag { font-size: 14px; padding: 3px 8px 3px 18px; clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%); }
  .tag::before { left: 6px; width: 5px; height: 5px; }
  .tag s { font-size: 11px; }
  .badge { font-size: 11px; padding: 3px 6px; }
  .badges { top: 6px; left: 6px; gap: 4px; }
  .countdown { font-size: 12px; }
  .card-actions .btn { padding: 9px 8px; font-size: 14px; }
  .section { padding: 36px 0; }
  .aisle { grid-template-columns: 60px 1fr auto; padding: 10px 16px 10px 10px; gap: 12px; }
  .aisle-icon { width: 60px; height: 60px; font-size: 32px; border-radius: 14px; }
  .aisle h3 { font-size: 19px; }
  .toolbar select { flex: 1 1 auto; }
  .panel { padding: 16px; }
}
