/* MM & Co. — styles (customer site + owner panel)
   Layout: mobile-first; white page, borderless product tiles on light grey (Bellroy-like).
   Palette: white, ink, soft grey photo tiles, logo plum #662854 (primary, from the MM & Co. logo), brass (price cuts).
   Single light theme by design. */
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #1c1d1c;
  --muted: #5d605d;
  --line: #e7e7e4;
  --line-strong: #cfd0cc;
  --green: #662854;
  --green-hover: #4f1e41;
  --green-soft: #f6edf3;
  --on-green: #ffffff;
  --brass: #8a5f10;
  --brass-soft: #f7efdc;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --img-bg: #f4f4f2;   /* same grey for category tiles and product tiles */
  --scrim: rgba(12, 18, 15, .55);
  --focus: #2f7dd1;

  --f-body: "Inter", "Noto Sans Malayalam", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 13px; --fs-sm: 14.5px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 26px;
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --hdr-h: 56px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: var(--fs-md); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
:root[data-ui-lang="ml"] body { line-height: 1.62; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.wrap {
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap.wide { max-width: none; }
@media (min-width: 900px) { .wrap.wide { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: var(--fs-md); font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn.primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: transparent; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.solid-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.quiet { border-color: transparent; background: transparent; padding: 0 10px; }
.btn.quiet:hover { background: var(--green-soft); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: var(--fs-sm); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { background: var(--green-soft); }

/* ---------- header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.hdr-row { display: flex; align-items: center; gap: 12px; min-height: var(--hdr-h); }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; margin-right: auto; min-width: 0; }
@media (min-width: 701px) {
  .hdr-row { gap: 16px; min-height: 64px; }
  .hdr-row:has(.hsearch) .brand { margin-right: 0; }
}
.brand-mark { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.brand-mark .amp { font-weight: 800; color: var(--green); }
.brand-sub { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; white-space: nowrap; }
.lang-sw { display: inline-flex; flex: none; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.lang-sw button {
  border: 0; background: transparent; padding: 0 10px; min-height: 34px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; color: var(--muted);
}
.lang-sw button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.home-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); background: var(--surface); }
.home-btn:hover { border-color: var(--ink); }
.home-btn .ic { width: 22px; height: 22px; }
@media (max-width: 479px) { .home-btn { width: 44px; padding: 0; justify-content: center; } .home-label { display: none; } .has-home .brand-sub { display: none; } }
.cart-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; text-decoration: none; }
.cart-btn:hover { background: var(--green-soft); }
.cart-btn .ic { width: 24px; height: 24px; }
.badge {
  position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--green); color: var(--on-green); font-size: 11px; font-weight: 700; display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-current="page"] { background: var(--green); border-color: var(--green); color: var(--on-green); }

.demo-bar { background: var(--brass-soft); color: var(--brass); font-size: var(--fs-xs); font-weight: 500; }
.demo-bar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-block: 6px; flex-wrap: wrap; }
.demo-bar a { font-weight: 700; }

/* ---------- main ---------- */
.main { padding-block: 18px 48px; min-height: 60vh; }
.intro { display: grid; gap: 4px; margin-bottom: 14px; }
/* home banner: a full-width area for the owner's own banner image; text sits in the empty space of the design */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; justify-items: center; background: var(--img-bg); margin: -18px 0 22px; padding-block: 48px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); min-height: 340px; overflow: hidden; }
.hero.has-banner { aspect-ratio: 8 / 3; min-height: 360px; background: var(--img-bg) var(--hero-bg) center / cover no-repeat; }
.hero-text { display: grid; gap: 10px; justify-items: center; text-align: center; min-width: 0; max-width: 640px; }
.hero.has-banner .hero-text { max-width: min(600px, 46%); }
.hero.align-left .hero-text { justify-self: start; justify-items: start; text-align: left; margin-left: 5%; }
.hero.align-right .hero-text { justify-self: end; justify-items: start; text-align: left; margin-right: 5%; }
.hero.align-left .hero-btns, .hero.align-right .hero-btns { justify-content: flex-start; }
.hero h1 { font-size: clamp(30px, 3.6vw, 52px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.hero-sub { font-size: clamp(16px, 1.5vw, 20px); max-width: 34ch; line-height: 1.5; }
.hero-meta { font-size: var(--fs-sm); color: var(--muted); }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.hero-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--green); background: transparent; color: var(--green); font-size: var(--fs-md); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.hero-btn:hover { background: var(--green-soft); }
.hero-btn.primary { background: var(--green); color: var(--on-green); }
.hero-btn.primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
/* white text for dark banners */
.hero.text-light h1, .hero.text-light .hero-sub { color: #ffffff; }
.hero.text-light .hero-meta { color: rgba(255, 255, 255, .85); }
.hero.text-light .hero-btn { border-color: #ffffff; color: #ffffff; }
.hero.text-light .hero-btn:hover { background: rgba(255, 255, 255, .14); }
.hero.text-light .hero-btn.primary { background: #ffffff; color: #1c1d1c; border-color: #ffffff; }
@media (max-width: 719px) {
  .hero { padding-block: 32px; min-height: 0; }
  /* phone banner (4:5): text at the top, centred — leave the top of the phone design empty */
  .hero.has-banner { aspect-ratio: 4 / 5; min-height: 0; align-items: start; background-image: var(--hero-bg-m); }
  .hero.has-banner .hero-text, .hero.align-left .hero-text, .hero.align-right .hero-text { max-width: 100%; justify-self: center; justify-items: center; text-align: center; margin: 0; }
  .hero.align-left .hero-btns, .hero.align-right .hero-btns { justify-content: center; }
}
.voice-wrap { position: relative; }
.voice-wrap input, .voice-wrap textarea { padding-right: 52px; }
.mic { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--green-soft); color: var(--green); display: grid; place-items: center; cursor: pointer; }
.voice-wrap.is-area .mic { top: 6px; transform: none; }
.mic:hover { background: var(--green); color: var(--on-green); }
.mic.on { background: var(--danger); color: #fff; animation: micpulse 1.2s ease-in-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .45); } 50% { box-shadow: 0 0 0 7px rgba(179, 38, 30, 0); } }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; }
.vchip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 6px 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; background: var(--surface); }
.vchip button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.vchip button:hover { background: var(--danger-soft); color: var(--danger); }
.vchip button .ic { width: 16px; height: 16px; }
.vadd { display: flex; gap: 8px; flex-wrap: wrap; }
.vadd input { flex: 1 1 200px; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); }
.vsuggs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vsugg { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px dashed var(--line-strong); border-radius: 999px; background: transparent; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; color: var(--ink); }
.vsugg:hover { border-style: solid; border-color: var(--ink); }
.banner-grid { display: grid; gap: 14px; align-items: start; }
@media (min-width: 620px) { .banner-grid { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); } }
.banner-grid .field { align-content: start; }
.banner-grid .field { min-width: 0; }
.banner-grid .banner-acts .btn { white-space: normal; text-align: left; min-height: 36px; height: auto; padding-block: 6px; }
.banner-prev { width: 100%; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--img-bg); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: var(--fs-xs); text-align: center; padding: 0; }
.banner-prev span { padding: 12px; }
.banner-prev img { width: 100%; height: 100%; object-fit: cover; }
.banner-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.banner-acts label { cursor: pointer; }
.intro-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.intro h1 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.01em; }
.intro p { color: var(--muted); font-size: var(--fs-sm); max-width: 60ch; }
/* header search: centred grey pill on computers, full-width bordered box on phones */
.hsearch { position: relative; flex: 1 1 auto; max-width: 620px; margin-inline: auto; min-width: 0; }
.hsearch .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.hsearch input {
  width: 100%; height: 44px; padding: 0 16px 0 42px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; color: var(--ink);
}
.hsearch input::placeholder { color: var(--muted); }
.hsearch input:focus { background: var(--surface); border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
.hsearch input::-webkit-search-cancel-button { cursor: pointer; }
@media (max-width: 700px) {
  .hdr-row:has(.hsearch) { flex-wrap: wrap; row-gap: 0; }
  .hsearch { order: 9; flex-basis: 100%; max-width: none; margin: 2px 0 10px; }
  .hsearch input { border-radius: 10px; background: var(--surface); border-color: var(--line-strong); padding-left: 40px; }
  .hsearch .ic { left: 12px; }
}
.grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.grid-head h2 { font-size: var(--fs-lg); font-weight: 700; }
.grid-head .count { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.gh-end { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.gh-orders { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--green); text-decoration: none; }
.gh-orders .ic { width: 17px; height: 17px; }
.gh-orders:hover { text-decoration: underline; }

/* Bellroy-style: each product is one grey tile (photo + text); thin white lines between tiles; grid runs edge to edge */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding-left: max(3px, env(safe-area-inset-left, 0px)); padding-right: max(3px, env(safe-area-inset-right, 0px)); }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding-left: max(4px, env(safe-area-inset-left, 0px)); padding-right: max(4px, env(safe-area-inset-right, 0px)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.main-full .empty { grid-column: 1 / -1; }

.card { display: flex; flex-direction: column; min-width: 0; background: var(--img-bg); }
.card-img { display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 10%; mix-blend-mode: multiply; }
/* gentle hover zoom on devices with a mouse; returns smoothly when the pointer leaves */
@media (hover: hover) and (pointer: fine) {
  .card-img img { transition: transform .7s cubic-bezier(.25, .46, .45, .94); transform-origin: 50% 50%; will-change: transform; backface-visibility: hidden; }
  .card:hover .card-img img { transform: scale(1.2); }
}
/* phones/tablets: press-to-zoom (class added by app.js while a finger is on the tile) */
@media (hover: none) {
  .card-img img { transition: transform .35s cubic-bezier(.25, .46, .45, .94); transform-origin: 50% 50%; backface-visibility: hidden; }
  .card.tz .card-img img { transform: scale(1.2); }
  .card a { -webkit-tap-highlight-color: transparent; }
  /* no long-press menu, link preview or text selection on tiles */
  .card, .card * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .card .qty input { -webkit-user-select: text; user-select: text; }
}
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 2px 12px 14px; flex: 1; }
.card-name { font-size: var(--fs-md); font-weight: 500; text-decoration: none; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-name:hover { text-decoration: underline; text-underline-offset: 3px; }
/* product name on the left, code on the right, first lines aligned */
.card-head { display: flex; align-items: first baseline; justify-content: space-between; gap: 10px; }
.card-head .card-name { flex: 1 1 auto; min-width: 0; -webkit-line-clamp: 3; }
.card-head .card-sku { flex: none; white-space: nowrap; }
.card-sku { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.card-desc { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-colours { font-size: var(--fs-sm); color: var(--muted); }
.card-foot { margin-top: auto; padding-top: 6px; display: grid; gap: 8px; }
.dots { display: flex; flex-wrap: wrap; gap: 0; margin: -2px 0 0 -5px; }
.dot { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; border-radius: 50%; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.dot span { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.dot[aria-pressed="true"] span { box-shadow: 0 0 0 2px var(--img-bg), 0 0 0 3.5px var(--ink); }
.vdot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); flex: none; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.price .now { font-weight: 600; font-size: var(--fs-md); }
.price.cut .now { color: var(--brass); }
.price .was { color: var(--muted); font-size: var(--fs-sm); text-decoration: line-through; }
.price.lg .now { font-size: var(--fs-2xl); }
.price.lg .was { font-size: var(--fs-md); }

.tag-out { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: var(--fs-sm); font-weight: 600; }

/* quantity stepper */
.qty { display: inline-grid; grid-template-columns: 38px minmax(44px, 1fr) 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); width: 100%; max-width: 180px; }
.qty button { border: 0; background: var(--green-soft); color: var(--green); display: grid; place-items: center; cursor: pointer; }
.qty button:hover { background: var(--green); color: var(--on-green); }
.qty input { width: 100%; min-width: 0; border: 0; border-inline: 1px solid var(--line); text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.card .qty { max-width: none; }

/* ---------- product page ---------- */
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); margin-bottom: 12px; min-height: 36px; }
.crumb:hover { color: var(--ink); }
.pdp { display: grid; gap: 20px; }
@media (min-width: 820px) { .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; } }
.gallery { display: grid; gap: 10px; min-width: 0; }
.g-main { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 4px; background: var(--img-bg); overflow: hidden; cursor: zoom-in; }
.g-main img { width: 100%; height: 100%; object-fit: contain; padding: 5%; mix-blend-mode: multiply; }
.g-zoom { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.92); color: #17201b; border: 1px solid #dbe2dd; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.g-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border-radius: 4px; border: 1px solid transparent; background: var(--img-bg); overflow: hidden; cursor: pointer; }
.g-thumbs button[aria-current="true"] { border: 2px solid var(--green); }
.g-thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pinfo { display: grid; gap: 14px; min-width: 0; }
.pinfo h1 { font-size: var(--fs-xl); font-weight: 700; }
.meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: var(--fs-sm); color: var(--muted); }
.stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock.in { color: #1f7a4d; }
.stock.out { color: var(--danger); }
.field-label { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 6px; display: block; }
.variants { display: flex; gap: 8px; flex-wrap: wrap; }
.variants label { position: relative; }
.variants input { position: absolute; opacity: 0; inset: 0; }
.variants span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; background: var(--surface); }
.variants input:checked + span { border: 2px solid var(--ink); padding: 0 13px; font-weight: 700; }
.variants input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.pdesc { color: var(--muted); max-width: 60ch; white-space: pre-line; }
.buy { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.buy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.in-order-note { font-size: var(--fs-sm); color: var(--green); font-weight: 600; }

/* ---------- order slip (cart) ---------- */
.page-title { font-size: var(--fs-xl); font-weight: 700; margin-bottom: 14px; }
.slip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); max-width: 760px; }
.slip-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px 12px; border-bottom: 2px solid var(--ink); }
.slip-top strong { font-size: var(--fs-md); letter-spacing: -0.01em; }
.slip-top span { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.slip-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; padding: 14px 16px; border-bottom: 1px dashed var(--line-strong); }
.slip-row.bad { background: var(--danger-soft); }
.slip-thumb { grid-row: span 2; width: 60px; height: 60px; border-radius: 4px; border: 0; background: var(--img-bg); overflow: hidden; }
.slip-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.slip-name { font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.slip-name:hover { text-decoration: underline; }
.slip-meta { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.slip-unit { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.slip-unit s { color: var(--muted); margin-left: 4px; }
.slip-ctrl { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.slip-ctrl .qty { width: 150px; }
.slip-amt { font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.slip-bad { font-size: var(--fs-sm); color: var(--danger); font-weight: 600; }
.slip-sum { padding: 12px 16px 16px; display: grid; gap: 6px; }
.slip-sum .row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--fs-sm); }
.slip-sum .grand { color: var(--ink); font-size: var(--fs-lg); font-weight: 800; padding-top: 10px; margin-top: 4px; border-top: 3px double var(--ink); }
.cod-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--green-soft); color: var(--ink); font-size: var(--fs-sm); }
.cod-note strong { display: block; color: var(--green); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; max-width: 760px; }
.page-actions .btn { flex: 1 1 160px; }
.alert { padding: 12px 14px; border-radius: var(--r); font-size: var(--fs-sm); margin-bottom: 14px; max-width: 760px; display: grid; gap: 8px; }
.alert.warn { background: var(--brass-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--brass) 35%, transparent); }
.alert.err { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--green-soft); color: var(--green); }

