/* =============================================================================
   Z&A STORE — one stylesheet, no framework.
   Mobile-first, app-like (search on top, tab bar at the bottom on phones).
   Colours come from Admin → Settings → Theme (theme-vars.js sets --bs-*),
   with sensible defaults when that hasn't loaded yet.
   ========================================================================== */

/* ---------- tokens ---------- */

:root {
  --primary: var(--bs-primary, #0f2942);
  --primary-rgb: var(--bs-primary-rgb, 15, 41, 66);
  --secondary: var(--bs-secondary, #1e4e79);
  --accent: var(--bs-warning, #d97706);
  --danger: var(--bs-danger, #dc2626);
  --success: var(--bs-success, #16a34a);
  --info: var(--bs-info, #0284c7);
  --text: var(--bs-body-color, #1d2433);
  --muted: #687083;
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #f1f2f5;
  --line: #e4e6eb;
  --link: var(--bs-link-color, var(--primary));
  --on-primary: var(--bs-btn-color, #fff);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --hdr-h: 60px;
  --tab-h: 62px;
  --wrap: 1280px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --text: var(--bs-body-color, #e7e9ee);
  --muted: #9aa2b1;
  --bg: #0e1014;
  --surface: #171a20;
  --surface-2: #20242c;
  --line: #2b303a;
  --link: var(--bs-link-color, #8fb7ff);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hdr-h) + 56px);
}

body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

body > main {
  flex: 1 0 auto;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: 1.45rem;
}

h2 {
  font-size: 1.2rem;
}

h3 {
  font-size: 1.05rem;
}

h4, h5 {
  font-size: 1rem;
}

p {
  margin: 0 0 .8em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

[hidden], .d-none {
  display: none !important;
}

.no-save {
  -webkit-user-drag: none;
  user-select: none;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 12px;
}

@media (min-width: 768px) {
  .wrap {
    padding: 0 24px;
  }
}

.i {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  display: inline-block;
  vertical-align: -.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- promo ticker (Admin → Banners messages) ---------- */

.promo-bar {
  background: var(--primary);
  color: var(--on-primary);
  font-size: .8rem;
  text-align: center;
  height: 28px;
  overflow: hidden;
  position: relative;
}

.promo-bar span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  opacity: 0;
  transition: opacity .5s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-bar span.on {
  opacity: 1;
}

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

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.hdr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--hdr-h);
}

.hdr-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: var(--text);
  text-decoration: none !important;
}

.hdr-logo img {
  height: 34px;
  width: auto;
}

.hdr-logo .logo-full {
  display: none;
  height: 38px;
}

.hdr-logo .logo-dark {
  display: none;
}

[data-bs-theme="dark"] .hdr-logo .logo-light {
  display: none !important;
}

[data-bs-theme="dark"] .hdr-logo .logo-dark.logo-sq {
  display: block;
}

@media (min-width: 900px) {
  .hdr-logo .logo-sq {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .hdr-logo .logo-full.logo-light {
    display: block;
  }
}

@media (min-width: 900px) {
  [data-bs-theme="dark"] .hdr-logo .logo-full.logo-dark {
    display: block;
  }
}

.hdr-search {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
}

.hdr-search .i-search {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

.hdr-search input {
  width: 100%;
  height: 42px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  padding: 0 84px 0 42px;
  font-size: 16px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

.hdr-search input::-webkit-search-cancel-button {
  display: none;
}

.hdr-search input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.hdr-search .hs-clear, .hdr-search .hs-go {
  position: absolute;
  border: 0;
  background: none;
  height: 34px;
  display: grid;
  place-items: center;
}

.hdr-search .hs-clear {
  right: 46px;
  width: 30px;
  color: var(--muted);
}

.hdr-search .hs-go {
  right: 4px;
  width: 38px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--on-primary);
}

.hdr-actions {
  display: none;
  align-items: center;
  gap: 4px;
  flex: none;
}

@media (min-width: 900px) {
  .hdr-actions {
    display: flex;
  }
}

.hdr-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 0;
  background: none;
  color: var(--text);
  font-size: .9rem;
  text-decoration: none !important;
}

.hdr-btn:hover {
  background: var(--surface-2);
}

.hdr-btn .i {
  width: 22px;
  height: 22px;
}

.hdr-btn .lbl {
  display: none;
}

@media (min-width: 1100px) {
  .hdr-btn .lbl {
    display: inline;
  }
}

.hdr-mobile-help {
  display: inline-flex;
}

@media (min-width: 900px) {
  .hdr-mobile-help {
    display: none;
  }
}

.count-badge {
  position: absolute;
  top: 2px;
  left: 22px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  display: none;
}

.count-badge.has-items {
  display: block;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

/* category chips under the search */

.hdr-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 10px;
  scrollbar-width: none;
  max-width: var(--wrap);
  margin: 0 auto;
}

.hdr-cats::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .hdr-cats {
    padding: 0 24px 10px;
  }
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none !important;
}

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

.chip.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.chip .i {
  width: 16px;
  height: 16px;
}

.chip small {
  color: inherit;
  opacity: .7;
  font-size: .75rem;
}

.chip .age {
  font-size: .7rem;
  font-weight: 700;
  color: var(--danger);
}

.chip.on .age {
  color: inherit;
}

/* search suggestions */

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 60;
  max-height: 70vh;
  overflow-y: auto;
}

.suggest a, .suggest button.sg {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
  text-decoration: none !important;
  font-size: .92rem;
}

.suggest a:hover, .suggest .sg:hover, .suggest .act {
  background: var(--surface-2);
}

.suggest img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
}

.suggest .sg-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest .sg-price {
  font-weight: 700;
  font-size: .85rem;
}

.suggest .sg-head {
  padding: 8px 12px 4px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  justify-content: space-between;
}

.suggest .sg-head button {
  border: 0;
  background: none;
  color: var(--link);
  font-size: .72rem;
  padding: 0;
}

.suggest .i {
  color: var(--muted);
}

/* account dropdown */

.menu {
  position: relative;
}

.menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 70;
}

.menu.open .menu-pop {
  display: block;
}

.menu-pop a, .menu-pop button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text);
  font-size: .92rem;
  text-align: left;
  text-decoration: none !important;
}

.menu-pop a:hover, .menu-pop button:hover {
  background: var(--surface-2);
}

.menu-pop .who {
  padding: 8px 10px;
  font-size: .8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-seg {
  display: flex;
  gap: 4px;
  padding: 6px 4px 2px;
}

.theme-seg button {
  flex: 1;
  justify-content: center;
  padding: 6px;
  font-size: .78rem;
  border: 1px solid var(--line) !important;
}

.theme-seg button.active {
  border-color: var(--primary) !important;
  color: var(--primary);
  font-weight: 600;
}

/* notices under the header */

.app-notice {
  background: var(--bs-warning-bg-subtle, #fff4dc);
  color: var(--bs-warning-text-emphasis, #7a4b00);
  font-size: .85rem;
  padding: 8px 12px;
  text-align: center;
}

/* ---------- bottom tab bar (phones / tablets) ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none !important;
}

.tabbar a .i {
  width: 24px;
  height: 24px;
}

.tabbar a.on {
  color: var(--primary);
}

[data-bs-theme="dark"] .tabbar a.on {
  color: var(--link);
}

.tabbar .count-badge {
  top: 6px;
  left: calc(50% + 4px);
}

body.has-tabbar {
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  .tabbar {
    display: none;
  }
}

@media (min-width: 900px) {
  body.has-tabbar {
    padding-bottom: 0;
  }
}

/* ---------- footer ---------- */

.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 32px;
  font-size: .88rem;
  color: var(--muted);
}

.app-footer .cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 24px 0 8px;
}

@media (min-width: 768px) {
  .app-footer .cols {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.app-footer h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text);
  margin-bottom: 8px;
}

.app-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-footer li {
  margin: 4px 0;
}

.app-footer a {
  color: var(--muted);
}

.app-footer a:hover {
  color: var(--text);
}

.app-footer .brand img {
  height: 36px;
  margin-bottom: 8px;
}

.app-footer .legal {
  border-top: 1px solid var(--line);
  padding: 12px 0 16px;
  font-size: .78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
}

.app-footer .brand .logo-dark {
  display: none;
}

[data-bs-theme="dark"] .app-footer .brand .logo-light {
  display: none;
}

[data-bs-theme="dark"] .app-footer .brand .logo-dark {
  display: block;
}

/* ---------- page scaffolding ---------- */

.page {
  padding-top: 16px;
  padding-bottom: 24px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.page-head h1 {
  margin: 0;
}

.page-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.crumbs {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.crumbs a {
  color: var(--muted);
}

.section {
  margin: 24px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.section-head a {
  font-size: .88rem;
  font-weight: 600;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
}

.panel + .panel {
  margin-top: 12px;
}

.panel h2, .panel h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.muted, .text-muted {
  color: var(--muted) !important;
}

.grid-2 {
  display: grid;
  gap: 12px;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 20px;
    align-items: start;
  }
}

.sticky-side {
  position: sticky;
  top: calc(var(--hdr-h) + 60px);
}

/* ---------- product grid + card ---------- */

.pgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 600px) {
  .pgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

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

@media (min-width: 1200px) {
  .pgrid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }
}

.prow {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 42%;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: none;
}

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

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

@media (min-width: 600px) {
  .prow {
    grid-auto-columns: 28%;
  }
}

@media (min-width: 900px) {
  .prow {
    grid-auto-columns: calc((100% - 40px) / 5);
  }
}

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: box-shadow .15s, transform .15s;
  min-width: 0;
}

.pcard:hover {
  box-shadow: var(--shadow-lg);
}

.pcard-media {
  position: relative;
}

.pcard-media > .pcard-tags, .pcard-media > .pcard-add, .pcard-media > .pcard-save {
  z-index: 2;
}

.pcard-img {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: var(--surface-2);
}

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

.pcard.is-out .pcard-img img {
  opacity: .55;
  filter: grayscale(.5);
}

.pcard-tags {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--accent);
  color: #fff;
  line-height: 1.5;
}

.tag-dark {
  background: rgba(17, 24, 39, .82);
}

.tag-age {
  background: var(--danger);
}

.tag-ok {
  background: var(--success);
}

.pcard-add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  display: grid;
  place-items: center;
}

.pcard-add:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.pcard-add.in-cart {
  background: var(--primary);
  color: var(--on-primary);
}

.pcard-add:disabled {
  display: none;
}

.pcard-add .i {
  width: 20px;
  height: 20px;
}

.pcard-save {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .9);
  color: #374151;
  display: grid;
  place-items: center;
}

.pcard-save.on {
  color: var(--danger);
}

.pcard-save.on .i {
  fill: currentColor;
}

.pcard-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  color: var(--text);
  text-decoration: none !important;
}

.pcard-price {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.pcard-price .per {
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
}

.pcard-price.hidden-price {
  font-size: .82rem;
  font-weight: 600;
  color: var(--link);
}

.pcard-name {
  font-size: .86rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.pcard-meta {
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard-stock {
  font-size: .74rem;
  font-weight: 600;
}

.pcard-stock.low {
  color: var(--accent);
}

.pcard-stock.out {
  color: var(--danger);
}

/* skeletons while loading */

.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skel 1.2s infinite linear;
  border-radius: var(--r-sm);
}

@keyframes skel {
  to {
    background-position: -200% 0;
  }
}

.pcard.skel-card .pcard-img {
  background: none;
}

.pcard.skel-card .pcard-img::after {
  content: "";
  position: absolute;
  inset: 0;
}

.skel-line {
  height: 12px;
  margin: 6px 0;
}

/* empty / info states */

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.empty .i {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
  color: var(--line);
  margin: 0 auto 10px;
  display: block;
}

.empty h3 {
  color: var(--text);
}

.loadmore {
  display: flex;
  justify-content: center;
  padding: 18px 0 4px;
}

.result-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.result-bar .count {
  font-size: .88rem;
  color: var(--muted);
  margin-right: auto;
}

.select {
  height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 32px 0 14px;
  font-size: .875rem;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

.toggle-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-chip:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none !important;
  transition: filter .15s, background .15s, color .15s;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(.96);
}

.btn:disabled, .btn.disabled {
  opacity: .55;
  pointer-events: none;
}

.btn-primary {
  background: var(--bs-btn-bg, var(--primary));
  border-color: var(--bs-btn-bg, var(--primary));
  color: var(--bs-btn-color, var(--on-primary));
}

.btn-primary:hover {
  background: var(--bs-btn-hover-bg, var(--primary));
  filter: none;
}

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

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

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

.btn-outline-primary, .btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

[data-bs-theme="dark"] .btn-outline-primary, [data-bs-theme="dark"] .btn-outline {
  border-color: var(--link);
  color: var(--link);
}

.btn-outline-secondary, .btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-outline-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-link {
  background: none;
  border: 0;
  color: var(--link);
  padding: 0;
  min-height: auto;
  font-weight: 600;
}

.btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: .85rem;
}

.btn-lg {
  min-height: 50px;
  padding: 0 24px;
  font-size: 1.05rem;
}

.btn-block, .w-100 {
  width: 100%;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  flex: none;
}

.icon-btn.on {
  color: var(--danger);
}

.icon-btn.on .i {
  fill: currentColor;
}

/* ---------- forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.field label, .form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}

.field .hint, .form-text {
  font-size: .78rem;
  color: var(--muted);
}

.input, .form-control, .form-select, .gs-form-input {
  width: 100%;
  min-height: 44px;
  border-radius: var(--r);
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 10px 12px;
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

textarea.input, textarea.form-control, textarea.gs-form-input {
  min-height: 96px;
  resize: vertical;
}

select.input, select.form-select, select.gs-form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.input:focus, .form-control:focus, .form-select:focus, .gs-form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.form-control-lg {
  min-height: 50px;
}

.row-2 {
  display: grid;
  gap: 0 12px;
}

@media (min-width: 600px) {
  .row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 600px) {
  .row-3 {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .9rem;
  cursor: pointer;
}

.check input, .form-check-input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--primary);
  flex: none;
}

.form-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  background: var(--surface);
  margin-bottom: 8px;
}

.option:has(input:checked), .option.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), .05);
}

.option input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex: none;
  margin: 0;
}

.option .o-main {
  flex: 1;
  min-width: 0;
}

.option .o-name {
  font-weight: 600;
  font-size: .93rem;
}

.option .o-sub {
  font-size: .8rem;
  color: var(--muted);
}

.option .o-end {
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
}

/* qty stepper */

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  height: 42px;
}

.qty button {
  width: 40px;
  height: 100%;
  border: 0;
  background: none;
  font-size: 1.2rem;
  color: var(--text);
  display: grid;
  place-items: center;
}

.qty input {
  width: 56px;
  border: 0;
  background: none;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  outline: none;
  -moz-appearance: textfield;
}

.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-sm {
  height: 34px;
}

.qty-sm button {
  width: 32px;
}

.qty-sm input {
  width: 44px;
  font-size: 15px;
}

/* ---------- alerts / badges / misc (small Bootstrap-compatible set used by scripts) ---------- */

.alert {
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: .9rem;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.alert-info {
  background: var(--bs-info-bg-subtle, #e6f4fb);
  color: var(--bs-info-text-emphasis, #075985);
}

.alert-warning {
  background: var(--bs-warning-bg-subtle, #fff4dc);
  color: var(--bs-warning-text-emphasis, #7a4b00);
}

.alert-danger {
  background: var(--bs-danger-bg-subtle, #fdecec);
  color: var(--bs-danger-text-emphasis, #8f1d1d);
}

.alert-success {
  background: var(--bs-success-bg-subtle, #e8f7ee);
  color: var(--bs-success-text-emphasis, #14532d);
}

.alert-secondary {
  background: var(--surface-2);
  color: var(--text);
}

.alert a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.3;
  background: var(--surface-2);
  color: var(--text);
}

.bg-primary {
  background: var(--primary) !important;
  color: var(--on-primary) !important;
}

.bg-success {
  background: var(--success) !important;
  color: #fff !important;
}

.bg-danger {
  background: var(--danger) !important;
  color: #fff !important;
}

.bg-warning {
  background: var(--accent) !important;
  color: #fff !important;
}

.bg-secondary {
  background: var(--muted) !important;
  color: #fff !important;
}

.bg-body-tertiary {
  background: var(--surface-2) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--accent) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-dark {
  color: var(--text) !important;
}

.text-secondary {
  color: var(--muted) !important;
}

.link-body-emphasis {
  color: var(--text) !important;
}

.text-center {
  text-align: center !important;
}

.text-end {
  text-align: right !important;
}

.text-start {
  text-align: left !important;
}

.text-decoration-none {
  text-decoration: none !important;
}

.text-uppercase {
  text-transform: uppercase;
}

.small, small {
  font-size: .84em;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.d-flex {
  display: flex !important;
}

.d-block {
  display: block !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.d-grid {
  display: grid !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-row {
  flex-direction: row !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

.flex-shrink-0 {
  flex-shrink: 0 !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-end {
  align-items: flex-end !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-end {
  justify-content: flex-end !important;
}

.justify-content-start {
  justify-content: flex-start !important;
}

.gap-1 {
  gap: .25rem !important;
}

.gap-2 {
  gap: .5rem !important;
}

.gap-3 {
  gap: 1rem !important;
}

.m-0 {
  margin: 0 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: .25rem !important;
}

.mb-2 {
  margin-bottom: .5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mt-0 {
  margin-top: 0 !important;
}

.mt-1 {
  margin-top: .25rem !important;
}

.mt-2 {
  margin-top: .5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.ms-1 {
  margin-left: .25rem !important;
}

.ms-2 {
  margin-left: .5rem !important;
}

.ms-3 {
  margin-left: 1rem !important;
}

.ms-auto {
  margin-left: auto !important;
}

.me-1 {
  margin-right: .25rem !important;
}

.me-2 {
  margin-right: .5rem !important;
}

.me-3 {
  margin-right: 1rem !important;
}

.mx-3 {
  margin-left: 1rem !important;
  margin-right: 1rem !important;
}

.my-3 {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

.p-0 {
  padding: 0 !important;
}

.p-2 {
  padding: .5rem !important;
}

.p-3 {
  padding: 1rem !important;
}

.px-1 {
  padding-left: .25rem !important;
  padding-right: .25rem !important;
}

.px-2 {
  padding-left: .5rem !important;
  padding-right: .5rem !important;
}

.px-3 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.px-4 {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.py-0 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.py-2 {
  padding-top: .5rem !important;
  padding-bottom: .5rem !important;
}

.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.pt-5 {
  padding-top: 2rem !important;
}

.rounded-3 {
  border-radius: var(--r) !important;
}

.border-bottom {
  border-bottom: 1px solid var(--line) !important;
}

.opacity-50 {
  opacity: .5;
}

.position-static {
  position: static !important;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.card-header, .card-footer {
  padding: 12px 16px;
  background: var(--surface-2);
}

.card-header {
  border-bottom: 1px solid var(--line);
}

.card-footer {
  border-top: 1px solid var(--line);
}

.card-body {
  padding: 16px;
}

.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: .22em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .75s linear infinite;
  color: var(--muted);
}

.spinner-border-sm, .spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: .18em;
}

.spinner-sm {
  display: inline-block;
  border: .18em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.fa-spin, .spin {
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

/* ---------- toast ---------- */

.toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom));
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}

@media (min-width: 900px) {
  .toasts {
    bottom: 24px;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: #1f2430;
  color: #fff;
  font-size: .9rem;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in .2s ease-out;
}

.toast .i {
  width: 20px;
  height: 20px;
}

.toast.success .i {
  color: #4ade80;
}

.toast.error .i {
  color: #f87171;
}

.toast.warning .i {
  color: #fbbf24;
}

.toast.info .i {
  color: #93c5fd;
}

.toast a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  margin-left: auto;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- drawer / sheet / modal ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, .5);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--surface);
  z-index: 901;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.drawer.show {
  transform: none;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h3 {
  margin: 0;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

.drawer-foot {
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.mini-line {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.mini-line img {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-2);
}

.mini-line .ml-main {
  flex: 1;
  min-width: 0;
  font-size: .88rem;
}

.mini-line .ml-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-line .ml-qty {
  color: var(--muted);
  font-size: .8rem;
}

.mini-line .ml-price {
  font-weight: 700;
  font-size: .9rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal.show {
  display: flex;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, .55);
  z-index: 999;
}

.modal-dialog {
  position: relative;
  z-index: 1001;
  width: 100%;
  max-width: 560px;
  margin: 0;
  max-height: 92vh;
  display: flex;
}

@media (min-width: 600px) {
  .modal {
    align-items: center;
    padding: 16px;
  }
}

.modal-content {
  background: var(--surface);
  width: 100%;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheet-in .22s ease-out;
}

@media (min-width: 600px) {
  .modal-content {
    border-radius: var(--r-lg);
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

.modal-header, .modal-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
}

.modal-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  font-size: 1.05rem;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
}

.btn-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  position: relative;
}

.btn-close::before, .btn-close::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 17px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform: rotate(45deg);
}

.btn-close::after {
  transform: rotate(-45deg);
}

body.no-scroll {
  overflow: hidden;
}

/* age gate (catalog.js) */

.age-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(10, 12, 16, .7);
  display: grid;
  place-items: center;
  padding: 16px;
}

.age-gate-box {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.age-gate-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

/* ---------- home ---------- */

.hero {
  position: relative;
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 39 / 14;
  margin-top: 12px;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .5s;
}

.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0;
}

@media (min-width: 900px) {
  .quick {
    grid-template-columns: repeat(8, 1fr);
  }
}

.quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .76rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
  line-height: 1.2;
}

.quick a .qi {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--primary-rgb), .08);
  color: var(--primary);
}

[data-bs-theme="dark"] .quick a .qi {
  color: var(--link);
  background: var(--surface-2);
}

.quick a .qi .i {
  width: 22px;
  height: 22px;
}

.dept {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dept a {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  display: block;
  text-decoration: none !important;
  background: var(--surface-2);
}

@media (min-width: 900px) {
  .dept a {
    aspect-ratio: 16 / 10;
  }
}

.dept img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.dept a:hover img {
  transform: scale(1.04);
}

.dept .d-txt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}

.dept .d-txt strong {
  display: block;
  font-size: .78rem;
  letter-spacing: .01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dept .d-txt span {
  font-size: .75rem;
  opacity: .9;
  display: none;
}

@media (min-width: 600px) {
  .dept .d-txt span {
    display: block;
  }
}

@media (min-width: 600px) {
  .dept .d-txt strong {
    font-size: 1.1rem;
  }
}

.newsletter {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-lg);
  padding: 20px;
  display: grid;
  gap: 12px;
  align-items: center;
}

@media (min-width: 900px) {
  .newsletter {
    grid-template-columns: 1fr 1fr;
    padding: 28px;
  }
}

.newsletter h2 {
  color: inherit;
  margin: 0 0 4px;
}

.newsletter p {
  margin: 0;
  opacity: .9;
  font-size: .9rem;
}

.newsletter form {
  display: flex;
  gap: 8px;
}

.newsletter .input {
  border-color: transparent;
  color: #111;
  background: #fff;
}

.newsletter .btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- categories page ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 600px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 96px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none !important;
  overflow: hidden;
}

.cat-tile:hover {
  border-color: var(--primary);
}

.cat-tile .ct-ic {
  position: absolute;
  top: 12px;
  left: 14px;
  color: var(--primary);
}

[data-bs-theme="dark"] .cat-tile .ct-ic {
  color: var(--link);
}

.cat-tile strong {
  font-size: 1rem;
}

.cat-tile span {
  font-size: .8rem;
  color: var(--muted);
}

.cat-tile .tag {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* ---------- product page ---------- */

.pp {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .pp {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
}

.gallery {
  position: relative;
}

.g-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  scrollbar-width: none;
  aspect-ratio: 1;
}

.g-track::-webkit-scrollbar {
  display: none;
}

.g-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
  cursor: zoom-in;
}

.g-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.g-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
}

.g-dots span.on {
  background: var(--primary);
  width: 18px;
  border-radius: 4px;
}

.g-thumbs {
  display: none;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

@media (min-width: 900px) {
  .g-thumbs {
    display: flex;
  }
}

@media (min-width: 900px) {
  .g-dots {
    display: none;
  }
}

@media (min-width: 900px) {
  .pp .gallery {
    position: sticky;
    top: calc(var(--hdr-h) + 60px);
  }
}

.g-thumbs button {
  flex: none;
  width: 68px;
  height: 68px;
  padding: 0;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  overflow: hidden;
  background: var(--surface);
}

.g-thumbs button.on {
  border-color: var(--primary);
}

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

.g-save {
  position: absolute;
  top: 10px;
  right: 10px;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.pp-info h1 {
  font-size: 1.35rem;
  margin: 6px 0 4px;
}

.pp-price {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 8px 0 2px;
}

.pp-price small {
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.pp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.pp-facts .badge {
  font-weight: 600;
}

.stock-ok {
  color: var(--success);
}

.stock-low {
  color: var(--accent);
}

.stock-out {
  color: var(--danger);
}

.pp-buy {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}

.pp-buy .btn-primary {
  flex: 1;
}

.pp-ship {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 12px 0;
  font-size: .88rem;
}

.pp-ship .i {
  color: var(--success);
  width: 22px;
  height: 22px;
}

.pp-ship strong {
  display: block;
}

.pp-ship small {
  color: var(--muted);
}

.pp-desc {
  white-space: pre-line;
  font-size: .93rem;
}

.variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  z-index: 54;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}

.buybar .btn-primary {
  flex: 1;
}

.buybar .bb-price {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.1;
}

.buybar .bb-price small {
  display: block;
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted);
}

body.has-buybar {
  padding-bottom: calc(var(--tab-h) + 66px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  .buybar {
    display: none;
  }
}

@media (min-width: 900px) {
  body.has-buybar {
    padding-bottom: 0;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 3000;
  display: none;
}

.lightbox.show {
  display: block;
}

.lightbox .lb-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.lightbox .lb-track::-webkit-scrollbar {
  display: none;
}

.lightbox .lb-track div {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  overflow: auto;
  display: grid;
  place-items: center;
  touch-action: pinch-zoom pan-x pan-y;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox .lb-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.lightbox .lb-count {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  left: 16px;
  color: #fff;
  font-size: .9rem;
}

/* ---------- cart ---------- */

.cart-line {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line img {
  width: 84px;
  height: 84px;
  border-radius: var(--r);
  object-fit: cover;
  background: var(--surface-2);
}

.cl-name {
  font-weight: 600;
  font-size: .93rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cl-meta {
  font-size: .78rem;
  color: var(--muted);
}

.cl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.cl-price {
  font-weight: 800;
}

.cl-price s {
  font-weight: 500;
  color: var(--muted);
  font-size: .8rem;
  margin-right: 4px;
}

.cl-remove {
  border: 0;
  background: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  padding: 4px;
}

.cl-remove:hover {
  color: var(--danger);
}

.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: .92rem;
}

.sum-row.discount span:last-child, .discount-amount {
  color: var(--success);
  font-weight: 600;
}

.sum-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 4px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 1.15rem;
  font-weight: 800;
}

.code-row {
  display: flex;
  gap: 8px;
}

.code-row .input {
  text-transform: uppercase;
}

.coupon-feedback {
  font-size: .84rem;
  margin-top: 6px;
  min-height: 1em;
}

.coupon-feedback.success {
  color: var(--success);
}

.coupon-feedback.error {
  color: var(--danger);
}

.checkout-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  z-index: 54;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}

.checkout-bar .cb-total {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.1;
}

.checkout-bar .cb-total small {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
}

.checkout-bar .btn {
  flex: 1;
}

body.has-checkoutbar {
  padding-bottom: calc(var(--tab-h) + 66px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  .checkout-bar {
    display: none;
  }
}

@media (min-width: 900px) {
  body.has-checkoutbar {
    padding-bottom: 0;
  }
}

/* checkout summary lines */

.summary-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.summary-item-image {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
}

.summary-item-details {
  flex: 1;
  min-width: 0;
}

.summary-item-name {
  margin: 0;
  font-size: .86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-item-qty {
  margin: 0;
  font-size: .76rem;
  color: var(--muted);
}

.summary-item-price {
  font-weight: 700;
  font-size: .88rem;
}

.summary-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: .92rem;
}

.payment-secure-text {
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  margin: 8px 0 0;
}

.square-card {
  min-height: 90px;
}

details.mobile-summary > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

details.mobile-summary > summary::-webkit-details-marker {
  display: none;
}

@media (min-width: 900px) {
  details.mobile-summary > summary {
    pointer-events: none;
  }
}

@media (min-width: 900px) {
  details.mobile-summary > summary .i {
    display: none;
  }
}

/* ---------- success ---------- */

.done-card {
  max-width: 560px;
  margin: 24px auto;
  text-align: center;
}

.done-ic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bs-success-bg-subtle, #e8f7ee);
  color: var(--success);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.done-ic .i {
  width: 38px;
  height: 38px;
  stroke-width: 2.5;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  text-align: left;
  font-size: .92rem;
  margin: 16px 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

/* ---------- account / auth ---------- */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow);
}

.auth-card .logo {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.auth-card .logo img {
  height: 56px;
}

.auth-card .logo .logo-dark {
  display: none;
}

[data-bs-theme="dark"] .auth-card .logo .logo-light {
  display: none;
}

[data-bs-theme="dark"] .auth-card .logo .logo-dark {
  display: block;
}

.auth-card h1 {
  font-size: 1.3rem;
  text-align: center;
  margin: 8px 0 2px;
}

.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 18px;
}

.auth-error {
  display: none;
}

.auth-error:not(:empty) {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--bs-danger-bg-subtle, #fdecec);
  color: var(--bs-danger-text-emphasis, #8f1d1d);
  font-size: .88rem;
  margin-bottom: 12px;
}

.auth-success {
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--bs-success-bg-subtle, #e8f7ee);
  color: var(--bs-success-text-emphasis, #14532d);
  font-size: .9rem;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  font-size: .88rem;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .8rem;
  margin: 16px 0;
}

.auth-or::before, .auth-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.acct-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.acct-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  flex: none;
}

.acct-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

.acct-avatar label {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 2px solid var(--surface);
}

.acct-avatar label .i {
  width: 16px;
  height: 16px;
}

.acct-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 16px 0;
  scrollbar-width: none;
}

.acct-nav::-webkit-scrollbar {
  display: none;
}

.list-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none !important;
}

.list-link:last-child {
  border-bottom: 0;
}

.list-link .i:last-child {
  margin-left: auto;
  color: var(--muted);
}

/* orders (orders.js) */

.order-accordion {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
  overflow: hidden;
}

.order-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  color: var(--text);
}

.order-header-left, .order-header-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-header-right {
  align-items: flex-end;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

.order-number {
  font-weight: 700;
}

.order-date {
  font-size: .8rem;
  color: var(--muted);
}

.order-total {
  font-weight: 800;
}

.order-chevron {
  transition: transform .2s;
  color: var(--muted);
}

.order-accordion.open .order-chevron, .order-accordion.active .order-chevron {
  transform: rotate(180deg);
}

.order-accordion-body {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
}

.order-details-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 900px) {
  .order-details-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.order-section-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 8px;
}

.order-item-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.order-item-img {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-2);
}

.order-item-info {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-weight: 600;
  font-size: .88rem;
}

.order-item-meta {
  font-size: .78rem;
  color: var(--muted);
}

.order-item-price {
  font-weight: 700;
  font-size: .9rem;
}

.order-side-panel {
  display: grid;
  gap: 10px;
}

.order-summary-box, .order-shipping-box, .order-tracking-box, .order-actions-box {
  background: var(--surface-2);
  border-radius: var(--r);
  padding: 12px;
  font-size: .88rem;
}

.summary-line, .total-line, .discount-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

.total-line {
  font-weight: 800;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 6px;
}

.discount-line {
  color: var(--success);
}

.order-support-btn, .gs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.orders-empty, .orders-error {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

.orders-empty-icon {
  font-size: 2.5rem;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 700;
  text-transform: capitalize;
  background: var(--surface-2);
}

/* wishlist (saved) uses .pgrid + .pcard */

/* ---------- support ---------- */

.help-search {
  position: relative;
  margin: 8px 0 16px;
}

.help-search .i {
  position: absolute;
  left: 14px;
  top: 13px;
  color: var(--muted);
}

.help-search input {
  padding-left: 42px;
  border-radius: var(--r-pill);
}

.topics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

@media (min-width: 900px) {
  .topics {
    grid-template-columns: repeat(4, 1fr);
  }
}

.topic-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none !important;
}

.topic-card .i {
  color: var(--primary);
}

[data-bs-theme="dark"] .topic-card .i {
  color: var(--link);
}

.topic-card .count-badge {
  position: static;
  display: none;
  margin-left: auto;
}

.topic-card .count-badge:not(.d-none)[style*="inline"] {
  display: inline-block;
}

.faq-category {
  margin-bottom: 18px;
}

.faq-category h2 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 6px;
}

.faq-item summary {
  padding: 12px 14px;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .i {
  transition: transform .2s;
  color: var(--muted);
}

.faq-item[open] summary .i {
  transform: rotate(180deg);
}

.faq-item .faq-a {
  padding: 0 14px 14px;
  font-size: .9rem;
  color: var(--text);
}

#searchNoResult {
  display: none;
}

/* support chat (support-chat.js) */

.sc-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 12px;
}

.sc-bubble {
  max-width: 80%;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: .9rem;
  background: var(--surface-2);
  word-wrap: break-word;
}

.sc-bubble.bg-primary {
  border-bottom-right-radius: 4px;
}

.sc-bubble.bg-body-tertiary {
  border-bottom-left-radius: 4px;
}

.sc-avatar, .sc-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: .8rem;
  font-weight: 700;
}

.sc-avatar-sm {
  width: 26px;
  height: 26px;
}

.sc-avatar-support {
  background: var(--primary);
  color: var(--on-primary);
}

.sc-attachment-img, .sc-thumb {
  max-width: 180px;
  border-radius: var(--r-sm);
  margin-top: 6px;
  cursor: pointer;
}

.sc-input {
  flex: 1;
}

.sc-icon-btn, .sc-send-btn, .sc-clear-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  place-items: center;
  flex: none;
}

.sc-send-btn {
  background: var(--primary);
  color: var(--on-primary);
}

.sc-divider-label {
  font-size: .72rem;
  color: var(--muted);
  text-align: center;
  margin: 4px 0;
}

.sc-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
}

.sc-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite;
}

.sc-typing-dot:nth-child(2) {
  animation-delay: .2s;
}

.sc-typing-dot:nth-child(3) {
  animation-delay: .4s;
}

@keyframes blink {
  50% {
    opacity: .3;
  }
}

.sc-image-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.liveBadge {
  font-size: .7rem;
}

/* contact form (support-contact.js) */

.sc-upload-zone {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
}

.sc-upload-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.sc-upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: .88rem;
  color: var(--muted);
}

.sc-upload-previews {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.preview-item {
  position: relative;
  width: 64px;
  height: 64px;
}

.preview-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--r-sm);
}

.preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.sc-form-feedback {
  margin-top: 10px;
  font-size: .9rem;
}

.sc-form-feedback.success {
  color: var(--success);
}

.sc-form-feedback.error {
  color: var(--danger);
}

.order-prefill-hint {
  display: none;
  font-size: .78rem;
  color: var(--success);
  margin: 4px 0 0;
}

.contact-guest-notice {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--surface-2);
  font-size: .86rem;
  margin-bottom: 12px;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.loading .btn-spinner, button.loading .btn-spinner {
  display: inline-block;
}

/* ---------- help bot (n-chat) ---------- */

.chat-toggle-btn {
  position: fixed;
  right: 12px;
  bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom));
  z-index: 56;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
}

@media (max-width: 899px) {
  body.has-buybar .chat-toggle-btn, body.has-checkoutbar .chat-toggle-btn {
    display: none;
  }
}

@media (min-width: 900px) {
  .chat-toggle-btn, body.has-buybar .chat-toggle-btn, body.has-checkoutbar .chat-toggle-btn {
    bottom: 20px;
    right: 20px;
  }
}

.chat-toggle-btn.hidden {
  display: none;
}

.chat-toggle-btn .i {
  width: 24px;
  height: 24px;
}

.chat-window {
  position: fixed;
  z-index: 1500;
  right: 0;
  bottom: 0;
  left: 0;
  height: 80vh;
  background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-window.visible {
  display: flex;
}

@media (min-width: 600px) {
  .chat-window {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: 380px;
    height: 560px;
    border-radius: var(--r-lg);
  }
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--primary);
  color: var(--on-primary);
}

.header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .95rem;
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
}

