/* ============================================================================
   SHARMA KIRANA — APPLICATION STYLES
   Vanilla CSS. No framework. Tokens come from tokens.css.
   Layout system: fluid gutters + a 1400px shell. Grid, never flex % math.
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  font-feature-settings: "cv11", "ss01";
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.22;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

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

::selection {
  background: var(--accent-soft-2);
  color: var(--accent-text);
}

/* Accessible-only text */
.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;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: var(--z-toast);
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.625rem 1.125rem;
  border-radius: 0 0 var(--r-control) var(--r-control);
  font-weight: 600;
  font-size: var(--fs-md);
  transition: transform var(--dur) var(--ease-out-expo);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ============================== SHELL ============================== */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 640px) {
  :root {
    --gutter: 1.5rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 2rem;
  }
}

.page {
  padding-bottom: 0;
}

@media (min-width: 1024px) {
  .page {
    padding-bottom: 0;
  }
}

.stack-lg > * + * {
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .stack-lg > * + * {
    margin-top: 2.75rem;
  }
}

/* ============================== ICONS ==============================
   Phosphor-compatible inline SVG sprite usage. One family, one stroke.
   ================================================================== */
.icon {
  fill: none;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  display: block;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-xs {
  width: 0.8125rem;
  height: 0.8125rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ============================== BUTTONS ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--r-control);
  padding: 0 0.9375rem;
  height: 2.5rem;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.006em;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease, color var(--dur-fast) ease,
    transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:active {
  background: var(--accent-active);
}

.btn-outline {
  background: var(--surface);
  color: var(--text-strong);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.btn-wa {
  background: var(--whatsapp);
  color: #fff;
}

.btn-wa:hover {
  filter: brightness(0.94);
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: var(--fs-xs);
  border-radius: var(--r-tile);
}

.btn-block {
  width: 100%;
}

/* Icon-only control */
.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-control);
  color: var(--text-muted);
  transition: background-color var(--dur-fast) ease,
    color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.iconbtn:hover {
  background: var(--surface-3);
  color: var(--text-strong);
}

.iconbtn:active {
  transform: scale(0.94);
}

.iconbtn-round {
  border-radius: var(--r-chip);
}

/* ============================== HEADER ============================== */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

@supports not (backdrop-filter: blur(4px)) {
  .header {
    background: var(--surface);
  }
}

.header__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 60px;
}

/* Desktop: put the search on the SAME line as the brand and actions so the
   nav renders as one row and clears the 80px cap. Mobile keeps it stacked. */
@media (min-width: 900px) {
  .header .shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.5rem;
    height: 72px;
  }

  .header__row {
    display: contents;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    flex: 0 1 auto;
  }

  .header__actions {
    grid-column: 3;
    grid-row: 1;
  }

  .header .searchbar {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding-bottom: 0;
  }

  .header .search__input {
    height: 2.5rem;
  }
}

/* Brand lockup */
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  flex: 1;
}

.brand__mark {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-tile);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-3);
}

.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand__text {
  min-width: 0;
}

.brand__name {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__verified {
  flex-shrink: 0;
  width: 0.9375rem;
  height: 0.9375rem;
  color: var(--accent);
}

.brand__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__open {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent-text);
  font-weight: 600;
}

.brand__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

/* Cart button with live count */
.cartbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: var(--r-control);
  color: var(--text-strong);
  font-size: var(--fs-md);
  font-weight: 600;
  transition: background-color var(--dur-fast) ease;
}

.cartbtn:hover {
  background: var(--surface-3);
}

.cartbtn__count {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--r-chip);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-3xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  transition: transform var(--dur) var(--ease-spring);
}

.cartbtn__count[data-empty="true"] {
  display: none;
}

.cartbtn__count.is-bump {
  transform: scale(1.28);
}

/* Search bar sits inside the sticky header, second row */
.searchbar {
  padding-bottom: 0.625rem;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search__icon {
  position: absolute;
  left: 0.875rem;
  color: var(--text-subtle);
  pointer-events: none;
}

.search__input {
  width: 100%;
  height: 2.75rem;
  padding: 0 5.5rem 0 2.625rem;
  border-radius: var(--r-control);
  border: 1px solid var(--border);
  background: var(--bg-sunken);
  color: var(--text-strong);
  font-size: var(--fs-md);
  transition: border-color var(--dur-fast) ease,
    background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.search__input::placeholder {
  color: var(--text-muted);
}

.search__input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.search__clear,
.search__filter {
  position: absolute;
  right: 0.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-tile);
  color: var(--text-muted);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.search__clear {
  display: none;
}

.search__clear[data-show="true"] {
  display: inline-flex;
}

.search__clear[data-show="true"] ~ .search__filter {
  right: 2.375rem;
}

.search__clear:hover,
.search__filter:hover {
  background: var(--surface-3);
  color: var(--text-strong);
}

/* ============================== BANNER HERO ==============================
   Asymmetric: artwork bleeds right, content is bottom-left anchored.
   ====================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface);
  isolation: isolate;
}

.hero__media {
  position: relative;
  height: 220px;
}

@media (min-width: 640px) {
  .hero__media {
    height: 280px;
  }
}

@media (min-width: 1024px) {
  .hero__media {
    height: 320px;
  }
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 1.6s var(--ease-out-expo);
}

.hero:hover .hero__img {
  transform: scale(1.07);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to top,
      rgb(12 11 9 / 0.9) 0%,
      rgb(12 11 9 / 0.62) 38%,
      rgb(12 11 9 / 0.12) 72%,
      transparent 100%
    ),
    linear-gradient(100deg, rgb(12 11 9 / 0.5) 0%, transparent 55%);
}

.hero__body {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.125rem 1.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero__body {
    padding: 1.5rem 1.75rem;
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--fs-3xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.82);
  margin-bottom: 0.4375rem;
}

.hero__title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.028em;
  line-height: 1.1;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .hero__title {
    font-size: var(--fs-3xl);
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: var(--fs-4xl);
    max-width: 22ch;
  }
}

.hero__sub {
  margin-top: 0.4375rem;
  font-size: var(--fs-sm);
  color: rgb(255 255 255 / 0.86);
  max-width: 46ch;
}

.hero__pills {
  display: none;
  gap: 0.4375rem;
  margin-top: 0.9375rem;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .hero__pills {
    display: flex;
  }
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.625rem;
  border-radius: var(--r-chip);
  background: rgb(255 255 255 / 0.14);
  border: 1px solid rgb(255 255 255 / 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: #fff;
}

.hero__cta {
  flex-shrink: 0;
  display: none;
}

@media (min-width: 768px) {
  .hero__cta {
    display: inline-flex;
  }
}

/* Banner size is a real stat, not decoration */
.hero__count {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.6875rem;
  border-radius: var(--r-chip);
  background: rgb(12 11 9 / 0.5);
  border: 1px solid rgb(255 255 255 / 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================== TRUST STRIP ============================== */
.trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}

@media (min-width: 768px) {
  .trust {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.trust__cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
}

.trust__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-tile);
  background: var(--accent-soft);
  color: var(--accent-text);
  flex-shrink: 0;
}

.trust__label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
}

.trust__note {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  line-height: 1.3;
}

/* ============================== SECTION HEADS ==============================
   Vertical stack only. No split-header, no floating corner paragraph.
   ======================================================================== */
.sec {
  margin-top: var(--section-gap);
}

@media (min-width: 1024px) {
  .sec {
    margin-top: var(--section-gap);
  }
}

.sec__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sec__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.022em;
}

.sec__sub {
  margin-top: 0.125rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.sec__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sec__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
}

