/* ==========================================================================
   Grociva design system
   ========================================================================== */

:root {
  --brand: #16a34a;
  --brand-600: #15803d;
  --brand-700: #166534;
  --brand-soft: #dcfce7;
  --brand-tint: #f0fdf4;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --info: #0ea5e9;

  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-2: #fafbf9;
  --line: #e6ebe6;
  --line-strong: #d3dbd3;
  --text: #0f1b14;
  --muted: #64756a;
  --faint: #93a19a;

  --shadow-sm: 0 1px 2px rgba(15, 27, 20, .06), 0 1px 3px rgba(15, 27, 20, .04);
  --shadow: 0 4px 12px rgba(15, 27, 20, .07), 0 1px 3px rgba(15, 27, 20, .04);
  --shadow-lg: 0 18px 44px rgba(15, 27, 20, .14);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  --header-h: 132px;
  --maxw: 1240px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --brand: #22c55e;
  --brand-600: #16a34a;
  --brand-700: #4ade80;
  --brand-soft: #10331f;
  --brand-tint: #0e2418;
  --accent-soft: #3b2c08;
  --danger-soft: #3a1717;

  --bg: #0a1210;
  --surface: #121b17;
  --surface-2: #17221d;
  --line: #23312a;
  --line-strong: #30423a;
  --text: #e8f1ea;
  --muted: #9aae a2;
  --muted: #9aaea2;
  --faint: #6d8078;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 4px 14px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

img { max-width: 100%; display: block; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.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;
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--bg); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px;
  background: var(--brand); color: #fff; transition: transform .12s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn--block { width: 100%; }
.btn--lg { padding: 14px 22px; font-size: 15px; border-radius: var(--r); }
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn--soft { background: var(--brand-soft); color: var(--brand-600); }
.btn--soft:hover { background: var(--brand-soft); filter: brightness(.96); }
.btn:disabled { opacity: .5; pointer-events: none; }

.iconbtn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r-sm);
  color: var(--muted); transition: background .15s var(--ease), color .15s var(--ease);
}
.iconbtn:hover { background: var(--brand-tint); color: var(--brand-600); }
.iconbtn svg { width: 21px; height: 21px; }

/* ----------------------------------------------------------------- header */

.topbar {
  background: linear-gradient(90deg, var(--brand-700), var(--brand));
  color: #fff; font-size: 12.5px; font-weight: 500; overflow: hidden;
}
.topbar__inner { display: flex; align-items: center; justify-content: center; gap: 26px; height: 34px; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar svg { width: 14px; height: 14px; }

.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 16px; height: 70px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { width: 36px; height: 36px; }
.logo b { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.logo b i { color: var(--brand); font-style: normal; }

.locpill {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; flex-shrink: 0;
}
.locpill svg { width: 16px; height: 16px; color: var(--brand); flex-shrink: 0; }
.locpill small { display: block; color: var(--muted); font-size: 11px; line-height: 1.1; }
.locpill strong { font-size: 13px; font-weight: 600; }

.searchwrap { flex: 1; position: relative; min-width: 0; }
.searchbox { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px;
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s var(--ease), background .15s var(--ease); }
.searchbox:focus-within { border-color: var(--brand); background: var(--surface); }
.searchbox svg { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; }
.searchbox input { flex: 1; border: none; background: none; outline: none; min-width: 0; }
.searchbox input::placeholder { color: var(--faint); }
.searchbox kbd {
  font-family: inherit; font-size: 11px; color: var(--faint); border: 1px solid var(--line-strong);
  border-radius: 5px; padding: 2px 6px;
}

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); overflow: hidden; max-height: 380px; overflow-y: auto;
}
.suggest__item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.suggest__item:hover, .suggest__item[aria-selected="true"] { background: var(--brand-tint); }
.suggest__item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.suggest__item small { color: var(--muted); font-size: 12px; }
.suggest__empty { padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }

.cartbtn { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 44px;
  border-radius: var(--r-sm); background: var(--brand); color: #fff; font-weight: 600; font-size: 14px; }
.cartbtn:hover { background: var(--brand-600); }
.cartbtn svg { width: 19px; height: 19px; }
.cartbtn__meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.cartbtn__meta small { font-size: 11px; opacity: .85; }

/* ------------------------------------------------------------ category rail */

.catrail { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 70px; z-index: 55; }
.catrail__inner { display: flex; gap: 8px; overflow-x: auto; padding: 12px 20px; scrollbar-width: none; }
.catrail__inner::-webkit-scrollbar { display: none; }
.chip {
  padding: 8px 15px; border-radius: var(--r-full); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand-600); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ------------------------------------------------------------------- hero */

.hero { margin: 24px 0 8px; }
.slides { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); }
.slide {
  display: none; align-items: center; gap: 24px; padding: 40px 48px; min-height: 300px;
}
.slide.is-active { display: flex; animation: fade .45s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.slide__text { flex: 1; min-width: 0; color: #fff; }
.slide__eyebrow {
  display: inline-block; padding: 5px 12px; border-radius: var(--r-full); font-size: 12px; font-weight: 700;
  background: rgba(255, 255, 255, .22); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px;
}
.slide h2 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; margin-bottom: 10px; }
.slide p { margin: 0 0 22px; font-size: 16px; opacity: .92; max-width: 46ch; }
.slide .btn { background: #fff; color: var(--brand-700); }
.slide .btn:hover { background: #fff; filter: brightness(.95); }
.slide__art { width: min(42%, 330px); flex-shrink: 0; }
.slide--a { background: linear-gradient(120deg, #15803d, #22c55e 60%, #4ade80); }
.slide--b { background: linear-gradient(120deg, #b45309, #f59e0b 60%, #fbbf24); }
.slide--c { background: linear-gradient(120deg, #9d174d, #db2777 60%, #f472b6); }

.dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.dots button { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .5); transition: width .2s var(--ease); }
.dots button.is-active { width: 26px; background: #fff; }

/* --------------------------------------------------------------- sections */

.section { margin: 40px 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section__head h2 { font-size: 22px; font-weight: 700; }
.section__head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.section__link { color: var(--brand-600); font-weight: 600; font-size: 14px; }

.usps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0; }
.usp { display: flex; align-items: center; gap: 13px; padding: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); }
.usp__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-600); flex-shrink: 0; }
.usp__ico svg { width: 21px; height: 21px; }
.usp strong { display: block; font-size: 14px; }
.usp small { color: var(--muted); font-size: 12.5px; }

.cattiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 14px; }
.cattile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 10px; text-align: center; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.cattile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand); }
.cattile img { width: 74px; height: 74px; border-radius: var(--r-full); object-fit: cover; margin: 0 auto 10px;
  border: 3px solid var(--brand-tint); }
.cattile strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.cattile small { color: var(--faint); font-size: 11.5px; }

/* ----------------------------------------------------------------- layout */

.shell { display: grid; grid-template-columns: 236px 1fr; gap: 26px; align-items: start; margin: 32px 0 60px; }

.filters { position: sticky; top: calc(70px + 58px + 16px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.filters h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.fgroup + .fgroup { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.fgroup h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--faint); margin-bottom: 10px; }
.flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.flist button { width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px;
  border-radius: 9px; font-size: 13.5px; color: var(--muted); text-align: left; }
.flist button:hover { background: var(--surface-2); color: var(--text); }
.flist button.is-active { background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }
.flist span { color: var(--faint); font-size: 12px; }

.range { width: 100%; accent-color: var(--brand); }
.range-val { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { width: 40px; height: 23px; border-radius: 99px; background: var(--line-strong); position: relative;
  transition: background .18s var(--ease); flex-shrink: 0; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px;
  border-radius: 99px; background: #fff; transition: transform .18s var(--ease); box-shadow: var(--shadow-sm); }
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(17px); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h1 { font-size: 21px; font-weight: 700; }
.toolbar p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.select { padding: 9px 13px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); font-size: 13.5px; font-weight: 500; }

/* ------------------------------------------------------------ product grid */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 18px; }

.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--brand-soft); }

.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); cursor: pointer; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }

.tag { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; background: var(--danger); color: #fff; letter-spacing: .01em; }
.veg { position: absolute; top: 10px; right: 10px; width: 19px; height: 19px; border-radius: 4px;
  background: #fff; border: 1.8px solid var(--brand); display: grid; place-items: center; }
.veg::after { content: ""; width: 9px; height: 9px; border-radius: 99px; background: var(--brand); }
.veg--nonveg { border-color: #b91c1c; }
.veg--nonveg::after { background: #b91c1c; }

.card__body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__name { font-size: 14.5px; font-weight: 600; line-height: 1.3; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__unit { color: var(--muted); font-size: 12.5px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  color: var(--brand-600); background: var(--brand-soft); padding: 2px 7px; border-radius: var(--r-full); width: fit-content; }
.rating svg { width: 11px; height: 11px; }
.rating small { color: var(--muted); font-weight: 500; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { font-size: 16px; font-weight: 700; }
.mrp { color: var(--faint); text-decoration: line-through; font-size: 12.5px; margin-left: 5px; font-weight: 500; }

.add { padding: 8px 16px; border-radius: var(--r-sm); font-weight: 700; font-size: 13px;
  background: var(--brand-soft); color: var(--brand-600); border: 1px solid transparent; transition: all .15s var(--ease); }
.add:hover { background: var(--brand); color: #fff; }

.stepper { display: inline-flex; align-items: center; background: var(--brand); border-radius: var(--r-sm); overflow: hidden; }
.stepper button { width: 30px; height: 34px; color: #fff; font-size: 17px; font-weight: 700; display: grid; place-items: center; }
.stepper button:hover { background: var(--brand-600); }
.stepper span { min-width: 26px; text-align: center; color: #fff; font-weight: 700; font-size: 13.5px; }

.skeleton { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.skeleton__media { aspect-ratio: 4 / 3; }
.skeleton__line { height: 11px; border-radius: 6px; margin: 12px 14px; }
.skeleton__media, .skeleton__line {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; }
.empty img { width: 190px; margin: 0 auto 16px; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 0 18px; }

/* ------------------------------------------------------------------ drawer */

.overlay { position: fixed; inset: 0; background: rgba(8, 20, 14, .5); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); z-index: 90; }
.overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 100;
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer__head h2 { font-size: 17px; font-weight: 700; }
.drawer__head small { color: var(--muted); font-size: 12.5px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer__foot { padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface); }

.freebar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; margin-bottom: 14px; font-size: 13px; }
.freebar strong { color: var(--brand-600); }
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #4ade80);
  border-radius: 99px; transition: width .35s var(--ease); }

.cartline { display: flex; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); margin-bottom: 10px; }
.cartline img { width: 62px; height: 62px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }
.cartline__info { flex: 1; min-width: 0; }
.cartline__info strong { display: block; font-size: 13.5px; font-weight: 600; }
.cartline__info small { color: var(--muted); font-size: 12px; }
.cartline__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.cartline .stepper { transform: scale(.9); transform-origin: left; }

.coupon { display: flex; gap: 8px; margin: 4px 0 14px; }
.coupon input { flex: 1; padding: 11px 13px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); text-transform: uppercase; font-size: 13.5px; letter-spacing: .04em; outline: none; }
.coupon input:focus { border-color: var(--brand); }
.couponlist { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.couponlist button { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: var(--r-full);
  background: var(--accent-soft); color: #92400e; letter-spacing: .03em; }
[data-theme="dark"] .couponlist button { color: var(--accent); }

.bill { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.bill__row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; color: var(--muted); }
.bill__row b { color: var(--text); font-weight: 600; }
.bill__row--save { color: var(--brand-600); }
.bill__row--save b { color: var(--brand-600); }
.bill__total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800;
  padding-top: 11px; margin-top: 8px; border-top: 1px dashed var(--line-strong); }
.savings-note { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--brand-600);
  background: var(--brand-soft); border-radius: var(--r-sm); padding: 8px; margin-top: 10px; }

/* ------------------------------------------------------------------ modal */

.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__card { background: var(--surface); border-radius: var(--r-xl); width: min(860px, 100%);
  max-height: min(86vh, 720px); overflow-y: auto; box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.98); transition: transform .25s var(--ease); }
.modal.is-open .modal__card { transform: none; }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--surface); box-shadow: var(--shadow-sm); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.quick__media { background: var(--surface-2); }
.quick__media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.quick__body { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.quick__body h2 { font-size: 25px; font-weight: 700; }
.quick__desc { color: var(--muted); font-size: 14px; margin: 0; }
.quick__price { display: flex; align-items: baseline; gap: 9px; }
.quick__price b { font-size: 27px; font-weight: 800; }
.quick__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.quick__meta div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.quick__meta small { display: block; color: var(--faint); font-size: 11.5px; }
.quick__meta strong { font-size: 13.5px; }

/* --------------------------------------------------------------- checkout */

.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.step i { width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; font-style: normal;
  font-size: 12px; background: var(--line); color: var(--muted); flex-shrink: 0; }
.step.is-active { color: var(--text); }
.step.is-active i { background: var(--brand); color: #fff; }
.step.is-done i { background: var(--brand-soft); color: var(--brand-600); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); outline: none; transition: border-color .15s var(--ease); font-size: 14px;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 76px; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); background: var(--danger-soft); }
.field__err { display: none; color: var(--danger); font-size: 12px; margin-top: 5px; font-weight: 500; }
.field.has-error .field__err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.paylist { display: flex; flex-direction: column; gap: 9px; }
.pay { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: var(--r); background: var(--surface); cursor: pointer; transition: all .15s var(--ease); }
.pay:hover { border-color: var(--brand-soft); }
.pay input { position: absolute; opacity: 0; }
.pay__dot { width: 19px; height: 19px; border-radius: 99px; border: 2px solid var(--line-strong); flex-shrink: 0;
  display: grid; place-items: center; }
.pay input:checked ~ .pay__dot { border-color: var(--brand); }
.pay input:checked ~ .pay__dot::after { content: ""; width: 9px; height: 9px; border-radius: 99px; background: var(--brand); }
.pay:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.pay__ico { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-2); display: grid;
  place-items: center; color: var(--brand-600); flex-shrink: 0; }
.pay__ico svg { width: 18px; height: 18px; }
.pay strong { display: block; font-size: 13.5px; }
.pay small { color: var(--muted); font-size: 12px; }

.review-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; margin-bottom: 12px; font-size: 13.5px; }
.review-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 7px; }
.review-block p { margin: 0; color: var(--muted); line-height: 1.5; }