.empty { text-align: center; padding: 48px 16px; display: grid; gap: 8px; justify-items: center; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: var(--fs-lg); }
.empty .btn { margin-top: 8px; }

/* ---------- checkout ---------- */
.co { display: grid; gap: 18px; max-width: 640px; }
.co-cart { max-width: 760px; margin-top: 16px; gap: 12px; }
.co-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 14px; }
.co-card h2 { font-size: var(--fs-md); font-weight: 700; }
.co-sum { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.co-sum .total { font-size: var(--fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface);
}
.field textarea { min-height: 76px; resize: vertical; }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.field .err { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); flex: none; }
.wa-hint { font-size: var(--fs-xs); color: var(--muted); text-align: center; }

.orders-note { color: var(--muted); font-size: var(--fs-sm); margin: -6px 0 14px; max-width: 60ch; }
.orders { display: grid; gap: 12px; max-width: 760px; }
.order { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: grid; gap: 10px; background: var(--surface); }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-top > div { display: grid; gap: 2px; }
.order-total { font-weight: 700; font-size: var(--fs-lg); }
.order-items { list-style: none; margin: 0; padding: 8px 0; border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong); display: grid; gap: 4px; font-size: var(--fs-sm); }
.order-items li { display: flex; justify-content: space-between; gap: 12px; }
.oi-var { color: var(--muted); }
.oi-qty { color: var(--muted); white-space: nowrap; }
.order-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sent { max-width: 520px; margin: 24px auto 0; text-align: center; display: grid; gap: 12px; justify-items: center; }
.sent .bubble { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.sent .bubble .ic { width: 32px; height: 32px; }
.sent h1 { font-size: var(--fs-xl); }
.sent p { color: var(--muted); }
.sent .btns { display: grid; gap: 10px; width: 100%; margin-top: 8px; }

/* ---------- bottom cart bar ---------- */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-top: 10px;
  background: var(--surface); border-top: 1px solid var(--line);
}
.cartbar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.cartbar .info { display: grid; line-height: 1.3; font-variant-numeric: tabular-nums; }
.cartbar .info small { color: var(--muted); font-size: var(--fs-xs); }
.cartbar .info strong { font-size: var(--fs-lg); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding-block: 24px; font-size: var(--fs-sm); color: var(--muted); }
.foot .wrap { display: grid; gap: 10px; }
.foot .brand-mark { font-size: 17px; }
.foot dl { margin: 0; display: grid; gap: 4px; }
.foot dt { display: inline; font-weight: 600; color: var(--ink); }
.foot dd { display: inline; margin: 0; user-select: all; }
/* leave room under the footer for the fixed bottom cart bar */
.foot.with-bar { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }

/* ---------- language screen ---------- */
.ls { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding-block: 24px; }
.ls-card { width: 100%; max-width: 420px; display: grid; gap: 20px; text-align: center; }
.ls-brand { display: grid; gap: 2px; }
.ls-brand .brand-mark { font-size: 34px; }
.ls-brand small { color: var(--muted); font-size: var(--fs-sm); }
.ls-card h1 { font-size: var(--fs-2xl); font-weight: 700; }
.ls-card h1 .sep { color: var(--line-strong); font-weight: 400; margin: 0 6px; }
.ls-card .prompt { color: var(--muted); display: grid; gap: 2px; }
.ls-btns { display: grid; gap: 10px; }
.ls-btns .btn { min-height: 52px; font-size: var(--fs-lg); }
.ls-rule { height: 1px; background: var(--line); }

/* ---------- loading / toast / overlays ---------- */
.skel { background: linear-gradient(90deg, var(--line) 0, color-mix(in srgb, var(--line) 50%, var(--surface)) 50%, var(--line) 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.skel-card { aspect-ratio: 3 / 4.2; border-radius: var(--r); }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 600;
  display: flex; gap: 8px; align-items: center; max-width: calc(100% - 32px);
}
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(8, 12, 10, .94); display: grid; grid-template-rows: auto 1fr auto; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); color: #fff; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: var(--fs-sm); }
.lb-img { display: grid; place-items: center; min-height: 0; padding: 0 12px; }
.lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 6px; }
.lb-nav { display: flex; justify-content: center; gap: 16px; padding: 12px; }
.lightbox .icon-btn { color: #fff; border: 1px solid rgba(255,255,255,.25); width: 44px; height: 44px; }
.lightbox .icon-btn:hover { background: rgba(255,255,255,.12); }

.modal-back { position: fixed; inset: 0; z-index: 80; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; border: 1px solid var(--line); }
.modal h2 { font-size: var(--fs-lg); }
.modal p { color: var(--muted); font-size: var(--fs-sm); }
.modal .acts { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ================= OWNER PANEL ================= */
.a-top .hdr-row { gap: 8px; }
.a-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.a-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; text-decoration: none; font-weight: 600; font-size: var(--fs-sm); color: var(--muted); border-bottom: 2.5px solid transparent; }
.a-tabs a[aria-current="page"] { color: var(--green); border-color: var(--green); }
.a-main { padding-block: 18px 110px; }
.a-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.a-head h1 { font-size: var(--fs-xl); font-weight: 700; }
.a-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.a-tools .search { margin: 0; flex: 1 1 220px; }
.a-tools select { min-height: 44px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 10px; flex: 0 1 220px; }
.a-list { display: grid; gap: 8px; }
.a-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.a-row.is-hidden { background: color-mix(in srgb, var(--surface) 70%, var(--paper)); }
.a-row.is-hidden .a-name, .a-row.is-hidden .a-thumb { opacity: .6; }
.a-thumb { width: 56px; height: 56px; border-radius: 4px; border: 0; background: var(--img-bg); overflow: hidden; }
.a-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.a-name { font-weight: 600; font-size: var(--fs-sm); }
.a-sub { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-variant-numeric: tabular-nums; }
.a-sub .price { font-size: var(--fs-xs); gap: 4px; }
.a-sub .price .now { font-size: var(--fs-sm); }
.pill { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.out { background: var(--danger-soft); color: var(--danger); }
.pill.hid { background: var(--line); color: var(--muted); }
.a-row-acts { display: flex; gap: 6px; align-items: center; grid-column: 3; grid-row: 1; }
.a-toggles { grid-column: 2 / -1; grid-row: 2; display: flex; gap: 16px; flex-wrap: wrap; }
@media (min-width: 720px) {
  .a-row { grid-template-columns: 56px minmax(0, 1fr) auto auto; }
  .a-toggles { grid-column: 3; grid-row: 1; }
  .a-row-acts { grid-column: 4; }
}
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); cursor: pointer; min-height: 36px; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line-strong); position: relative; cursor: pointer; margin: 0; transition: background-color .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }

.a-form { display: grid; gap: 16px; max-width: 760px; }
.a-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 14px; }
.a-sec h2 { font-size: var(--fs-md); font-weight: 700; }
.a-sec .hint { font-size: var(--fs-xs); color: var(--muted); }
.two { display: grid; gap: 14px; }
@media (min-width: 620px) { .two { grid-template-columns: 1fr 1fr; } }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); display: grid; }
.photo .pimg { aspect-ratio: 1 / 1; background: var(--img-bg); position: relative; }
.photo .pimg img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.photo .main-tag { position: absolute; left: 6px; top: 6px; background: var(--green); color: var(--on-green); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.photo { min-width: 0; }
.photo > * { min-width: 0; }
.photo .pvar { padding: 6px 6px 0; }
.photo .pvar select { width: 100%; min-height: 34px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); font-size: var(--fs-xs); padding: 0 6px; }
.photo .pacts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px; padding: 4px; border-top: 1px solid var(--line); }
.photo .pacts button { flex: 1 1 auto; min-width: 0; min-height: 34px; border: 0; background: transparent; border-radius: 6px; font-size: 11.5px; font-weight: 600; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.photo .pacts button:hover { background: var(--green-soft); color: var(--green); }
.photo .pacts button.rm:hover { background: var(--danger-soft); color: var(--danger); }
.photo .pacts .ic { width: 16px; height: 16px; }
.upload { border: 1.5px dashed var(--line-strong); border-radius: var(--r); display: grid; place-items: center; gap: 6px; text-align: center; padding: 14px; min-height: 120px; cursor: pointer; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; background: var(--paper); }
.upload:hover, .upload.drag { border-color: var(--green); color: var(--green); }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload .ic { width: 26px; height: 26px; }
.preview-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line); padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.savebar .wrap { display: flex; gap: 10px; justify-content: space-between; align-items: center; max-width: 792px; margin: 0; }
@media (min-width: 900px) { .savebar .wrap { margin: 0 auto; max-width: 1120px; } }
.savebar .grow { flex: 1; }
.cat-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cat-order { display: flex; flex-direction: column; }
.cat-order .icon-btn { width: 34px; height: 30px; }
.cat-order .icon-btn[disabled] { opacity: .3; cursor: default; }
.cat-names { display: grid; gap: 2px; min-width: 0; }
.cat-names strong { font-size: var(--fs-sm); }
.cat-names span { font-size: var(--fs-xs); color: var(--muted); }
.cat-edit { grid-column: 1 / -1; display: grid; gap: 12px; padding-top: 6px; }
.login { max-width: 400px; margin: 8vh auto 0; display: grid; gap: 16px; }
.login .brand { justify-content: center; margin: 0 0 4px; }
.login p.sub { color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.wa-preview { font-size: var(--fs-sm); }
.wa-preview a { color: var(--green); font-weight: 600; }

/* auto-translate */
.tr-tip { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; color: var(--muted); }
.tr-tip .ic { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--green); }
.tr-note { display: block; min-height: 0; font-size: var(--fs-xs); margin-top: 4px; color: var(--muted); }
.tr-note:empty { display: none; }
.tr-note.ok { color: var(--green); }
.tr-note.fail { color: var(--brass); }
.tr-note.busy::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: trspin .8s linear infinite; }
@keyframes trspin { to { transform: rotate(360deg); } }
.tr-flash { background: var(--green-soft) !important; transition: background .9s; }
@media (prefers-reduced-motion: reduce) { .tr-note.busy::before { animation: none; } }