.sec__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================== CATEGORY RAIL ============================== */
.rail {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.375rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.rail::-webkit-scrollbar {
  display: none;
}


.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 0.5rem 0.8125rem;
  border-radius: var(--r-chip);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  transition: border-color var(--dur-fast) ease,
    background-color var(--dur-fast) ease, color var(--dur-fast) ease,
    transform var(--dur-fast) ease;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.chip:active {
  transform: scale(0.97);
}

.chip__icon {
  display: grid;
  place-items: center;
  color: var(--text-subtle);
  transition: color var(--dur-fast) ease;
}

.chip__n {
  padding: 0.0625rem 0.375rem;
  border-radius: var(--r-chip);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: var(--fs-3xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.chip[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-xs);
}

.chip[aria-selected="true"] .chip__icon {
  color: var(--on-accent);
}

.chip[aria-selected="true"] .chip__n {
  background: rgb(255 255 255 / 0.22);
  color: var(--on-accent);
}

/* ============================== PRODUCT GRID ============================== */
.grid-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 0.75rem;
}

@media (min-width: 640px) {
  .grid-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 1rem;
  }
}

@media (min-width: 768px) {
  .grid-products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-products {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.75rem 1.25rem;
  }
}

@media (min-width: 1280px) {
  .grid-products {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Best-sellers rail reuses the card, just narrower */
.grid-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.grid-rail::-webkit-scrollbar {
  display: none;
}

@media (min-width: 640px) {
  .grid-rail {
    grid-auto-columns: 176px;
    gap: 1rem;
  }
}

.grid-rail > * {
  scroll-snap-align: start;
}

/* ============================== PRODUCT CARD ============================== */
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card__frame {
  position: relative;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease,
    transform var(--dur) var(--ease-out-expo);
}

.card:hover .card__frame {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-2);
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  background: #fff;
  transition: transform var(--dur-slow) var(--ease-out-expo);
}

.card:hover .card__img {
  transform: scale(1.06);
}

/* Discount flag */
.card__flag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  padding: 0.25rem 0.4375rem;
  border-radius: 7px;
  background: var(--alert);
  color: #fff;
  font-size: var(--fs-3xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-xs);
}

/* Out of stock */
.card__flag--out {
  background: var(--text-strong);
}

/* Quick actions revealed on hover / always on touch */
.card__quick {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity var(--dur) ease, transform var(--dur) var(--ease-out-expo);
}

.card:hover .card__quick,
.card:focus-within .card__quick {
  opacity: 1;
  transform: translateX(0);
}

@media (hover: none) {
  .card__quick {
    opacity: 1;
    transform: none;
  }
}

.quickbtn {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-chip);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease,
    transform var(--dur-fast) ease;
}

.quickbtn:hover {
  background: var(--surface);
  color: var(--text-strong);
}

.quickbtn:active {
  transform: scale(0.9);
}

.quickbtn.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* Stock urgency line — real data, only when genuinely low */
.card__stock {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.1875rem 0.4375rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  font-size: var(--fs-3xs);
  font-weight: 600;
  color: var(--alert);
  font-variant-numeric: tabular-nums;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 0.625rem;
}

.card__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.32;
  letter-spacing: -0.012em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.64em;
}

.card__unit {
  flex-wrap: wrap;
  margin-top: 0.1875rem;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3125rem;
}

.card__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.card__rating svg {
  color: var(--star);
}

.card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.card__price {
  flex-wrap: wrap;
  display: flex;
  align-items: baseline;
  gap: 0.3125rem;
  min-width: 0;
}

.card__now {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.022em;
  font-variant-numeric: tabular-nums;
}

.card__was {
  font-size: var(--fs-2xs);
  /* Was --text-subtle, which failed AA at 11px. Real price data, so it must pass. */
  color: var(--text-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

/* Add / stepper */
.card__act {
  flex-shrink: 0;
}

.addbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 2rem;
  padding: 0 0.625rem;
  border-radius: var(--r-tile);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  transition: background-color var(--dur-fast) ease,
    transform var(--dur-fast) ease;
}

.addbtn:hover {
  background: var(--accent-hover);
}

.addbtn:active {
  transform: scale(0.95);
}

.addbtn--opts {
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--border);
}

.addbtn--opts:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

/* Quantity stepper replaces Add once in cart */
.stepper {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  border-radius: var(--r-tile);
  background: var(--accent);
  color: var(--on-accent);
  overflow: hidden;
}

.stepper__btn {
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 100%;
  color: inherit;
  transition: background-color var(--dur-fast) ease;
}

.stepper__btn:hover {
  background: rgb(255 255 255 / 0.16);
}

.stepper__btn:active {
  background: rgb(255 255 255 / 0.26);
}

.stepper__n {
  min-width: 1.375rem;
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- LIST VIEW ---------- */
.grid-products.is-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .grid-products.is-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

.is-list .card {
  flex-direction: row;
  gap: 0.875rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}

.is-list .card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.is-list .card__frame {
  width: 92px;
  flex-shrink: 0;
  border-radius: var(--r-tile);
}

@media (min-width: 640px) {
  .is-list .card__frame {
    width: 112px;
  }
}

.is-list .card:hover .card__frame {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.is-list .card__quick {
  display: none;
}

.is-list .card__body {
  padding-top: 0;
  min-width: 0;
}

.is-list .card__name {
  -webkit-line-clamp: 2;
  min-height: 0;
  font-size: var(--fs-md);
}

.card__desc {
  display: none;
  margin-top: 0.375rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.is-list .card__desc {
  display: -webkit-box;
}

/* ============================== SORT / VIEW TOOLBAR ============================== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.toolbar__left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.resultcount {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.resultcount b {
  color: var(--text-strong);
  font-weight: 700;
}

.toolbar__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.segmented {
  display: none;
  align-items: center;
  gap: 0.125rem;
  padding: 0.1875rem;
  border-radius: var(--r-control);
  border: 1px solid var(--border);
  background: var(--surface);
}

@media (min-width: 640px) {
  .segmented {
    display: flex;
  }
}

.segmented__btn {
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 8px;
  color: var(--text-muted);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.segmented__btn:hover {
  color: var(--text-strong);
}

.segmented__btn[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--text-strong);
}

/* Filter button (mobile) */
.filterbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2.25rem;
  padding: 0 0.6875rem;
  border-radius: var(--r-control);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-strong);
  transition: border-color var(--dur-fast) ease;
}

.filterbtn:hover {
  border-color: var(--border-strong);
}

.filterbtn__n {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-chip);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-3xs);
  font-weight: 700;
}

.filterbtn__n[data-empty="true"] {
  display: none;
}

/* ============================== SELECT ============================== */
.select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select select {
  appearance: none;
  height: 2.25rem;
  padding: 0 2rem 0 0.6875rem;
  border-radius: var(--r-control);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  transition: border-color var(--dur-fast) ease;
}

.select select:hover {
  border-color: var(--border-strong);
}

.select select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.select__caret {
  position: absolute;
  right: 0.5rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* ============================== EMPTY / LOADING ============================== */
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-card);
  background: var(--surface);
}

.empty__art {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--r-chip);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}

.empty__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-strong);
}

.empty__text {
  margin-top: 0.375rem;
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 42ch;
}

.empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.125rem;
}