.success { text-align: center; padding: 26px 20px; }
.success img { width: 170px; margin: 0 auto 14px; }
.success h2 { font-size: 22px; margin-bottom: 8px; }
.success p { color: var(--muted); margin: 0 0 18px; }
.success__id { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; background: var(--brand-soft); color: var(--brand-600); padding: 8px 16px;
  border-radius: var(--r-sm); letter-spacing: .06em; margin-bottom: 18px; }
.success__eta { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px;
  color: var(--muted); margin-bottom: 22px; }

/* ------------------------------------------------------------------ misc */

.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: var(--r-full);
  background: #0f1b14; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg);
  animation: pop .3s var(--ease); }
.toast svg { width: 16px; height: 16px; color: #4ade80; }
.toast--err svg { color: #fca5a5; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }

.bottomnav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
.bottomnav__inner { display: flex; }
.bottomnav a, .bottomnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 0; position: relative; }
.bottomnav svg { width: 21px; height: 21px; }
.bottomnav .is-active { color: var(--brand-600); }

.pill-count { position: absolute; top: -2px; right: 50%; margin-right: -20px; min-width: 17px; height: 17px;
  padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px;
  font-weight: 700; display: grid; place-items: center; }
.cartbtn .pill-count { position: static; margin: 0; background: rgba(255, 255, 255, .25); }

.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 26px; margin-top: 60px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a, .footer li { color: var(--muted); font-size: 13.5px; }
.footer a:hover { color: var(--brand-600); }
.footer__about p { color: var(--muted); font-size: 13.5px; margin: 12px 0 16px; max-width: 34ch; }
.paybadges { display: flex; gap: 7px; flex-wrap: wrap; }
.paybadge { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 5px 9px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.footer__bar { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 12.5px; flex-wrap: wrap; }

/* --------------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .filters { display: none; }
  .usps { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { padding-bottom: 72px; }
  /* Two nowrap promises overflow a phone viewport and drag the whole page wide. */
  .topbar__inner span:nth-child(n+2) { display: none; }
  .usp { padding: 12px; gap: 10px; }
  .usp__ico { width: 34px; height: 34px; border-radius: 10px; }
  .usp__ico svg { width: 17px; height: 17px; }
  .usp strong { font-size: 13px; }
  .usp small { font-size: 11.5px; }
  /* padding-block only — a shorthand here would wipe .container's side padding. */
  .header__inner { height: auto; padding-block: 12px; flex-wrap: wrap; row-gap: 10px; }
  .locpill, .header .cartbtn__meta, .searchbox kbd { display: none; }
  .searchwrap { order: 3; flex-basis: 100%; }
  .catrail { top: 0; position: static; }
  .slide { flex-direction: column; text-align: center; padding: 30px 24px; gap: 16px; }
  .slide__art { width: 190px; }
  .slide p { margin-inline: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .cattiles { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
  .cattile img { width: 58px; height: 58px; }
  .quick { grid-template-columns: 1fr; }
  .quick__media img { min-height: 220px; }
  .quick__body { padding: 20px; }
  .bottomnav { display: block; }
  .footer { margin-bottom: 60px; }
  .footer__grid { grid-template-columns: 1fr; gap: 22px; }
  .toasts { bottom: 84px; }
}

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

/* Quick view trigger on a product card. */
.quickbtn {
  position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 8px);
  padding: 6px 14px; border-radius: var(--r-full); font-size: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text);
  box-shadow: var(--shadow); opacity: 0; transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.card:hover .quickbtn { opacity: 1; transform: translate(-50%, 0); }
.card__name a { display: block; }
.card__name a:hover { color: var(--brand-600); }
@media (hover: none) { .quickbtn { display: none; } }