.chat-controls {
  display: flex;
  gap: 4px;
}

.chat-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: inherit;
  display: grid;
  place-items: center;
}

.chat-btn .i {
  width: 16px;
  height: 16px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
}

.message {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: .9rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.user-message {
  align-self: flex-end;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom-right-radius: 4px;
}

.bot-message {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.bot-message a {
  font-weight: 600;
}

.typing-indicator {
  display: none;
  align-self: flex-start;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 1px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: .2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: .4s;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.chat-input {
  flex: 1;
  height: 42px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  padding: 0 14px;
  background: var(--surface);
  font-size: 16px;
  outline: none;
}

.chat-input:focus {
  border-color: var(--primary);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
}

.n-signature {
  text-align: center;
  font-size: .7rem;
  color: var(--muted);
  padding: 4px 0 8px;
}

/* ---------- prose (about / policies) ---------- */

.prose {
  max-width: 760px;
}

.prose h1 {
  font-size: 1.6rem;
}

.prose h2 {
  font-size: 1.1rem;
  margin-top: 1.6em;
}

.prose p, .prose li {
  font-size: .96rem;
  line-height: 1.65;
}

.prose ul {
  padding-left: 1.2em;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- checkout options (checkout.js) ---------- */

.shipping-method-option, .payment-method-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2px 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 8px;
  cursor: pointer;
}

.shipping-method-option:has(input:checked), .payment-method-option:has(input:checked), .payment-method-option.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), .05);
}

