/* ==========================================================================
   BIGBUYMART — base, layout and components
   Each block maps onto one Shopify section or snippet.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* Two exceptions. The offer ribbon and the slideshow ARE the design here, and
     both are slow, linear and pausable, which is what the guideline asks for. */
  .ribbon__track {
    animation-duration: 40s !important; animation-iteration-count: infinite !important;
  }
  .slide { transition-duration: 600ms !important; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: var(--lh-head);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, var(--fs-4xl)); line-height: var(--lh-tight); }
h2 { font-size: clamp(1.375rem, 1.05rem + 1.4vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-ink); text-underline-offset: 2px; }
a:hover { color: var(--navy); }

img, svg, video { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
li { margin-bottom: var(--s-2); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--blue-100); color: var(--ink); }

.num, .price, table td, table th { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: var(--z-toast);
  background: var(--navy); color: #fff; padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm); font-weight: 700; text-decoration: none;
  transition: top var(--t) var(--ease);
}
.skip-link:focus { top: var(--s-3); color: #fff; }

/* --------------------------------------------------------------------------
   2. Layout
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: var(--wrap-narrow); }

/* Every section: the same padding inside, the same gap after. A section that
   paints its own background stops at its own edge, so the page colour shows
   through between two of them. */
.band, .band--tight, .svcband, .flashband { padding-block: var(--band-y); margin-bottom: var(--band-gap); }
main > section:last-child { margin-bottom: 0; }
.band--grey  { background: var(--canvas-2); }
.band--white { background: var(--surface); }
.band--navy  { background: var(--navy); color: #fff; }
.band--navy h2, .band--navy h3 { color: #fff; }

.row { display: flex; gap: var(--s-3); align-items: center; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

/* Section heading: title on the left, "see all" on the right. Nothing else. */
.shead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5);
}
.shead__t { min-width: 0; }
.shead h2 { margin-bottom: 4px; }
.shead p { color: var(--ink-2); font-size: var(--fs-md); margin: 0; max-width: 62ch; }
.band--navy .shead p { color: var(--ink-dim); }
.shead__link {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-weight: 700; font-size: var(--fs-md); text-decoration: none;
  color: var(--blue-ink); padding-block: 6px; min-height: 34px;
}
.shead__link:hover { color: var(--navy); }
.shead__link svg { width: 15px; height: 15px; transition: transform var(--t) var(--ease); }
.shead__link:hover svg { transform: translateX(3px); }
.band--navy .shead__link { color: #fff; }

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --bg: var(--navy); --fg: #fff; --bd: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 46px; padding: 11px var(--s-6);
  background: var(--bg); color: var(--fg);
  border: 2px solid var(--bd); border-radius: var(--r-sm);
  font-family: var(--text); font-size: var(--fs-md); font-weight: 700;
  text-decoration: none; text-align: center;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
              color var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn--red   { --bg: var(--red); --bd: var(--red); }
.btn--red:hover { background: var(--red-700); border-color: var(--red-700); }
.btn--line  { --bg: transparent; --fg: var(--navy); --bd: var(--line-3); }
.btn--line:hover { background: var(--navy-050); border-color: var(--navy); color: var(--navy); }
.btn--white { --bg: #fff; --fg: var(--navy); --bd: #fff; }
.btn--white:hover { background: var(--navy-050); border-color: var(--navy-050); color: var(--navy); }
.btn--ghostw { --bg: transparent; --fg: #fff; --bd: rgba(255,255,255,.55); }
.btn--ghostw:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
.btn--sm { min-height: 40px; padding: 7px var(--s-4); font-size: var(--fs-sm); }
.btn--lg { min-height: 54px; padding: 14px var(--s-7); font-size: var(--fs-lg); }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* --------------------------------------------------------------------------
   4. Badges
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .03em;
  text-transform: uppercase; white-space: nowrap; border: 1.5px solid transparent;
}
.pill--stock { background: var(--ok); color: #fff; border-color: var(--ok); }
.pill--out   { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill--save  { background: var(--red); color: #fff; border-color: var(--red); }
.pill--deal  { background: var(--wait); color: #fff; border-color: var(--wait); }
.pill--org   { background: var(--ok); color: #fff; border-color: var(--ok); }
.pill--info  { background: #fff; color: var(--navy); border-color: var(--line-2); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 6px var(--s-4);
  background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 700; color: var(--ink); text-decoration: none;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease);
}
.tag:hover { border-color: var(--navy); color: var(--navy); }
.tag.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tag svg { width: 14px; height: 14px; }
.tag .n { color: var(--ink-3); font-weight: 700; }
.tag.is-on .n { color: #C7DBF0; }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
/* Red ribbon. Sticks above the header so the offer never scrolls away, and
   the text slides right to left on a loop. Duplicated items make the loop
   seamless; the copy is also exposed once, unanimated, to screen readers. */
.ribbon {
  position: sticky; top: 0; z-index: calc(var(--z-header) + 1);
  background: var(--red); color: #fff;
  overflow: hidden; white-space: nowrap;
  border-bottom: 2px solid var(--red-700);
}
.ribbon__track {
  display: inline-flex; align-items: center; gap: var(--s-8);
  padding-block: 9px; padding-left: var(--s-8);
  animation: ribbon 34s linear infinite;
  will-change: transform;
}
.ribbon:hover .ribbon__track { animation-play-state: paused; }
.ribbon__item {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  font-size: var(--fs-sm); font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.ribbon__item svg { width: 17px; height: 17px; flex: none; }
@keyframes ribbon { from { transform: translateX(0); } to { transform: translateX(-50%); } }


.header { position: sticky; top: 38px; z-index: var(--z-header); background: var(--surface); border-bottom: 1px solid var(--line); }
.header__bar { display: flex; align-items: center; gap: var(--s-4); min-height: var(--header-h); }
.header__logo { flex: none; display: block; }
.header__logo img { width: 126px; height: auto; }
@media (min-width: 768px) { .header__logo img { width: 152px; } }

.header__tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.ico {
  position: relative; display: inline-grid; place-items: center;
  width: 46px; height: 46px;
  background: none; border: 0; border-radius: var(--r-sm); color: var(--ink); text-decoration: none;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.ico:hover { background: var(--navy-050); color: var(--navy); }
.ico svg { width: 23px; height: 23px; }
.ico__n {
  position: absolute; top: 2px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; background: var(--red); color: #fff;
  border-radius: var(--r-pill); font-size: 11px; font-weight: 800; line-height: 1;
}
.ico__n[hidden] { display: none; }
.burger { display: inline-grid; }
@media (min-width: 1100px) { .burger { display: none; } }

/* --- Phones: the Shein-style header ---------------------------------------
   No side menu at all. A small logo and four icons on the first line, the
   shortcuts that replace the menu on the second, and no background of its own
   until the page moves - over the full-screen slideshow it starts transparent. */
.hnav { display: none; }
/* Account and Help belong to the phone header; the desktop one is untouched. */
.ico--m { display: none; }
@media (max-width: 619px) {
  :root { --mheader-h: 76px; }
  .burger { display: none; }
  .ico--m { display: inline-grid; }
  .header { transition: background var(--t) var(--ease), border-color var(--t) var(--ease); }
  .header__bar { min-height: 44px; gap: var(--s-2); }
  .header__logo img { width: 88px; }
  .header__tools { gap: 0; }
  .ico { width: 36px; height: 36px; }
  .ico svg { width: 20px; height: 20px; }
  .ico__n { top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }

  .hnav { display: block; }
  .hnav__in {
    display: flex; gap: var(--s-4); overflow-x: auto; padding-bottom: 9px;
    scrollbar-width: none;
    justify-content: center;
    /* "safe" keeps the first link reachable if the row ever overflows. */
    justify-content: safe center;
  }
  .hnav__in::-webkit-scrollbar { display: none; }
  .hnav a {
    font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0;
    color: var(--ink); text-decoration: none; white-space: nowrap;
  }

  .header.is-over {
    background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0));
    border-bottom-color: transparent;
  }
  .header.is-over .header__logo img { filter: brightness(0) invert(1); }
  .header.is-over .ico,
  .header.is-over .hnav a { color: #fff; }
}

/* --- Primary nav, on the same line as the logo --------------------------- */
.nav { display: none; }
@media (min-width: 1100px) { .nav { display: block; } }
.nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; display: flex; margin: 0; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px var(--s-4);
  font-size: var(--fs-md); font-weight: 700; color: var(--ink); text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.nav a:hover, .nav li:focus-within > a { color: var(--navy); border-bottom-color: var(--blue); }
.nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }
.nav .hot { color: var(--red); }
.nav .hot:hover { color: var(--red-700); border-bottom-color: var(--red); }
.nav .caret { width: 13px; height: 13px; transition: transform var(--t) var(--ease); }
.nav li:hover .caret, .nav li:focus-within .caret { transform: rotate(180deg); }

.mega {
  position: absolute; top: 100%; left: 0; min-width: 560px;
  background: var(--surface); border: 1.5px solid var(--line-2); border-top: 3px solid var(--navy);
  border-radius: 0 0 var(--r-md) var(--r-md); box-shadow: var(--sh-3); padding: var(--s-5);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
}
.nav li:hover > .mega, .nav li:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }
.mega__grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s-2) var(--s-6); }
.mega__grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.mega h4 {
  font-family: var(--text); font-size: var(--fs-2xs); font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
}
.mega .lk {
  display: flex; align-items: baseline; gap: var(--s-2);
  padding: 7px var(--s-2); margin-inline: -8px; border-bottom: 0; border-radius: var(--r-xs);
  color: var(--ink); text-decoration: none; font-size: var(--fs-md); font-weight: 600;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.mega .lk:hover { background: var(--navy-050); color: var(--navy); }
.mega .lk .n { margin-left: auto; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 700; }
.mega__foot { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }

/* --- Drawers -------------------------------------------------------------- */
.scrim {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  background: rgba(11, 28, 51, .55); opacity: 0; visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility var(--t);
}
.scrim.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; inset-block: 0; left: 0; z-index: calc(var(--z-drawer) + 1);
  width: min(92vw, 380px); display: flex; flex-direction: column;
  background: var(--surface); transform: translateX(-100%);
  transition: transform var(--t-slow) var(--ease); overscroll-behavior: contain;
}
.drawer.is-open { transform: none; }
.drawer--r { left: auto; right: 0; transform: translateX(100%); width: min(94vw, 420px); }
.drawer--r.is-open { transform: none; }
.drawer__h {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--line); flex: none;
}
.drawer__h strong { font-family: var(--display); font-size: var(--fs-lg); }
.drawer__b { flex: 1 1 auto; overflow-y: auto; padding: var(--s-4) var(--s-5) var(--s-9); }
.drawer__f { flex: none; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); background: var(--sunk); }
.x { display: inline-grid; place-items: center; width: 46px; height: 46px; background: none; border: 0; border-radius: var(--r-sm); color: var(--ink); }
.x:hover { background: var(--canvas-2); }
.x svg { width: 20px; height: 20px; }

.mnav { list-style: none; margin: 0; padding: 0; }
.mnav > li { border-bottom: 1px solid var(--line); margin: 0; }
.mnav__a, .mnav__t {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  min-height: 54px; padding: var(--s-3) 0; background: none; border: 0; text-align: left;
  font-size: var(--fs-lg); font-weight: 700; color: var(--ink); text-decoration: none;
}
.mnav__t svg { width: 18px; height: 18px; margin-left: auto; color: var(--ink-3); transition: transform var(--t) var(--ease); }
.mnav__t[aria-expanded="true"] svg { transform: rotate(180deg); }
.mnav__p { display: none; padding-bottom: var(--s-3); }
.mnav__p.is-open { display: block; }
.mnav__p ul { list-style: none; margin: 0; padding: 0; }
.mnav__p li { margin: 0; }
.mnav__p a {
  display: flex; align-items: center; gap: var(--s-3); min-height: 46px;
  padding: var(--s-2) var(--s-3); color: var(--ink-2); text-decoration: none;
  font-size: var(--fs-md); font-weight: 600; border-radius: var(--r-xs);
}
.mnav__p a:hover { background: var(--navy-050); color: var(--navy); }
.mnav__p .n { margin-left: auto; font-size: var(--fs-xs); color: var(--ink-3); }

/* --------------------------------------------------------------------------
   6. Product card
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--s-4); }
.grid--p { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 620px)  { .grid--p { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1000px) { .grid--p { grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-5); } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.card:hover { border-color: var(--navy); box-shadow: var(--sh-2); transform: translateY(-3px); }
.card:focus-within { border-color: var(--navy); }

.card__pic {
  position: relative; flex: none; height: 168px;
  background: var(--surface); padding: var(--s-3);
  /* Block, not a centred grid: inside a centred grid area a square product shot
     ignored its 100% height, kept its own ratio and ran over the text below. */
  display: block;
}
@media (min-width: 620px)  { .card__pic { height: 182px; } }
@media (min-width: 1000px) { .card__pic { height: 196px; } }
.card__pic img { width: 100%; height: 100%; object-fit: contain; transition: transform var(--t-slow) var(--ease); }
.card:hover .card__pic img { transform: scale(1.04); }
.card__tag { position: absolute; top: var(--s-2); left: var(--s-2); }
.card__save { position: absolute; top: var(--s-2); right: var(--s-2); }

.card__b { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; padding: var(--s-3); border-top: 1.5px solid var(--line); }
.card__brand { font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--blue-ink); }
.card__n {
  font-family: var(--text); font-size: var(--fs-sm); font-weight: 700;
  line-height: 1.28; letter-spacing: 0; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__n a { color: var(--ink); text-decoration: none; }
.card__n a::after { content: ""; position: absolute; inset: 0; }
.card__n a:hover { color: var(--navy); }
.card__meta {
  font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot { display: flex; align-items: center; gap: var(--s-2); margin-top: auto; padding-top: var(--s-2); }
.card__price { font-family: var(--display); font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.card__from { font-family: var(--text); font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); }
.card__add {
  position: relative; z-index: 1; margin-left: auto; flex: none;
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  background: var(--red); color: #fff; border: 2px solid var(--red); border-radius: var(--r-sm);
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.card__add:hover { background: var(--red-700); border-color: var(--red-700); }
.card__add:active { transform: scale(.94); }
.card__add svg { width: 18px; height: 18px; }
.card__notify {
  position: relative; z-index: 1; margin-left: auto; flex: none;
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2);
  background: none; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  min-height: 38px; padding: 4px var(--s-2);
}
.card__notify:hover { border-color: var(--navy); color: var(--navy); }

/* Rail: swipeable on small screens, a grid from 1000px. */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 64vw);
  gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: var(--s-4); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
}
.rail > * { scroll-snap-align: start; }
@media (min-width: 620px)  { .rail { grid-auto-columns: minmax(210px, 36vw); } }
@media (min-width: 1000px) {
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0,1fr));
          grid-auto-columns: auto; overflow: visible; margin-inline: 0;
          padding-inline: 0; padding-bottom: 0; gap: var(--s-5); }
}