/* Skeleton mirrors the real card geometry exactly */
.skel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.skel__frame {
  aspect-ratio: 1;
  border-radius: var(--r-card);
  border: 1px solid var(--border-faint);
  background: linear-gradient(
    100deg,
    var(--skeleton-a) 30%,
    var(--skeleton-b) 50%,
    var(--skeleton-a) 70%
  );
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

.skel__line {
  height: 0.6875rem;
  border-radius: 4px;
  background: linear-gradient(
    100deg,
    var(--skeleton-a) 30%,
    var(--skeleton-b) 50%,
    var(--skeleton-a) 70%
  );
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

.skel__line--a {
  margin-top: 0.625rem;
  width: 88%;
}

.skel__line--b {
  margin-top: 0.4375rem;
  width: 52%;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skel__frame,
  .skel__line {
    animation: none;
  }
}

/* ============================== STICKY CATEGORY BAR ============================== */
.catbar {
  position: sticky;
  top: var(--header-h);
  z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-block: .25rem;
  margin-top: 1rem;
  margin-inline: 0;
  padding-inline: 0;
  border-bottom: 0;
}

.catbar.is-stuck {
  border-bottom: 0;
}

/* ============================== DRAWER (cart / filters) ============================== */
.scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: rgb(14 13 11 / 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) ease, visibility var(--dur) ease;
}

.scrim.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: var(--z-modal);
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-drawer);
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out-expo);
  will-change: transform;
}

.drawer[data-side="left"] {
  right: auto;
  left: 0;
  border-left: 0;
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
}

.drawer.is-open {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .drawer {
    transition: none;
  }
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-strong);
}

.drawer__count {
  padding: 0.125rem 0.4375rem;
  border-radius: var(--r-chip);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: var(--fs-2xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
}

.drawer__foot {
  flex-shrink: 0;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* ============================== CART LINES ============================== */
.cline {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-faint);
}

.cline:last-child {
  border-bottom: 0;
}

.cline__img {
  width: 64px;
  height: 64px;
  border-radius: var(--r-tile);
  border: 1px solid var(--border);
  object-fit: contain;
  padding: 0.25rem;
  background: var(--surface-2);
}

.cline__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cline__unit {
  margin-top: 0.125rem;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.cline__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.4375rem;
}

.cline__price {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.cline__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
}

.cline__rm {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  color: var(--text-subtle);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.cline__rm:hover {
  background: var(--alert-soft);
  color: var(--alert);
}

.stepper--sm {
  height: 1.875rem;
  background: var(--surface-3);
  color: var(--text-strong);
}

.stepper--sm .stepper__btn:hover {
  background: rgb(0 0 0 / 0.06);
}

.stepper--sm .stepper__btn:active {
  background: rgb(0 0 0 / 0.1);
}

[data-theme="dark"] .stepper--sm .stepper__btn:hover {
  background: rgb(255 255 255 / 0.08);
}

/* ============================== SUMMARY ============================== */
.sum {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sum__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--fs-md);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.sum__row--save {
  color: var(--accent-text);
  font-weight: 600;
}

.sum__row--total {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-strong);
}

.freetag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--accent-text);
}

/* Free-delivery progress — a real threshold, not decoration */
.prog {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: var(--r-control);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.prog__text {
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--accent-text);
}

.prog__track {
  margin-top: 0.5rem;
  height: 5px;
  border-radius: var(--r-chip);
  background: var(--accent-soft-2);
  overflow: hidden;
}

.prog__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out-expo);
}

/* ============================== MODAL (quick view) ============================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) ease, visibility var(--dur) ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(88dvh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.985);
  transition: transform var(--dur-slow) var(--ease-out-expo);
}

.modal.is-open .modal__panel {
  transform: none;
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
}

.modal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow-y: auto;
}

@media (min-width: 768px) {
  .modal__grid {
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
  }
}

.modal__media {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .modal__media {
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--border);
    min-height: 100%;
  }
}

.modal__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2rem;
  background: #fff;
}

.modal__info {
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

@media (min-width: 768px) {
  .modal__info {
    padding: 1.75rem;
  }
}

.modal__cat {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  align-self: flex-start;
  padding: 0.25rem 0.5625rem;
  border-radius: var(--r-chip);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: 600;
}

.modal__title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.16;
}

.modal__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal__now {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.032em;
  font-variant-numeric: tabular-nums;
}

.modal__was {
  font-size: var(--fs-md);
  color: var(--text-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.modal__save {
  padding: 0.1875rem 0.5rem;
  border-radius: var(--r-chip);
  background: var(--alert-soft);
  color: var(--alert);
  font-size: var(--fs-2xs);
  font-weight: 700;
}

.modal__desc {
  font-size: var(--fs-md);
  color: var(--text-muted);
  line-height: 1.62;
  max-width: 52ch;
}

/* Spec grid: 2-col cards, NOT a hairline spec table */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.spec {
  padding: 0.625rem 0.75rem;
  border-radius: var(--r-tile);
  background: var(--surface-3);
}

.spec__k {
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.spec__v {
  margin-top: 0.1875rem;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.modal__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.25rem;
  flex-wrap: wrap;
}

/* Variant picker */
.variants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.variant {
  padding: 0.4375rem 0.75rem;
  border-radius: var(--r-control);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text);
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease,
    color var(--dur-fast) ease;
}

.variant:hover {
  border-color: var(--border-strong);
}

.variant[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ============================== FILTER PANEL ============================== */
.fgroup + .fgroup {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.fgroup__title {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.fopts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.fopt {
  padding: 0.4375rem 0.6875rem;
  border-radius: var(--r-chip);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease,
    color var(--dur-fast) ease;
}

.fopt:hover {
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.fopt[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* Range */
.range {
  width: 100%;
  appearance: none;
  height: 4px;
  border-radius: var(--r-chip);
  background: var(--surface-3);
  margin-top: 0.75rem;
}

.range::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 3px solid var(--surface);
}

.range:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.range__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Toggle switch */
.switchrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6875rem 0;
  width: 100%;
  text-align: left;
}

.switchrow + .switchrow {
  border-top: 1px solid var(--border-faint);
}

/* Label + note stack as a block. These rows are intentionally two lines. */
.switchrow__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.switchrow__label {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-strong);
}

.switchrow__note {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.switch {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  border-radius: var(--r-chip);
  background: var(--surface-3);
  border: 1px solid var(--border);
  transition: background-color var(--dur) ease, border-color var(--dur) ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-spring);
}

 .switchrow[aria-pressed="true"] .switch {
  background: var(--accent);
  border-color: var(--accent);
}

.switchrow[aria-pressed="true"] .switch::after {
  transform: translateX(18px);
}

/* ============================== BOTTOM NAV ============================== */
.botnav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-bottombar);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 1024px) {
  .botnav {
    display: none;
  }
}

.botnav__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 560px;
  margin-inline: auto;
}

.botnav__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 58px;
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
}

.botnav__btn[aria-current="page"] {
  color: var(--accent);
}

.botnav__label {
  font-size: var(--fs-3xs);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.botnav__badge {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(2px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-chip);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-3xs);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.botnav__badge[data-empty="true"] {
  display: none;
}

/* ============================== TOASTS ============================== */
.toaster {
  position: fixed;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(400px, calc(100vw - 2rem));
  pointer-events: none;
}

@media (min-width: 1024px) {
  .toaster {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    transform: none;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6875rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--r-control);
  background: var(--text-strong);
  color: var(--text-invert);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-md);
  font-weight: 500;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity var(--dur) ease, transform var(--dur) var(--ease-spring);
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast__icon {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.14);
  flex-shrink: 0;
}

[data-theme="dark"] .toast__icon {
  background: rgb(0 0 0 / 0.2);
}

.toast__msg {
  flex: 1;
  min-width: 0;
}

.toast__act {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: inherit;
  opacity: 0.92;
}

.toast--ok .toast__icon {
  background: rgb(255 255 255 / 0.16);
  color: #8ce6ae;
}

/* ============================== FOOTER ============================== */
.footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

@media (min-width: 1024px) {
  .footer {
    margin-top: 2rem;
  }
}

.footer__inner {
  padding-block: 2rem;
}