.shipping-method-option input, .payment-method-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary);
  grid-row: span 2;
}

.payment-method-option input {
  grid-row: auto;
}

.shipping-method-name, .payment-method-option span {
  font-weight: 600;
  font-size: .93rem;
}

.shipping-method-cost {
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
}

.shipping-method-eta {
  grid-column: 2 / 4;
  font-size: .8rem;
  color: var(--muted);
}

#paymentPanel {
  margin-top: 8px;
}

#paymentPanel .btn-primary {
  min-height: 50px;
  font-size: 1.05rem;
}

#result-message:not(:empty) {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--bs-danger-bg-subtle, #fdecec);
  color: var(--bs-danger-text-emphasis, #8f1d1d);
  font-size: .9rem;
}

#paypal-button-container {
  min-height: 48px;
}

/* ---------- order status pills (orders.js) ---------- */

.order-status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: .7rem;
  font-weight: 700;
  text-transform: capitalize;
  background: var(--surface-2);
  color: var(--muted);
}

.order-status.status-delivered, .order-status.status-paid, .order-status.status-completed {
  background: var(--bs-success-bg-subtle, #e8f7ee);
  color: var(--success);
}

.order-status.status-shipped, .order-status.status-processing {
  background: var(--bs-info-bg-subtle, #e6f4fb);
  color: var(--info);
}

.order-status.status-pending {
  background: var(--bs-warning-bg-subtle, #fff4dc);
  color: var(--accent);
}

.order-status.status-cancelled {
  background: var(--bs-danger-bg-subtle, #fdecec);
  color: var(--danger);
}

.order-header-right .order-status {
  display: none;
}

@media (min-width: 600px) {
  .order-header-right .order-status {
    display: inline-block;
  }
}

.order-chevron .i {
  width: 18px;
  height: 18px;
}

.order-details-loading {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
}