/* --------------------------------------------------------------------------
   7. Category tiles
   -------------------------------------------------------------------------- */
/* Three across on every screen: nine categories make three tidy rows. */
.cats { display: grid; gap: var(--s-2); grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (min-width: 620px)  { .cats { gap: var(--s-4); } }
@media (min-width: 1050px) { .cats { gap: var(--s-5); } }

.cat {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 118px; padding: var(--s-3) var(--s-2); overflow: hidden;
  justify-content: center; align-items: center; text-align: center;
  background: var(--tint, var(--navy));
  border: 2px solid var(--tint, var(--navy)); border-radius: var(--r-md);
  color: #fff; text-decoration: none;
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), filter var(--t) var(--ease);
}
@media (min-width: 620px) { .cat { min-height: 124px; padding: var(--s-4); align-items: stretch; text-align: left; } }
@media (min-width: 1050px) { .cat { min-height: 146px; } }
.cat::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,.20), transparent 62%);
}
.cat:hover { box-shadow: var(--sh-3); transform: translateY(-4px); filter: brightness(1.08); color: #fff; }
.cat img {
  position: static; z-index: 1; margin: 0 auto var(--s-2);
  width: auto; height: 40px; max-width: 70%; object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(14,32,51,.20));
  transition: transform var(--t-slow) var(--ease);
}
.cat:hover img { transform: scale(1.06); }