/* ---------- category tiles (3D icon + name) ----------
   Phones/tablets: big tiles under the header, 1 row (up to 4) or 2 rows, swipe sideways.
   Computers: small tiles inside the header row, next to the logo. */
.ct {
  display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink);
  background: var(--img-bg); border: 1.5px solid transparent; border-radius: 13px;
  padding: 12px 4px 10px; height: 104px; min-width: 0; transition: border-color .15s, background-color .15s;
  position: relative;
}
/* selected tile: a thin outline that is strongest at the top-left and fades to nothing towards the bottom */
.ct[aria-current="page"] { background: var(--green-soft); border-color: transparent; }
.ct[aria-current="page"]::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(165deg, var(--green) 0%, color-mix(in srgb, var(--green) 45%, transparent) 40%, transparent 88%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.ct[aria-current="page"] .ct-lbl { color: var(--green); }
.ct-vis { width: 54px; height: 54px; display: grid; place-items: center; flex: none; transition: transform .45s cubic-bezier(.25, .46, .45, .94); }
/* same gentle zoom as the product photos: the 3D icon grows a little as soon as the pointer passes over the tile (on phones: while it is touched);
   only the icon grows, so nothing gets cut off at the edge of the tile row */
@media (hover: hover) { .ct:hover .ct-vis { transform: scale(1.25) translateY(-1px); } }
.ct:active .ct-vis { transform: scale(1.18); }
@media (prefers-reduced-motion: reduce) { .ct-vis { transition: none; } .ct:hover .ct-vis, .ct:active .ct-vis { transform: none; } }
.ct-vis img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .12)); }
.ct-vis svg { width: 42px; height: 42px; }
.ct-fb { width: 46px; height: 46px; border-radius: 50%; background: #ead8e4; color: var(--green); font-weight: 800; font-size: 20px; display: grid; place-items: center; line-height: 1; }
.ct-lbl {
  margin-top: auto; font-size: 12.5px; font-weight: 650; text-align: center; line-height: 1.18;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.ctiles { scrollbar-width: none; }
.ctiles::-webkit-scrollbar { display: none; }
.ctiles-hdr { display: none; }
.ctiles-main {
  display: grid; grid-template-columns: repeat(var(--cols, 4), clamp(76px, calc((100vw - 59px) / 4), 96px)); gap: 9px; overflow-x: auto;
  padding: 2px max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px));
  scroll-padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.main-full { padding-top: 4px; }
.hdr-row { padding-top: 10px; }
.hdr-cat { border-bottom-color: transparent; }
@media (max-width: 700px) { .hdr-row:has(.hsearch) .hsearch { margin: 6px 0 14px; } }

/* ---------- home banners ---------- */
.bn { padding: 16px 0 4px; }
.bn[hidden] { display: none; }
/* while searching, only the matching products show: banners and the big category tiles step aside */
.is-searching .ctiles-main { display: none; }
.bn-trk {
  position: relative; display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  scroll-padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.bn-trk::-webkit-scrollbar { display: none; }
.bn-sl { flex: 0 0 76%; aspect-ratio: 1.2 / 1; border-radius: 24px; overflow: hidden; scroll-snap-align: start; display: block; background: var(--img-bg); }
.bn-sl.bn-wide { flex-basis: 88%; aspect-ratio: 902 / 400; }
.bn-sl picture, .bn-sl img { display: block; width: 100%; height: 100%; }
.bn-sl img { object-fit: cover; }
.bn-dots { display: flex; justify-content: center; gap: 2px; margin-top: 6px; }
.bn-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.bn-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: #d6d3cf; transition: width .2s, background-color .2s; }
.bn-dots button[aria-current="true"]::before { width: 18px; background: var(--green); }
@media (min-width: 720px) {
  .bn-trk { gap: 16px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); scroll-padding-inline: max(24px, env(safe-area-inset-left, 0px)); }
  .bn-sl, .bn-sl.bn-wide { flex-basis: calc(100% - 88px); aspect-ratio: 902 / 400; border-radius: 28px; }
  /* keep the banner short enough that the "All items" heading and the top half of the first product row
     also fit on the screen; same 902:400 shape, just smaller (never narrower than 480px) */
  .bn { --bn-room: 520px; }
  .bn-sl, .bn-sl.bn-wide { flex-basis: clamp(min(480px, calc(100% - 88px)), calc((100vh - var(--bn-room)) * 2.255), calc(100% - 88px)); }
}
@media (min-width: 1024px) and (max-width: 1279px) { .bn { --bn-room: 600px; } }
@media (min-width: 1280px) { .bn { --bn-room: 520px; } }
@media (min-width: 1024px) {
  .hdr-row { gap: 22px; padding-top: 26px; padding-bottom: 20px; min-height: 0; }
  .hdr-cat { border-bottom-color: var(--line); }
  .brand-mark { font-size: 26px; }
  .hdr-cat .brand-sub { display: none; }
  .ctiles-hdr { gap: 6px; flex: 0 1 auto; min-width: 0; overflow-x: auto; padding: 2px; }
  .ctiles-hdr .ct { flex: none; height: 68px; min-width: 62px; padding: 2px 8px 0; border-radius: 12px; justify-content: center; gap: 4px; }
  .ctiles-hdr .ct-vis { width: 34px; height: 34px; }
  .ctiles-hdr .ct-vis svg { width: 26px; height: 26px; }
  .ctiles-hdr .ct-fb { width: 30px; height: 30px; font-size: 14px; }
  .ctiles-hdr .ct-lbl { margin-top: 0; font-size: 10px; white-space: nowrap; display: block; }
  .hdr-cat .hsearch { flex: 1 1 240px; min-width: 200px; max-width: 560px; margin-inline: auto; }
  .main-full { padding-top: 28px; }
  .bn { padding-top: 0; }
  .cart-btn { flex: none; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .main-full { padding-top: 16px; }
  .ctiles-main { padding-inline: 24px; scroll-padding-inline: 24px; margin-bottom: 16px; grid-template-columns: repeat(var(--cols, 4), 96px); }
}
@media (min-width: 1280px) {
  .ctiles-main { display: none; }
  .ctiles-hdr { display: flex; }
}

/* ---------- owner panel: search box, banners, category icons, sample products ---------- */
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 44px; padding: 0 12px 0 40px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); }
.demo-note { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; max-width: none; }
.icon-prev { width: 72px; height: 72px; border-radius: 13px; background: var(--img-bg); display: grid; place-items: center; flex: none; }
.icon-prev img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .12)); }
.icon-prev.sm { width: 44px; height: 44px; border-radius: 10px; }
.icon-prev.sm img { width: 30px; height: 30px; }
.icon-prev.sm .ct-fb { width: 30px; height: 30px; font-size: 14px; }
.icon-edit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bn-row { display: grid; grid-template-columns: auto 132px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.bn-row.is-hidden .bn-thumb { opacity: .5; }
.bn-thumb { aspect-ratio: 902 / 400; border-radius: 8px; overflow: hidden; background: var(--img-bg); }
.bn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bn-info { display: grid; gap: 3px; min-width: 0; }
.bn-info strong { font-size: var(--fs-sm); }
.bn-info > span { font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 620px) {
  .bn-row { grid-template-columns: auto 96px minmax(0, 1fr); }
  .bn-row .switch, .bn-row > .btn { grid-column: 2 / -1; justify-self: start; }
  .bn-row > .btn { grid-column: 3; justify-self: end; grid-row: 2; }
}
.bn-plist { display: grid; gap: 6px; max-height: 380px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: var(--r); margin-top: 8px; }
.bn-pick { display: grid; grid-template-columns: auto 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.bn-pick:hover { background: var(--green-soft); }
.bn-pick input { width: 20px; height: 20px; accent-color: var(--green); }
.bn-pick img { width: 44px; height: 44px; object-fit: contain; background: var(--img-bg); border-radius: 6px; }
.bn-pick span { display: grid; min-width: 0; font-size: var(--fs-sm); }
.bn-pick small { color: var(--muted); font-size: var(--fs-xs); }
.a-sec .err { color: var(--danger); font-size: var(--fs-xs); font-weight: 600; }