@media (min-width: 768px) {
  .footer__inner {
    padding-block: 2.75rem;
  }
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .footer__top {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
  }
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.footer__blurb {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 42ch;
}

.footer__addr {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.875rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.footer__coltitle {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5625rem;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
  width: fit-content;
}

.footer__link:hover {
  color: var(--accent-text);
}

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
}

.footer__copy {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.footer__socials {
  display: flex;
  gap: 0.375rem;
}

.social {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-tile);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease,
    background-color var(--dur-fast) ease;
}

.social:hover {
  border-color: var(--border-strong);
  color: var(--text-strong);
  background: var(--surface-2);
}

/* ============================== ORDERS LIST ============================== */
.order {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}

.order:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.order + .order {
  margin-top: 0.625rem;
}

.order__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-tile);
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.order__body {
  flex: 1;
  min-width: 0;
}

.order__id {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.order__meta {
  margin-top: 0.125rem;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.25rem 0.5625rem;
  border-radius: var(--r-chip);
  font-size: var(--fs-2xs);
  font-weight: 700;
  white-space: nowrap;
}

.badge--ok {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.badge--pending {
  background: var(--surface-3);
  color: var(--text-muted);
}

.order__amt {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

/* ============================== REVEAL ANIMATION ==============================
   IntersectionObserver-driven. Motivated: reveals shelf order on first paint.
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease-out-expo),
    transform var(--dur-slow) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Print */
@media print {
  .header,
  .botnav,
  .toaster,
  .drawer,
  .scrim,
  .modal {
    display: none !important;
  }
}
/* Responsive alignment refinements; preserve the existing storefront layout. */
[hidden] { display: none !important; }
:root { --header-h: 115px; }
#catalog, #ordTitle, #top { scroll-margin-top: calc(var(--header-h) + 16px); }
.hero { margin-top: var(--page-start); }
.header__actions { flex-shrink: 0; }
.brand__verified { color: var(--accent-text); }
.trust__cell > span:last-child { min-width: 0; }
.trust__cell { align-items: flex-start; }
.trust__icon { align-self: center; }
.card { min-width: 0; }
.card__frame { flex-shrink: 0; }
.card__foot { align-items: center; min-height: 2.75rem; }
.card__price { column-gap: 0.3rem; row-gap: 0; }
.card__flag { background: var(--accent); color: var(--on-accent); }
.card__flag--out { background: var(--text-strong); color: var(--surface); }
.btn-wa { background: var(--accent); color: var(--on-accent); }
.botnav__btn[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.toast--ok .toast__icon { color: #f5cf28; }
.brand__mark img { object-fit: contain; background: #fff; }
.footer__brand .brand__meta { display: block; white-space: normal; }
.footer__addr .icon { margin-top: 0.1rem; }
.footer { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.modal__media { flex-shrink: 0; }
.modal__info { min-height: 0; }
.drawer__body { min-height: 0; }
@media (min-width: 900px) {
  :root { --header-h: 73px; }
  .lg-only-hide { display: none; }
  .header .shell { grid-template-columns: minmax(230px, auto) minmax(0, 1fr) auto; }
}
@media (min-width: 1024px) {
  .footer { padding-bottom: 0; }
  .grid-products { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .grid-rail { grid-auto-columns: calc((100% - 5rem) / 5); gap: 1.25rem; }
}
@media (min-width: 768px) {
  .modal__grid { min-height: 0; }
  .modal__media img { position: absolute; inset: 0; }
}
@media (max-width: 767px) {
  .trust__cell { padding: 0.75rem; gap: 0.5rem; }
  .sec__head { align-items: flex-start; }
  .sec__head > div { min-width: 0; }
  .sec__link { flex-shrink: 0; padding-top: 0.15rem; }
  .toolbar { align-items: flex-start; }
  .toolbar__right { flex-wrap: wrap; }
  .hero__media { height: auto; min-height: 270px; display: grid; align-items: end; }
  .hero__img { position: absolute; inset: 0; }
  .hero__body { position: relative; padding-top: 4.5rem; }
  .hero__title { max-width: 25ch; }
  .hero__sub { max-width: 42ch; }
  .hero__img { object-position: 65% center; }
  .hero__scrim { background: linear-gradient(to top, rgb(12 11 9 / .92), rgb(12 11 9 / .38)); }
  .card__foot { flex-wrap: wrap; align-items: flex-end; row-gap: 0.4rem; }
  .card__price { flex: 1 0 3.5rem; }
  .card__act { margin-left: auto; }
  .card__img { padding: 0.75rem; }
  .order { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: 0.5rem; }
  .order .badge { grid-column: 2; grid-row: 2; justify-self: start; }
  .order__amt { grid-column: 3; grid-row: 1 / 3; }
  .order__icon { grid-row: 1 / 3; }
}
@media (max-width: 479px) {
  :root { --header-h: 119px; }
  .header__row { gap: 0.5rem; height: 64px; }
  #openFiltersTop { display: none; }
  .header__actions { gap: 0; }
  .header__actions .iconbtn, .cartbtn { width: 2rem; height: 2.5rem; }
  .brand { gap: 0.5rem; }
  .brand__meta { font-size: 0.625rem; gap: 0.25rem; }
  .brand__name { font-size: 0.875rem; }
  .brand__mark { width: 36px; height: 36px; }
  .toolbar__right { width: 100%; justify-content: space-between; }
  .select { flex: 1; max-width: 210px; }
  .select select { width: 100%; min-width: 0; }
  .trust__icon { width: 1.75rem; height: 1.75rem; }
  .trust__label { font-size: 0.6875rem; }
  .trust__note { font-size: 0.625rem; }
  .sec__head { gap: 0.625rem; }
  .sec__title { font-size: 1rem; }
  .sec__sub { font-size: 0.6875rem; }
  .card__foot { flex-direction: column; align-items: stretch; }
  .card__price { flex: none; min-height: 1.5rem; }
  .card__act { margin-left: 0; }
  .card__act > .addbtn, .card__act > .stepper { width: 100%; justify-content: center; height: 2.5rem; }
  .stepper__btn { flex: 1; }
  .is-list .card__foot { flex-direction: row; }
  .cline { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 0.5rem; }
  .cline__img { width: 48px; height: 48px; }
}
@media (max-width: 359px) {
  .header__actions > a { display: none; }
  .brand__meta > span:last-child, .brand__meta > span[aria-hidden] { display: none; }
  .trust__cell { padding: 0.625rem; gap: 0.375rem; }
  .trust__icon { width: 1.5rem; height: 1.5rem; }
}
/* Recent orders: compact receipt cards, with a single shared baseline. */
.orders-section { padding: 1.25rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card); scroll-margin-top: calc(var(--header-h) + 80px); }
#ordTitle { scroll-margin-top: calc(var(--header-h) + 96px); }
.orders-section .sec__head { margin-bottom: 1rem; align-items: center; }
.orders-section .sec__title { display: flex; align-items: center; gap: .5rem; }
.orders-section .sec__title::before { content: ''; width: .3rem; height: 1.125rem; border-radius: 2px; background: var(--accent); }
#orderList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
#orderList > .empty { grid-column: 1 / -1; }
.order-receipt { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; padding: 1rem; border-radius: 12px; border-top: 3px solid var(--accent); background: var(--surface); box-shadow: var(--shadow-xs); }
.order-receipt + .order-receipt { margin-top: 0; }
.order-receipt__top { display: flex; align-items: center; gap: .625rem; min-width: 0; }
.order-receipt .order__icon { width: 2.375rem; height: 2.375rem; border-radius: 9px; }
.order-receipt .order__body { min-width: 0; }
.order-receipt .order__id { font-size: .875rem; white-space: nowrap; }
.order-receipt .order__meta { font-size: .625rem; }
.order-receipt .badge { font-size: .625rem; gap: .25rem; padding: .25rem .375rem; margin-left: auto; }
.order-receipt__details { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 1rem 0 .875rem; color: var(--text-muted); font-size: .75rem; }
.order-receipt__details > span { display: inline-flex; align-items: center; gap: .375rem; }
.order-receipt__details .icon { color: var(--text-muted); width: .875rem; height: .875rem; }
.order-receipt__total { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; border-top: 1px dashed var(--border-strong); padding-top: .75rem; margin-top: auto; }
.order-receipt__total > span { font-size: .6875rem; color: var(--text-muted); }
.order-receipt .order__amt { font-size: 1.375rem; letter-spacing: -.04em; }
@media (max-width: 1100px) and (min-width: 768px) {
  .order-receipt__top { flex-wrap: wrap; }
  .order-receipt .badge { margin-left: 3rem; }
}
@media (max-width: 767px) {
  .orders-section { padding: 1rem; }
  #orderList { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .order-receipt { padding: .875rem 1rem; }
  .order-receipt__details { padding: .75rem 0; }
  .order-receipt .order__amt { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .order-receipt:hover { border-color: var(--accent-border); transform: translateY(-2px); }
  .order-receipt { transition: transform var(--dur) ease, border-color var(--dur) ease, box-shadow var(--dur) ease; }
}
/* Product shelf spacing and direct product entry. */
.card__media { display: block; width: 100%; text-align: left; }
.card__body { padding: .75rem 0 0; }
.card__name button { display: block; width: 100%; text-align: left; font: inherit; color: inherit; line-height: inherit; }
.card__name button:hover { color: var(--accent-text); }
.card__quick { flex-direction: row; gap: .25rem; top: .5rem; right: .5rem; }
.quickbtn { width: 1.875rem; height: 1.875rem; }
.card__img { padding: 2.25rem 1rem 1rem; }
.grid-rail { padding: 0 0 .75rem; scroll-padding-inline: 0; }
.grid-products { padding-inline: 0; }
.card__unit { column-gap: .5rem; row-gap: .25rem; }
.card__foot { gap: .625rem; }
@media (min-width: 1024px) { .grid-rail { grid-auto-columns: calc((100% - 5rem) / 5); } }
/* Product details: one scroll surface with a persistent purchase row. */
.modal { background: rgb(28 26 23 / .46); backdrop-filter: blur(5px); }
.modal__panel { width: min(960px, 100%); max-height: min(90dvh, 780px); border: 0; border-radius: 22px; }
.modal__grid { overflow-y: auto; align-items: start; max-height: min(90dvh, 780px); grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.modal__media { position: sticky; top: 0; aspect-ratio: auto; min-height: 100%; height: 100%; background: #fff; border: 0; border-right: 1px solid var(--border-faint); }
.modal__media img { position: static; width: 100%; height: 520px; max-height: 68dvh; padding: 3.5rem 2rem; object-fit: contain; }
.product-photo-note { display: flex; align-items: center; justify-content: center; gap: .5rem; font-size: .75rem; color: #6f6759; padding: .75rem; }
.modal__info { overflow: visible; padding: 2rem; padding-top: 2.5rem; gap: 1rem; min-width: 0; }
.modal__cat { background: var(--accent-soft); color: var(--accent-text); }
.modal__title { font-size: clamp(1.375rem, 2.2vw, 1.875rem); line-height: 1.18; max-width: 22ch; }
.product-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: .75rem; }
.product-unit-price { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.product-unit-price > strong { font-size: 1.875rem; letter-spacing: -.04em; color: var(--text-strong); }
.product-unit-price s { font-size: .875rem; color: var(--text-muted); }
.product-tax { flex-basis: 100%; font-size: .6875rem; color: var(--text-muted); margin-top: -.25rem; }
.modal__desc { font-size: .8125rem; line-height: 1.7; }
.product-quantity { border: 0; padding: 0; margin: .25rem 0 0; min-width: 0; }
.product-quantity legend { font-size: .8125rem; font-weight: 700; color: var(--text-strong); width: 100%; margin-bottom: .625rem; }
.product-quantity legend span { float: right; font-size: .6875rem; font-weight: 400; color: var(--text-muted); }
.quantity-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.quantity-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 66px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: .5rem .125rem; }
.quantity-choice strong { font-size: .75rem; color: var(--text-strong); }
.quantity-choice span { font-size: .625rem; color: var(--text-muted); }
.quantity-choice:hover { border-color: var(--accent-border); }
.quantity-choice[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.product-details { border-block: 1px solid var(--border-faint); }
.product-details summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: .875rem 0; font-size: .8125rem; font-weight: 600; color: var(--text-strong); list-style: none; }
.product-details summary::-webkit-details-marker { display: none; }
.product-details[open] summary .icon { transform: rotate(180deg); }
.product-details .specs { margin: 0 0 1rem; }
.spec__v { margin-left: 0; }
.product-delivery { display: flex; gap: .625rem; align-items: center; color: var(--accent-text); }
.product-delivery strong { display: block; font-size: .6875rem; font-weight: 600; }
.product-delivery small { display: block; margin-top: .125rem; font-size: .625rem; color: var(--text-muted); }
.modal__actions { position: sticky; bottom: -2rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .625rem; padding: 1rem 0 1.5rem; margin: 0 0 -1rem; background: var(--surface); border-top: 1px solid var(--border-faint); z-index: 1; }
.product-selection { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.product-selection span { font-size: .75rem; color: var(--text-muted); }
.product-selection strong { font-size: 1.25rem; color: var(--text-strong); }
.product-add { height: 2.875rem; }
.product-save { height: 2.875rem; width: 2.875rem; padding: 0; }
.modal__close { background: var(--surface); top: .75rem; right: .75rem; }
@media (max-width: 767px) {
  .modal { padding: .75rem; }
  .modal__panel, .modal__grid { max-height: 92dvh; }
  .modal__grid { grid-template-columns: minmax(0, 1fr); }
  .modal__media { position: relative; min-height: 0; height: auto; border-right: 0; border-bottom: 1px solid var(--border-faint); }
  .modal__media img { height: 205px; max-height: none; padding: 1.75rem 3rem .75rem; }
  .product-photo-note { padding: .375rem .75rem .75rem; font-size: .6875rem; }
  .modal__info { padding: 1.25rem; gap: .875rem; }
  .modal__actions { bottom: -1.25rem; padding-bottom: 1.25rem; margin-bottom: -.75rem; }
  .modal__title { font-size: 1.5rem; }
  .card__body { padding-inline: 0; }
}
@media (max-width: 359px) {
  .modal__info { padding: 1rem; }
  .quantity-choices { gap: .375rem; }
  .quantity-choice strong { font-size: .6875rem; }
  .modal__actions { bottom: -1rem; }
}
/* Compact category-to-shelf spacing and pack size selection. */
.catbar .rail { padding-block: 0; }
#catalog + .sec { margin-top: .75rem; }
.card__pack { display: flex; align-items: center; justify-content: space-between; gap: .375rem; width: 100%; padding: .4rem .5rem; margin-top: .375rem; border: 1px solid var(--border); border-radius: 7px; font-size: .6875rem; color: var(--text-strong); background: var(--surface); }
.card__pack > span:last-child { display: inline-flex; align-items: center; gap: .375rem; color: var(--text-muted); font-size: .625rem; }
.card__pack:hover { border-color: var(--accent-border); background: var(--accent-soft); }
.card__unit { margin-top: .4rem; }
.pack-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.pack-choice { display: flex; flex-direction: column; align-items: flex-start; gap: .125rem; text-align: left; padding: .625rem .75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-height: 104px; }
.pack-choice strong { font-size: .875rem; color: var(--text-strong); }
.pack-choice > span { font-size: .625rem; color: var(--text-muted); }
.pack-choice b { margin-top: .375rem; font-size: .8125rem; color: var(--text-strong); }
.pack-choice small { font-size: .5625rem; color: var(--text-muted); }
.pack-choice[aria-pressed="true"] { border-color: #b79712; background: var(--accent-soft); box-shadow: inset 0 0 0 1px #b79712; }
.pack-choice:hover { border-color: #b79712; }
.pack-choice:disabled { opacity: .5; cursor: not-allowed; }
.product-count { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-block: .125rem; }
.product-count strong { display: block; font-size: .8125rem; color: var(--text-strong); }
.product-count small { display: block; font-size: .6875rem; color: var(--text-muted); margin-top: .125rem; }
.product-count__stepper { display: grid; grid-template-columns: 36px 32px 36px; height: 36px; align-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.product-count__stepper button { display: grid; place-items: center; height: 100%; border-radius: 8px; }
.product-count__stepper button:hover { background: var(--accent-soft); }
.product-count__stepper button:disabled { color: var(--text-subtle); opacity: .45; cursor: not-allowed; }
.product-count__stepper output { text-align: center; font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.product-photo-caption { display: block; text-align: center; font-size: .625rem; color: #6f6759; padding: 0 .75rem 1rem; }
.product-photo-note { padding-bottom: .25rem; }
.product-quantity legend { margin-bottom: .5rem; }
@media (max-width: 767px) {
  .pack-choice { padding: .5rem; min-height: 98px; }
  .modal__media img { height: 175px; }
  .modal__info { gap: .75rem; }
}
@media (max-width: 359px) {
  .pack-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card__pack { padding-inline: .375rem; }
  .card__pack > span:last-child { gap: .2rem; }
}
.pack-choices:not(:has(> :nth-child(3))), .pack-choices:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pack-choice:only-child { grid-column: 1 / -1; min-height: 76px; display: grid; grid-template-columns: 1fr auto; column-gap: .75rem; }
.pack-choice:only-child > strong { grid-column: 1; grid-row: 1; }
.pack-choice:only-child > span { grid-column: 1; grid-row: 2; }
.pack-choice:only-child > b { grid-column: 2; grid-row: 1; margin: 0; }
.pack-choice:only-child > small { grid-column: 2; grid-row: 2; }
/* Fit the product chooser comfortably within a laptop viewport. */
.modal__info { padding: 1.5rem; padding-top: 2rem; gap: .625rem; }
.modal__title { font-size: clamp(1.25rem, 2vw, 1.625rem); }
.modal__media img { height: clamp(280px, 44dvh, 420px); padding: 2rem; }
.product-photo-note { padding-top: .5rem; }
.product-photo-caption { padding-bottom: .75rem; }
.product-unit-price > strong { font-size: 1.625rem; }
.product-quantity { margin-top: 0; }
.pack-choices { gap: .375rem; }
.pack-choice, .pack-choice:only-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .125rem .375rem; min-height: 58px; padding: .5rem .625rem; align-content: center; }
.pack-choice > strong { grid-column: 1; grid-row: 1; font-size: .8125rem; }
.pack-choice > span { grid-column: 1; grid-row: 2; font-size: .625rem; }
.pack-choice > b { grid-column: 2; grid-row: 1; margin: 0; font-size: .8125rem; text-align: right; }
.pack-choice > small { grid-column: 2; grid-row: 2; font-size: .5625rem; text-align: right; }
.product-count { padding-block: 0; }
.modal__desc { font-size: .75rem; line-height: 1.55; }
.product-details summary { padding-block: .625rem; font-size: .75rem; }
.modal__actions { bottom: -1.5rem; margin: 0; padding: .625rem 0 0; gap: .5rem; }
.product-selection strong { font-size: 1.125rem; }
.product-add, .product-save { height: 2.5rem; }
.product-save { width: 2.5rem; }
@media (max-width: 767px) {
  .modal__info { padding: 1rem; gap: .5rem; }
  .modal__media img { height: 120px; padding: .75rem 3rem .25rem; }
  .product-photo-note { padding: .25rem .5rem; font-size: .625rem; }
  .product-photo-caption { padding-bottom: .5rem; font-size: .5625rem; }
  .modal__title { font-size: 1.25rem; }
  .modal__actions { bottom: -1rem; padding-bottom: .25rem; }
  .pack-choice { min-height: 54px; padding: .375rem .5rem; }
  .pack-choice > small { font-size: .5625rem; }
}
html:has(body.is-locked) { overflow: hidden; }
@media (min-width: 768px) and (max-height: 740px) {
  .modal__info { padding: 1.25rem; gap: .5rem; }
  .pack-choice { min-height: 54px; }
  .modal__actions { bottom: -1.25rem; }
  .product-details summary { padding-block: .5rem; }
}
.product-details[open] .modal__desc { margin-bottom: .75rem; }
@media (max-width: 767px) {
  .modal__media img { height: 96px; }
}
/* Mobile product sheet: give the photograph a proper visual stage. */
@media (max-width: 767px) {
  .modal { padding: .5rem; }
  .modal__panel, .modal__grid { max-height: calc(100dvh - 1rem); }
  .modal__panel { border-radius: 20px; }
  .modal__media { overflow: hidden; background: #fff; }
  .modal__media img { width: 100%; height: clamp(175px, 27dvh, 235px); padding: .75rem 1.5rem .25rem; object-fit: contain; }
  .modal__media--wide img { height: clamp(145px, 21dvh, 180px); padding: 0; object-fit: cover; object-position: center; }
  .modal__media .product-photo-note { display: none; }
  .product-photo-caption { padding: .125rem .75rem .5rem; font-size: .5625rem; }
  .modal__info { padding: .875rem 1rem 1rem; gap: .5rem; }
  .modal__title { font-size: 1.3125rem; line-height: 1.2; }
  .modal__cat { padding: .1875rem .5rem; font-size: .625rem; }
  .product-unit-price { column-gap: .5rem; row-gap: .25rem; }
  .product-delivery { gap: .375rem; }
  .product-delivery strong { display: none; }
  .product-delivery small { margin-top: 0; font-size: .625rem; }
  .product-delivery > .icon { width: 1rem; height: 1rem; }
  .modal__actions { bottom: -1rem; padding-top: .5rem; padding-bottom: .25rem; }
  .product-add, .product-save { height: 2.75rem; }
  .product-save { width: 2.75rem; }
}
@media (max-width: 767px) and (max-height: 740px) {
  .modal__media img { height: 170px; }
  .modal__media--wide img { height: 140px; }
  .modal__info { gap: .375rem; }
}
@media (max-width: 767px) {
  .modal__media--wide { padding: 1.25rem .75rem 0; }
}
@media (max-width: 767px) and (max-height: 740px) {
  .product-delivery { display: none; }
}
/* Shared spacing: page gutters belong only to .shell, never its children. */
@media (min-width: 1024px) {
  :root { --section-gap: 2rem; --panel-padding: 1.5rem; }
}
.header .shell, main.shell, .footer .shell { padding-inline: var(--gutter); }
.catbar { width: 100%; min-width: 0; }
.catbar .rail { width: 100%; margin-inline: 0; padding-inline: 0; }
.sec, .trust, .hero { min-width: 0; }
.sec__head { margin-bottom: 1rem; }
.toolbar { margin-bottom: 1rem; }
.orders-section { padding: var(--panel-padding); }
.footer { margin-top: var(--section-gap); }
.footer__inner { padding-block: var(--section-gap); }
.footer__bottom { margin-top: var(--section-gap); padding-top: 1rem; }
.footer__addr { gap: .5rem; }
.modal__info { padding-inline: var(--panel-padding); }
.drawer__head, .drawer__body, .drawer__foot { padding-inline: var(--panel-padding); }
@media (max-width: 767px) {
  .trust__cell { padding: .75rem; }
  .modal__info { padding-inline: var(--panel-padding); }
}
@media (max-width: 767px) {
  .modal { padding: var(--gutter); }
  .modal__panel, .modal__grid { max-height: calc(100dvh - 2 * var(--gutter)); }
}
/* Live search puts matching products directly below the search controls. */
.is-searching .hero, .is-searching .trust, .is-searching .orders-section { display: none; }
.is-searching .catbar { margin-top: 1rem; }
.is-searching #allTitle { scroll-margin-top: calc(var(--header-h) + 72px); overflow-wrap: anywhere; }
/* Use one consistent clear action instead of the browser's extra search cross. */
.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-decoration,
.search__input::-webkit-search-results-button,
.search__input::-webkit-search-results-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search__input::-ms-clear { display: none; width: 0; height: 0; }
/* Order history as printed shop slips, using only the recorded order facts. */
#orderList { gap: 1.25rem; padding-bottom: .5rem; }
.order-slip { position: relative; min-width: 0; display: flex; flex-direction: column; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 2px 2px 0 0; box-shadow: 0 5px 12px rgb(85 70 20 / .06); font-family: var(--font-mono); font-size: .6875rem; color: var(--text); }
.order-slip::after { content: ''; position: absolute; left: -1px; right: -1px; bottom: -9px; height: 10px; background: linear-gradient(135deg, var(--surface) 25%, transparent 25%) -6px 0, linear-gradient(225deg, var(--surface) 25%, transparent 25%) -6px 0; background-size: 12px 12px; background-repeat: repeat-x; filter: drop-shadow(0 1px 0 var(--border)); }
.order-slip__shop { display: flex; flex-direction: column; gap: .25rem; text-align: center; padding-bottom: 1rem; border-bottom: 1px dashed var(--border-strong); }
.order-slip__shopname { font-size: .875rem; font-weight: 800; letter-spacing: .08em; color: var(--text-strong); }
.order-slip__shop > span:nth-child(2) { color: var(--text-muted); font-size: .625rem; }
.order-slip__caption { align-self: center; margin-top: .375rem; padding: .1875rem .5rem; background: var(--accent-soft); color: var(--accent-text); font-size: .5625rem; letter-spacing: .15em; }
.order-slip__reference { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-block: 1rem .75rem; }
.order-slip__label { display: block; font-size: .5625rem; color: var(--text-muted); margin-bottom: .25rem; }
.order-slip__reference h3 { font-family: inherit; font-size: .875rem; letter-spacing: 0; font-weight: 700; }
.order-slip__stamp { display: inline-flex; align-items: center; gap: .25rem; max-width: 48%; padding: .25rem .375rem; border: 1px solid var(--border-strong); color: var(--text-muted); font-size: .5625rem; line-height: 1.4; text-transform: uppercase; letter-spacing: .025em; transform: rotate(-4deg); }
.order-slip__stamp .icon { width: .75rem; height: .75rem; }
.order-slip__stamp.is-delivered { border-color: var(--accent-border); color: var(--accent-text); box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px var(--accent-soft); }
.order-slip__facts { display: grid; gap: .375rem; margin: 0; padding: 0 0 .875rem; }
.order-slip__facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.order-slip__facts dt { color: var(--text-muted); }
.order-slip__facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.order-slip__total { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-block: 1px dashed var(--border-strong); padding-block: .75rem; margin-top: auto; }
.order-slip__total > span { font-weight: 700; color: var(--text-strong); font-size: .625rem; letter-spacing: .025em; }
.order-slip__total strong { font-size: 1.5rem; color: var(--text-strong); font-weight: 700; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.order-slip__foot { display: flex; flex-direction: column; align-items: center; padding-top: 1rem; gap: .375rem; }
.order-slip__barcode { display: block; width: 126px; height: 24px; opacity: .72; background: repeating-linear-gradient(90deg, var(--text-strong) 0 1px, transparent 1px 3px, var(--text-strong) 3px 5px, transparent 5px 6px, var(--text-strong) 6px 7px, transparent 7px 10px, var(--text-strong) 10px 13px, transparent 13px 15px, var(--text-strong) 15px 16px, transparent 16px 20px, var(--text-strong) 20px 22px, transparent 22px 25px); }
.order-slip__code { font-size: .5rem; letter-spacing: .06em; color: var(--text-muted); }
.order-slip__thanks { font-family: var(--font-sans); font-size: .625rem; color: var(--text-muted); margin-top: .125rem; }
@media (max-width: 767px) {
  #orderList { gap: 1.5rem; }
  .order-slip { padding: 1rem; }
}
/* Compact, swipeable order-slip carousel. */
.orders-section .sec__head { gap: 1rem; align-items: center; }
.order-slider__controls { display: flex; align-items: center; gap: .375rem; flex-shrink: 0; }
.order-slider__status { font-size: .6875rem; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-right: .25rem; white-space: nowrap; }
.order-slider__arrow { width: 2rem; height: 2rem; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; color: var(--text-strong); }
#ordersPrev .icon { transform: rotate(180deg); }
.order-slider__arrow:disabled { opacity: .35; cursor: default; }
.order-slider__arrow:not(:disabled):hover { background: var(--accent-soft); border-color: var(--accent-border); }
#orderList { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 2rem) / 3); gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .125rem 0 .75rem; }
#orderList::-webkit-scrollbar { display: none; }
.order-slip { padding: .875rem; scroll-snap-align: start; scroll-snap-stop: normal; }
.order-slip__shop { gap: .125rem; padding-bottom: .625rem; }
.order-slip__shopname { font-size: .75rem; }
.order-slip__shop > span:nth-child(2) { display: none; }
.order-slip__caption { margin-top: .25rem; font-size: .5rem; padding: .125rem .375rem; }
.order-slip__reference { padding-block: .625rem .5rem; }
.order-slip__label { margin-bottom: .125rem; font-size: .5rem; }
.order-slip__reference h3 { font-size: .8125rem; }
.order-slip__stamp { font-size: .5rem; padding: .1875rem .25rem; }
.order-slip__facts { gap: .25rem; padding-bottom: .5rem; font-size: .625rem; }
.order-slip__total { padding-block: .5rem; }
.order-slip__total strong { font-size: 1.25rem; }
.order-slip__total > span { font-size: .5625rem; }
.order-slip__foot { padding-top: .625rem; gap: .25rem; }
.order-slip__barcode { height: 18px; width: 108px; }
.order-slip__thanks { display: none; }
@media (min-width: 640px) and (max-width: 900px) {
  #orderList { grid-auto-columns: calc((100% - 1rem) / 2); }
}
@media (max-width: 639px) {
  #orderList { grid-auto-columns: min(260px, calc(100% - 24px)); gap: .75rem; }
  .orders-section .sec__head { flex-wrap: wrap; gap: .625rem; }
  .order-slider__controls { margin-left: auto; }
  .order-slip { padding: .75rem; }
}
.order-slip[role="button"] { cursor: pointer; }
.order-slip[role="button"]:hover { border-color: var(--accent-border); box-shadow: 0 4px 14px rgb(85 70 20 / .1); }
.order-slip[role="button"]:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -3px; }
.order-modal__panel { width: min(400px, 100%); border-radius: 14px; padding: 3.5rem 1.25rem 1.5rem; background: var(--surface-3); max-height: calc(100dvh - 2rem); overflow-y: auto; }
.order-modal__content { min-height: 0; }
.order-slip--expanded { padding: 1.25rem; cursor: default; }
.order-slip--expanded .order-slip__shopname { font-size: 1rem; }
.order-slip--expanded .order-slip__shop { padding-bottom: 1rem; }
.order-slip--expanded .order-slip__reference { padding-block: 1rem; }
.order-slip--expanded .order-slip__reference h3 { font-size: 1rem; }
.order-slip--expanded .order-slip__facts { font-size: .75rem; gap: .5rem; padding-bottom: 1rem; }
.order-slip--expanded .order-slip__total { padding-block: 1rem; }
.order-slip--expanded .order-slip__total strong { font-size: 1.75rem; }
.order-slip--expanded .order-slip__foot { padding-top: 1rem; }
.order-slip--expanded .order-slip__thanks { display: block; }
.order-slip__items { border-top: 1px dashed var(--border-strong); padding-block: .75rem; }
.order-slip__itemhead, .order-slip__item { display: flex; justify-content: space-between; gap: .75rem; padding-block: .375rem; }
.order-slip__itemhead { color: var(--text-muted); font-size: .5625rem; }
.order-slip__item strong, .order-slip__item small { display: block; }
.order-slip__item small { color: var(--text-muted); margin-top: .25rem; }
.order-slip__item b { white-space: nowrap; font-weight: 500; }
@media (max-width: 767px) {
  .modal--order .order-modal__panel { max-height: calc(100dvh - 2 * var(--gutter)); }
}
#orderList:has(> .empty) { display: block; }
/* Itemized receipt with a clear, persistent reorder action. */
.order-modal__panel { width: min(510px, 100%); padding: 3.25rem 1rem 0; background: var(--surface-3); }
.order-modal__content { overflow: visible; padding-bottom: 0; }
.order-slip--expanded { padding: 1.125rem; }
.order-slip--expanded .order-slip__shop { padding-bottom: .75rem; }
.order-slip--expanded .order-slip__reference { padding-block: .75rem; }
.order-slip--expanded .order-slip__facts { padding-bottom: .75rem; gap: .375rem; }
.order-slip__itemhead { padding: 0 0 .625rem; font-size: .5625rem; letter-spacing: .05em; }
.order-slip__item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: .625rem; align-items: center; padding-block: .625rem; border-bottom: 1px solid var(--border-faint); }
.order-slip__item > img, .order-slip__itemplaceholder { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 6px; }
.order-slip__itemplaceholder { display: grid; place-items: center; color: var(--text-muted); }
.order-slip__itemname { min-width: 0; }
.order-slip__itemname strong { font-family: var(--font-sans); font-size: .75rem; font-weight: 600; line-height: 1.35; color: var(--text-strong); }
.order-slip__itemname small { font-size: .625rem; line-height: 1.5; }
.order-slip__item > b { font-size: .75rem; font-variant-numeric: tabular-nums; }
.order-slip__sumrow { display: flex; justify-content: space-between; gap: .75rem; padding-top: .5rem; font-size: .6875rem; color: var(--text-muted); }
.order-slip__sumrow:first-of-type { margin-top: .5rem; }
.order-slip--expanded .order-slip__total { padding-block: .75rem; }
.order-slip--expanded .order-slip__total strong { font-size: 1.5rem; }
.order-slip--expanded .order-slip__foot { padding-top: .75rem; }
.order-slip__missing { font-family: var(--font-sans); font-size: .8125rem; color: var(--text-muted); line-height: 1.5; }
.order-modal__actions { position: sticky; bottom: 0; margin-top: 1rem; background: var(--surface-3); padding: .875rem 0 1rem; z-index: 2; }
.order-modal__actions > .btn { height: 2.75rem; }
.order-modal__actions > .btn:disabled { opacity: .5; cursor: not-allowed; }
.order-modal__actions p { font-size: .625rem; text-align: center; color: var(--text-muted); margin-top: .5rem; line-height: 1.5; }
.cart-reorder-note { padding: .75rem; background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 10px; font-size: .75rem; line-height: 1.5; color: var(--accent-text); margin-bottom: .5rem; }
@media (max-width: 479px) {
  .order-modal__panel { padding-inline: .75rem; }
  .order-slip--expanded { padding: .875rem; }
  .order-slip__item { grid-template-columns: 36px minmax(0, 1fr) auto; gap: .5rem; }
  .order-slip__item > img, .order-slip__itemplaceholder { width: 36px; height: 36px; }
  .order-slip__itemname strong { font-size: .6875rem; }
  .order-slip__itemname small { font-size: .5625rem; }
}
/* Receipt close control: compact circle with balanced edge spacing. */
.order-modal__panel > .modal__close {
  top: .75rem;
  right: .75rem;
  width: 1.875rem;
  height: 1.875rem;
  padding: 0;
  border-radius: 50%;
}
.order-modal__panel > .modal__close .icon {
  width: .875rem;
  height: .875rem;
}
/* Keep long receipts scrollable without a visible scrollbar. */
.order-modal__panel { scrollbar-width: none; -ms-overflow-style: none; }
.order-modal__panel::-webkit-scrollbar { display: none; width: 0; height: 0; }
.promise-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: .75rem;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
}
.promise-badge .icon { flex-shrink: 0; }
@media (max-width: 639px) {
  .promise-badge { padding: .4375rem .625rem; font-size: .6875rem; gap: .375rem; }
  .promise-badge .icon { width: .875rem; height: .875rem; }
}
/* Store promises sit inside the banner's bottom action row. */
.hero__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.125rem; }
.hero__bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hero__badges { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0; }
.hero__bottom .hero__cta { display: inline-flex; }
.hero__badges .promise-badge { font-size: .6875rem; padding: .4375rem .625rem; }
@media (max-width: 767px) {
  .hero__bottom { flex-direction: column; align-items: stretch; gap: .875rem; }
  .hero__badges { gap: .375rem; }
  .hero__badges .promise-badge { font-size: .625rem; gap: .3125rem; padding: .375rem .5rem; }
  .hero__bottom .hero__cta { align-self: flex-start; height: 2.5rem; }
  .hero__body { gap: 1rem; }
}
/* Anchor the banner copy at the top-left and its actions at the bottom. */
.hero__body {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
}
.hero__body > div:first-child { min-width: 0; align-self: flex-start; }
.hero__bottom { width: 100%; }
@media (max-width: 767px) {
  .hero__body { position: relative; inset: auto; padding: 1.25rem; min-height: 330px; gap: 2rem; }
  .hero__count { top: auto; bottom: 1.25rem; right: 1.25rem; }
}
/* Dark translucent badges retain contrast against the banner photograph. */
.hero__badges .promise-badge {
  background: rgb(20 19 15 / .7);
  border-color: rgb(255 255 255 / .28);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* Consistent banner inset and section rhythm on the shared page grid. */
.hero__body { padding: var(--panel-padding); }
@media (max-width: 767px) {
  .hero__body { padding: var(--panel-padding); }
  .hero__count { right: var(--panel-padding); bottom: var(--panel-padding); }
}
.hero__badges .promise-badge .icon { color: inherit; }
/* One product card contains the photo, title, pack selector and purchase row. */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}
.card__frame {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
.card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
.card:hover .card__frame { transform: none; border: 0; box-shadow: none; }
.card__body { padding: .75rem; }
.card__name { min-height: 2.64em; }
.card__pack { background: var(--surface-2); }
.card__foot { padding-top: .75rem; }
.grid-products { row-gap: 1rem; }
.is-list .card { padding: .75rem; }
.is-list .card__frame { border: 0; border-radius: 10px; }
.is-list .card__body { padding: 0; }
@media (max-width: 767px) {
  .card__body { padding: .75rem; }
}