@media (min-width: 620px) {
  /* Two real columns instead of an absolutely positioned picture: the label
     and the picture own their own space, so they cannot overlap at any width. */
  .cat {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto auto;
    column-gap: var(--s-3); align-items: end; text-align: left;
  }
  .cat img {
    position: static; transform: none; margin: 0;
    grid-column: 2; grid-row: 1 / -1; align-self: center;
    height: 88px; width: auto; max-width: 40%;
    filter: drop-shadow(0 12px 20px rgba(14,32,51,.18));
  }
  .cat:hover img { transform: scale(1.06); }
  .cat__t { grid-column: 1; grid-row: 2; max-width: 100%; }
  .cat__n { grid-column: 1; grid-row: 3; }
}
@media (min-width: 1050px) { .cat img { height: 112px; } }
.cat__t {
  position: relative; z-index: 2; font-family: var(--display); font-weight: 800;
  font-size: var(--fs-xs); letter-spacing: -.02em; line-height: 1.1; max-width: 100%;
}
.cat__n { position: relative; z-index: 2; font-size: 10px; font-weight: 700; margin-top: 1px; }
@media (min-width: 620px) {
  .cat__t { font-size: var(--fs-md); max-width: 68%; }
  .cat__n { font-size: var(--fs-xs); margin-top: 2px; }
}
@media (min-width: 1050px) { .cat__t { font-size: var(--fs-lg); max-width: 66%; } }

/* --------------------------------------------------------------------------
   8. Brand plates
   -------------------------------------------------------------------------- */
.brands { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 620px)  { .brands { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (min-width: 1050px) { .brands { grid-template-columns: repeat(6, minmax(0,1fr)); } }
.brand {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 96px; padding: var(--s-4) var(--s-3);
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-md);
  color: var(--ink); text-decoration: none; text-align: center;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.brand:hover { border-color: var(--navy); box-shadow: var(--sh-2); transform: translateY(-3px); color: var(--navy); }
.brand__n { font-family: var(--display); font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.brand__m { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--navy-900); color: #C4D3E4; margin-top: var(--s-10); }
.footer a { color: #C4D3E4; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__top { padding-block: var(--s-8); border-bottom: 1px solid rgba(255,255,255,.12); }
/* Two columns of links on a phone, with the brand block across the top. */
.footer__g { display: grid; gap: var(--s-6) var(--s-4); grid-template-columns: repeat(2, minmax(0,1fr)); }
.footer__g > div:first-child { grid-column: 1 / -1; }
@media (min-width: 640px)  { .footer__g { gap: var(--s-7); } }
@media (min-width: 1000px) {
  .footer__g { grid-template-columns: 1.6fr repeat(3, minmax(0,1fr)); }
  .footer__g > div:first-child { grid-column: auto; }
}
.footer h3 { font-family: var(--text); font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: var(--s-4); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: var(--s-2); font-size: var(--fs-md); }
.footer li a { display: inline-flex; align-items: center; min-height: 32px; }
.footer__logo img { width: 168px; filter: brightness(0) invert(1); }
.footer__p { font-size: var(--fs-md); line-height: 1.6; margin-block: var(--s-4); max-width: 40ch; }
.footer address { font-style: normal; line-height: 1.75; font-size: var(--fs-md); }
.footer__bot { padding-block: var(--s-5); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; }
.footer__bot nav { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); }
.footer__bot a { display: inline-flex; align-items: center; min-height: 32px; }
.pay { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-4); }
.pay span {
  display: inline-grid; place-items: center; min-width: 44px; height: 28px; padding-inline: 7px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-xs); font-size: 10px; font-weight: 800; color: #E9F1F9;
}

/* --------------------------------------------------------------------------
   10. Cart, toast, quantity
   -------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: var(--s-5); z-index: var(--z-toast);
  transform: translate(-50%, 160%);
  display: flex; align-items: center; gap: var(--s-3);
  max-width: calc(100vw - 32px); padding: var(--s-3) var(--s-5);
  background: var(--navy-900); color: #fff; border-radius: var(--r-sm);
  box-shadow: var(--sh-3); font-size: var(--fs-md); font-weight: 700;
  transition: transform var(--t-slow) var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); }
.toast svg { width: 20px; height: 20px; color: #7BD6A8; flex: none; }

.line { display: flex; gap: var(--s-3); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.line__pic { width: 72px; height: 72px; flex: none; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-xs); padding: 5px; }
.line__pic img { width: 100%; height: 100%; object-fit: contain; }
.line__b { flex: 1 1 auto; min-width: 0; }
.line__t { display: inline-flex; align-items: center; min-height: 28px; font-size: var(--fs-md); font-weight: 700; line-height: 1.3; color: var(--ink); text-decoration: none; }
.line__t:hover { color: var(--navy); }
.line__m { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 1px; }
.line__f { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); }
.line__x { background: none; border: 0; padding: 5px 0; color: var(--ink-3); font-size: var(--fs-sm); text-decoration: underline; min-height: 34px; }
.line__x:hover { color: var(--red); }

.qty { display: inline-flex; align-items: stretch; border: 2px solid var(--line-3); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.qty button { width: 44px; min-height: 46px; background: none; border: 0; font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.qty button:hover { background: var(--navy-050); }
.qty input { width: 54px; min-height: 46px; border: 0; border-inline: 2px solid var(--line-3); text-align: center; font-weight: 800; background: var(--surface); }
.qty--s button { width: 38px; min-height: 40px; }
.qty--s input { width: 44px; min-height: 40px; }

.empty { text-align: center; padding: var(--s-10) var(--s-4); color: var(--ink-2); }
.empty svg { width: 46px; height: 46px; color: var(--line-3); margin: 0 auto var(--s-4); }
.empty h3 { margin-bottom: var(--s-2); color: var(--ink); }

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */
.f { margin-bottom: var(--s-4); }
.f label { display: block; font-size: var(--fs-sm); font-weight: 800; margin-bottom: 6px; }
.f .req { color: var(--red); }
.f input, .f select, .f textarea {
  width: 100%; min-height: 48px; padding: 11px var(--s-4);
  background: var(--surface); border: 2px solid var(--line-3); border-radius: var(--r-sm);
  font-size: var(--fs-base); transition: border-color var(--t) var(--ease);
}
.f textarea { min-height: 136px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--navy); }
.f__h { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 5px; }
.f__e { font-size: var(--fs-sm); font-weight: 700; color: var(--red); margin-top: 5px; display: none; }
.f.bad input, .f.bad select, .f.bad textarea { border-color: var(--red); }
.f.bad .f__e { display: block; }
.f2 { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 620px) { .f2 { grid-template-columns: 1fr 1fr; } }

.note { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-sm); font-size: var(--fs-md); border: 1.5px solid transparent; }
.note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.note--ok  { background: var(--ok-050); color: #0B5137; border-color: var(--ok-100); }
.note--warn{ background: var(--wait-050); color: #6D4200; border-color: #EBD4AC; }
.note--info{ background: var(--blue-050); color: var(--blue-ink); border-color: var(--blue-100); }
.note--bad { background: var(--red-050); color: var(--red-700); border-color: var(--red-100); }

/* --------------------------------------------------------------------------
   12. Small shared pieces
   -------------------------------------------------------------------------- */
.crumbs { font-size: var(--fs-sm); color: var(--ink-2); padding-block: var(--s-4); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; list-style: none; margin: 0; padding: 0; }
.crumbs li { margin: 0; display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "\203A"; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 30px; }
.crumbs a:hover { color: var(--navy); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }

.panel { background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-md); padding: var(--s-5); }
.panel--sunk { background: var(--sunk); }
.panel h2, .panel h3 { font-size: var(--fs-xl); margin-bottom: var(--s-3); }

.dl { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.dl th, .dl td { text-align: left; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.dl th { width: 44%; font-weight: 700; color: var(--ink-2); font-size: var(--fs-sm); padding-right: var(--s-3); }
.dl tr:last-child th, .dl tr:last-child td { border-bottom: 0; }

.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--s-8); margin-bottom: var(--s-3); }
.prose h3 { margin-top: var(--s-6); margin-bottom: var(--s-2); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose table { margin-block: var(--s-5); }

.split { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 900px) { .split--a { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); } }

/* Client notes. Deleted before launch. */
.devnote {
  border: 1.5px dashed var(--blue-ink); background: var(--blue-050); color: var(--blue-ink);
  padding: var(--s-4); margin-block: var(--s-4); border-radius: var(--r-sm);
  font-size: var(--fs-sm); line-height: 1.55;
}
.devnote strong { display: block; font-size: var(--fs-2xs); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 5px; color: var(--navy); }
.devnote a { color: var(--blue-ink); }
body.hide-notes .devnote { display: none; }
.notes-btn {
  position: fixed; right: var(--s-4); bottom: var(--s-4); z-index: var(--z-toast);
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px var(--s-4);
  background: var(--ink); color: #fff; border: 0; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 800; box-shadow: var(--sh-3); opacity: .92;
}
.notes-btn:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   13. Components keep their own ink inside a dark band
   -------------------------------------------------------------------------- */
.band--navy .card, .band--navy .brand, .band--navy .panel { color: var(--ink); }
.band--navy .cat { color: #fff; }
.band--navy .card a, .band--navy .panel a { color: var(--ink); }
.band--navy .card__brand { color: var(--blue-ink); }
.band--navy .card__meta, .band--navy .panel p { color: var(--ink-2); }
.band--navy .btn { color: var(--fg); }
.band--navy .tag { color: var(--ink); }
.band--navy .tag.is-on { color: #fff; }

/* --------------------------------------------------------------------------
   14. Touch targets
   -------------------------------------------------------------------------- */
@media (pointer: coarse) {
  .btn--sm, .tag { min-height: 44px; }
  .footer li a, .footer__bot a, .topbar a { min-height: 40px; }
}
