/* ==========================================================================
   ZENEFIT — design system
   Clinical white · hairline wireframe borders · one precise blue accent
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --bg-blue: #eef4fc;
  --ink: #0b1526;
  --ink-2: #3d4c63;
  --ink-3: #5f6d84;           /* was #7d8ba1 — 3.2:1 on --bg-soft failed WCAG AA */
  --line: #e2e9f2;
  --line-strong: #c6d3e3;
  --blue: #0a63e0;
  --blue-dark: #0748a5;
  --blue-ink: #052e6b;
  --ok: #087f57;              /* darkened for ≥4.5:1 text contrast */
  --warn: #946200;
  --err: #bf3636;
  --radius: 14px;
  --radius-sm: 9px;
  --font-sans: "Helvetica Neue", Helvetica, Arial, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --wrap: 1200px;
  --header-h: 72px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; font-weight: 750; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.08rem; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: #fff; }

/* ---------- utilities ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }
.mono { font-family: var(--font-mono); font-size: 0.82em; letter-spacing: 0.02em; }
.muted { color: var(--ink-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }
.glass {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 18px 50px -22px rgba(11, 33, 74, 0.35);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 56ch; }

/* entrance motion — restrained: opacity + small rise, once
   (visible by default; main.js adds html.reveal-on after marking what is
   already on screen, so only off-screen elements are hidden — never the LCP) */
.reveal-on .reveal { opacity: 0; transform: translateY(16px); }
.reveal-on .reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: var(--radius-sm);
  font-weight: 650; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent;
  transition: background .18s, border-color .18s, color .18s, transform .12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { border-color: #f0caca; color: var(--err); }
.btn-danger:hover { background: var(--err); border-color: var(--err); color: #fff; }
.btn-lg { padding: 17px 30px; font-size: 1.02rem; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px; border: 1px solid var(--line);
}
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-in { color: var(--ok); }
.badge-low { color: var(--warn); }
.badge-out { color: var(--err); }

.pulse-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.pulse-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid var(--ok); opacity: 0.7; animation: pulse 1.8s ease-out infinite;
}
.pulse-lg { width: 12px; height: 12px; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; color: var(--blue); flex: none; }
.brand-word { font-weight: 800; font-size: 1.14rem; letter-spacing: -0.02em; line-height: 1.05; }
.brand-word em {
  display: block; font-style: normal; font-weight: 500;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 2px;
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a {
  padding: 9px 14px; border-radius: 8px; color: var(--ink-2); font-weight: 550; font-size: 0.95rem;
  border: 1px solid transparent;
  transition: border-color .18s, color .18s;
}
.main-nav > a:hover { color: var(--blue); }
.main-nav > a.is-active { color: var(--blue); border-color: var(--line-strong); }
.nav-phone { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.85rem; }
.nav-phone svg { width: 16px; height: 16px; }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; flex-direction: column; gap: 6px; padding: 12px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {   /* faint engineering grid — the wireframe motif */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .45;
  mask-image: linear-gradient(120deg, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(120deg, #000 0%, transparent 55%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 70px);
  align-items: center; padding-block: clamp(48px, 8vw, 110px);
}
.hero-ndis {
  margin-bottom: 14px;
}
.hero-ndis span {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--teal, #0E6E6B); background: rgba(14, 110, 107, 0.09); border: 1px solid rgba(14, 110, 107, 0.2);
  padding: 6px 12px; border-radius: 999px;
}
.hero-copy h1 { margin-bottom: 20px; }
.hero-copy .lede { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.hero-stats > div { padding: 18px 18px 0 0; }
.hero-stats > div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.hero-stats dt { font-size: 1.35rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.hero-stats dd { color: var(--ink-3); font-size: 0.85rem; margin-top: 2px; }
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(11, 33, 74, 0.4);
}
.hero-chip {
  position: absolute; left: -18px; bottom: 28px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius);
}
.hero-chip strong { display: block; font-size: 0.92rem; }
.hero-chip span:not(.pulse-dot) { font-size: 0.78rem; color: var(--ink-2); }

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-tight { padding-block: clamp(28px, 4vw, 48px) clamp(56px, 8vw, 96px); }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- page head (inner pages) ---------- */
.page-head {
  padding-block: clamp(40px, 6vw, 72px) clamp(24px, 3vw, 36px);
  background: linear-gradient(var(--bg-soft), var(--bg));
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 14px; }

/* ---------- category strip ---------- */
.cat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.cat-tile {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 22px 20px; color: var(--ink); font-weight: 650; font-size: 0.95rem;
  border: 1px solid var(--line); margin: -0.5px;
  background: var(--bg);
  transition: border-color .18s, color .18s, background .18s;
}
.cat-tile svg { width: 17px; height: 17px; color: var(--ink-3); transition: color .18s, transform .18s; }
.cat-tile:hover { border-color: var(--blue); color: var(--blue); position: relative; z-index: 1; }
.cat-tile:hover svg { color: var(--blue); transform: translate(2px, -2px); }

/* ---------- product grid & cards ---------- */
.grid-products {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--line);
  gap: 1px;
}
.grid-products.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--bg);
  outline: 1px solid transparent; outline-offset: -1px;
  transition: outline-color .18s;
  overflow-wrap: break-word;
}
.card:hover { outline-color: var(--blue); position: relative; z-index: 1; }
.card-media { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease, opacity .35s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 5px 10px; border-radius: 100px; font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2);
  border: 1px solid var(--line);
}
.card-body { padding: 18px 20px 12px; flex: 1; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-title a { color: var(--ink); transition: color .18s; }
.card:hover .card-title a { color: var(--blue); }
.card-sku { color: var(--ink-3); font-size: 0.72rem; white-space: nowrap; }
.card-desc { color: var(--ink-2); font-size: 0.88rem; margin-top: 8px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.card-price { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.card-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px 16px; border-top: 1px solid var(--line);
}
.card-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 650; font-size: 0.88rem; color: var(--blue); white-space: nowrap;
}
.card-link svg { width: 15px; height: 15px; transition: transform .18s; }
.card-link:hover svg { transform: translateX(3px); }
.quick-lead { display: flex; flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 100px; overflow: hidden; transition: border-color .18s; }
.quick-lead:focus-within { border-color: var(--blue); }
.quick-lead input {
  flex: 1; min-width: 0; border: 0; padding: 8px 14px; font-size: 0.82rem; background: transparent;
}
.quick-lead input:focus { outline: none; }
.quick-lead button { padding: 0 13px; color: var(--blue); }
.quick-lead button svg { width: 15px; height: 15px; }
.quick-lead.done { border-color: var(--ok); }
.quick-lead .quick-done {
  flex: 1; padding: 8px 14px; font-size: 0.82rem; color: var(--ok); font-weight: 650;
}

/* ---------- trust / steps ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.trust-grid-3 { grid-template-columns: repeat(3, 1fr); }
.trust-item { background: var(--bg); padding: 26px 24px; }
.trust-no { color: var(--blue); display: block; margin-bottom: 14px; }
.trust-item h3 { margin-bottom: 10px; }
.trust-item p { color: var(--ink-2); font-size: 0.92rem; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; counter-reset: step; }
.step { background: var(--bg); padding: 30px 26px; }
.step-no { color: var(--blue); display: block; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.12em; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--blue); border-radius: var(--radius);
  background:
    radial-gradient(600px 200px at 90% 0%, rgba(10, 99, 224, 0.12), transparent 70%),
    var(--bg-blue);
}
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.testimonial {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px;
  margin-bottom: 30px;
}
.testimonial p { font-size: 1.08rem; font-style: italic; color: var(--ink-2); line-height: 1.6; }
.testimonial footer { margin-top: 14px; font-size: 0.82rem; color: var(--ink-3); }

/* customer reviews grid (About page — admin → Reviews) */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-bottom: 30px; }
.reviews-grid .testimonial { margin-bottom: 0; }

/* ---------- toolbar search (catalog filter sidebar) ---------- */
.toolbar-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; transition: border-color .18s; }
.toolbar-search:focus-within { border-color: var(--blue); }
.toolbar-search svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.toolbar-search input { flex: 1; min-width: 0; border: 0; padding: 11px 0; }
.toolbar-search input:focus { outline: none; }

.empty-state { text-align: center; padding: clamp(50px, 8vw, 90px) 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state .mono { color: var(--blue); margin-bottom: 10px; display: block; }
.empty-state h2, .empty-state h1 { margin-bottom: 12px; }
.empty-state p { color: var(--ink-2); margin-bottom: 22px; }

.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 34px; }
.pagination a, .pagination span {
  min-width: 40px; text-align: center; padding: 9px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 0.9rem;
}
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination .is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 22px; font-size: 0.85rem; color: var(--ink-3); }
.breadcrumbs a { color: var(--ink-2); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- product detail ---------- */
.product-layout { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(26px, 4vw, 56px); align-items: start; margin-bottom: clamp(40px, 6vw, 70px); }
.media-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 100px; margin-bottom: 14px; }
.media-tabs button {
  padding: 8px 20px; border-radius: 100px; font-weight: 650; font-size: 0.88rem; color: var(--ink-2);
  transition: background .18s, color .18s;
}
.media-tabs button.is-active { background: var(--ink); color: #fff; }
.media-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }

.viewer3d { position: relative; aspect-ratio: 4 / 3; touch-action: pan-y; } /* pan-y: phones can still scroll past the model */
.viewer3d canvas { width: 100%; height: 100%; cursor: grab; }
.viewer3d canvas:active { cursor: grabbing; }
.viewer-loading {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3);
  transition: opacity .4s; pointer-events: none;
}
.viewer3d.ready .viewer-loading { opacity: 0; }
.viewer-hint {
  position: absolute; left: 14px; bottom: 12px; display: flex; align-items: center; gap: 8px;
  color: var(--ink-3); font-size: 0.72rem; pointer-events: none;
}
.viewer-hint svg { width: 15px; height: 15px; }
.viewer-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: rgba(255,255,255,.85); }
.viewer-zoom button { width: 38px; height: 38px; font-size: 1.15rem; color: var(--ink-2); transition: background .15s, color .15s; }
.viewer-zoom button:hover { background: var(--blue); color: #fff; }
.viewer-zoom button + button { border-top: 1px solid var(--line); }

.gallery { display: grid; place-items: center; background: var(--bg-soft); }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; transition: transform .35s ease, opacity .35s ease; }
.gallery-main-btn:hover img { transform: scale(1.03); }
.gallery-thumbs { display: flex; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.thumb { flex: 1; display: grid; place-items: center; opacity: .65; transition: opacity .18s; border-top: 2px solid transparent; background: var(--bg-soft); }
.thumb img { width: 100%; aspect-ratio: 3/2; object-fit: contain; transition: transform .35s ease, opacity .35s ease; }
.thumb:hover img, .thumb.is-active img { transform: scale(1.04); }
.thumb.is-active, .thumb:hover { opacity: 1; }
.thumb.is-active { border-top-color: var(--blue); }

.product-info { position: sticky; top: calc(var(--header-h) + 20px); }
.product-info h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 12px; }
.product-info .sku { color: var(--ink-3); margin-left: 10px; letter-spacing: 0.05em; }
.price-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 22px 0 8px; padding: 18px 22px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.price-panel .card-price { font-size: clamp(2.1rem, 8vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.price-panel .badge { font-size: 0.85rem; padding: 8px 14px; }
.live-viewers {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: var(--ink-2);
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px; margin: 8px 0 0;
}
.live-viewers[hidden] { display: none; }
.buy-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.buy-note { font-size: 0.82rem; color: var(--ink-3); margin-top: 12px; }
.buy-total { font-size: 1.1rem; line-height: 1.4; }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 30px; border-top: 1px solid var(--line-strong); }
.spec-table caption { text-align: left; padding: 12px 0; color: var(--blue); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem; }
.spec-table th, .spec-table td { padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.spec-table th { font-family: var(--font-mono); font-weight: 500; font-size: 0.8rem; color: var(--ink-3); width: 42%; padding-right: 18px; }
.spec-table td { font-size: 0.92rem; }

.product-desc { max-width: 74ch; margin-bottom: clamp(40px, 6vw, 70px); }
.product-desc h2 { margin-bottom: 14px; }
.product-desc p { color: var(--ink-2); }

/* ---------- product detail v2 ---------- */
.product-cat {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--blue);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 100px; margin-bottom: 12px;
}
.product-info h1 { margin-bottom: 10px; }
.product-tagline { font-size: 1.08rem; color: var(--ink-2); max-width: 52ch; margin-bottom: 6px; }

.product-highlights {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: grid; gap: 8px;
}
.product-highlights li {
  display: flex; gap: 10px; align-items: baseline;
  font-size: 0.94rem; color: var(--ink-2);
  padding: 9px 12px; background: var(--bg-soft); border-radius: var(--radius-sm);
}
.product-highlights strong {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); flex: 0 0 auto;
}
.product-highlights span { color: var(--ink-2); }

.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px;
}
.trust-row span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.78rem; color: var(--ink-2);
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 100px;
}
.trust-row svg { width: 15px; height: 15px; color: var(--blue); }

.gallery-main-btn {
  display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in;
}
.gallery-main-btn img { width: 100%; }

.product-benefits { margin-bottom: clamp(50px, 7vw, 90px); }
.product-benefits .section-head { margin-bottom: 28px; }
.benefits-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.benefit-card {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); transition: border-color .2s, box-shadow .2s;
}
.benefit-card:hover { border-color: var(--line-strong); box-shadow: 0 14px 34px -20px rgba(11,33,74,.12); }
.benefit-icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; background: var(--bg-blue); color: var(--blue); margin-bottom: 16px;
}
.benefit-icon svg { width: 22px; height: 22px; }
.benefit-card h3 { font-size: 1.02rem; margin-bottom: 7px; }
.benefit-card p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.5; }

.product-details { margin-bottom: clamp(50px, 7vw, 90px); }
.details-tabs {
  display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 100px; margin-bottom: 22px;
}
.details-tabs button {
  padding: 9px 22px; border-radius: 100px; font-weight: 650; font-size: 0.88rem; color: var(--ink-2);
  transition: background .18s, color .18s;
}
.details-tabs button.is-active { background: var(--ink); color: #fff; }
.detail-panel { animation: fade-in .35s ease; }
.detail-panel[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.prose { max-width: 72ch; color: var(--ink-2); line-height: 1.75; }
.prose p { margin-bottom: 16px; }
.prose p:last-child { margin-bottom: 0; }

.product-faq { margin-bottom: clamp(50px, 7vw, 90px); }
.product-faq .section-head { margin-bottom: 22px; }
.faq-list { max-width: 820px; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; font-weight: 650; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; flex: 0 0 24px; text-align: center;
  font-size: 1.3rem; color: var(--blue); line-height: 1;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  padding: 0 18px 18px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.65;
}

.product-testimonial { margin-bottom: clamp(50px, 7vw, 90px); }
.product-testimonial blockquote {
  max-width: 820px; margin: 0 auto; text-align: center;
  padding: clamp(30px, 5vw, 54px) clamp(24px, 5vw, 60px);
  background: var(--bg-soft); border-radius: var(--radius);
}
.product-testimonial blockquote p {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.45; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: 18px;
}
.product-testimonial cite {
  font-style: normal; font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}

.product-related { margin-bottom: clamp(40px, 6vw, 70px); }

.product-actions-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 280;
  padding: 12px clamp(14px, 4vw, 30px); gap: 10px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -12px rgba(11,33,74,.12);
}
.product-actions-bar.is-visible { display: flex; }
.product-actions-bar .btn { flex: 1; min-width: 0; white-space: nowrap; }
.product-actions-bar .btn svg { width: 18px; height: 18px; }

.img-zoom {
  position: fixed; inset: 0; z-index: 400; background: rgba(11,21,38,.92);
  display: grid; place-items: center; padding: 20px;
}
.img-zoom[hidden] { display: none; }
.img-zoom img { max-width: 100%; max-height: calc(100vh - 40px); object-fit: contain; }
.img-zoom-close {
  position: absolute; top: 16px; right: 16px; width: 46px; height: 46px;
  display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12);
  border-radius: 50%; backdrop-filter: blur(4px);
}
.img-zoom-close svg { width: 22px; height: 22px; }

/* ---------- legal pages (privacy / cookies / terms) ---------- */
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.legal-meta span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line);
  border-radius: 100px; padding: 6px 12px; }
.legal-page { max-width: 1200px; width: 85%; margin-inline: auto; font-size: 0.98rem; line-height: 1.75; color: var(--ink-2); }
@media (max-width: 600px) {
  .legal-page { width: 100%; }
}
.legal-page strong { color: var(--ink); font-weight: 650; }
.legal-page p { margin: 0 0 16px; }
.legal-page ul { margin: 0 0 18px; padding-left: 2px; list-style: none; }
.legal-page ul li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.legal-page ul li::before { content: "—"; position: absolute; left: 0; color: var(--ink-3); }
.legal-page address { font-style: normal; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 20px; margin-bottom: 18px; line-height: 1.7; }
.legal-page a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--line-strong); transition: text-decoration-color .15s; }
.legal-page a:hover { text-decoration-color: var(--blue); }

.legal-toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
  margin-bottom: 14px; background: var(--bg); }
.legal-toc-h { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 34px;
  counter-reset: toc; }
.legal-toc li { counter-increment: toc; margin-bottom: 2px; break-inside: avoid; }
.legal-toc a { display: block; padding: 5px 0; color: var(--ink-2); text-decoration: none;
  font-size: 0.92rem; transition: color .15s; }
.legal-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono);
  font-size: 0.72rem; color: var(--ink-3); margin-right: 10px; }
.legal-toc a:hover { color: var(--blue); }

.legal-doc { counter-reset: sec; }
.legal-sec { border-top: 1px solid var(--line); padding: clamp(26px, 4vw, 40px) 0 6px; }
.legal-sec h2 { counter-increment: sec; font-size: 1.28rem; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 16px; }
.legal-sec h2::before { content: counter(sec, decimal-leading-zero); display: inline-block;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; color: var(--ink-3);
  letter-spacing: 0.06em; margin-right: 14px; vertical-align: 4px; }
.legal-sec h3 { font-size: 1.02rem; color: var(--ink); margin: 22px 0 10px; }

.legal-note { background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--blue); border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 0 0 18px; }
.legal-note p { margin: 0; }
.legal-note p + p { margin-top: 10px; }
.legal-note .legal-note-h { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }

.legal-page .spec-table { margin: 6px 0 20px; }
.legal-page .spec-table th { width: 34%; font-size: 0.82rem; color: var(--ink-2); font-weight: 650;
  font-family: var(--font-sans); }
.legal-page .spec-table td { font-size: 0.9rem; }
.legal-page .spec-table thead th { font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }

.legal-back { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-back a { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--ink-3); text-decoration: none; }
.legal-back a:hover { color: var(--blue); }
.legal-updated { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3);
  margin-top: 26px; }

@media (min-width: 1000px) {
  .legal-toc ol { columns: 3; }
}
@media (max-width: 720px) {
  .legal-toc ol { columns: 1; }
}

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field[hidden] { display: none; }   /* restore hiding — display:flex above beats the UA [hidden] rule */
.field label { font-weight: 650; font-size: 0.86rem; }
.field input, .field textarea, .field select {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--bg); transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 99, 224, 0.14);
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-narrow { max-width: 130px; }
.lead-billing {
  border: 1px solid var(--line); border-left: 3px solid var(--teal, #0E6E6B); border-radius: 12px;
  background: var(--bg-soft); padding: 18px 20px 4px; margin: 8px 0 20px;
}
.lead-billing-head {
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.field-row-3 { grid-template-columns: 1fr 1fr 1.2fr; }
.form-hint { font-size: 0.78rem; color: var(--ink-3); margin-bottom: 12px; }
.chat-disclaimer { font-size: 0.72rem; color: var(--ink-3); margin: 6px 12px 0; }
.form-error { color: var(--err); font-size: 0.86rem; font-weight: 600; margin-bottom: 12px; }
.form-success { color: var(--ok); font-size: 0.9rem; font-weight: 650; margin-bottom: 12px; }
.hp { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; margin: 4px 0 16px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 38, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(640px, 100%); max-height: 92vh; overflow: auto;
  border-radius: 20px; padding: clamp(28px, 5vw, 48px);
  box-shadow: 0 34px 90px -24px rgba(8, 18, 38, 0.45);
  animation: modal-in .25s cubic-bezier(.2,.8,.3,1.1);
  scrollbar-width: thin;
}
.modal-card::-webkit-scrollbar { width: 8px; }
.modal-card::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-close { position: absolute; top: 14px; right: 14px; padding: 9px; color: var(--ink-3); border-radius: 8px; }
.modal-close:hover { color: var(--ink); background: rgba(11, 21, 38, 0.06); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body h2 { margin-bottom: 10px; font-size: 1.7rem; }
.modal-product {
  display: inline-block; font-weight: 650; color: var(--blue); margin-bottom: 18px;
  background: rgba(10, 99, 224, 0.09); border: 1px solid rgba(10, 99, 224, 0.18);
  padding: 8px 14px; border-radius: 999px; font-size: 0.92rem;
}
.modal-body form { margin-top: 20px; }
.modal-success { text-align: center; padding: 20px 6px; }

/* roomier, softer fields — quote modal only (contact page keeps its density) */
#leadModal .field { margin-bottom: 20px; }
#leadModal .field-row { gap: 16px; }
#leadModal .field input, #leadModal .field textarea, #leadModal .field select {
  padding: 14px 16px; border-color: var(--line); border-radius: 10px;
}
#leadModal .form-hint { margin: 4px 0 16px; }
#leadModal .lead-form .btn-block { margin-top: 6px; }
.success-mark { width: 64px; height: 64px; color: var(--ok); margin: 0 auto 18px; }
.modal-success p { color: var(--ink-2); margin: 10px 0 22px; }

/* ---------- toasts ---------- */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 400; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  padding: 14px 18px; border-radius: 12px; font-size: 0.9rem;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.5);
  animation: modal-in .25s ease;
  max-width: 340px;
}
.toast.ok { background: #065f46; }
.toast.err { background: #7f1d1d; }
.toast .mono { opacity: .65; }

/* ---------- about / contact ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.about-copy h2 { margin: 26px 0 12px; }
.about-copy h2:first-child { margin-top: 0; }
.about-copy p { color: var(--ink-2); margin-bottom: 14px; }
.about-facts { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.about-facts dl > div { padding: 20px 22px; }
.about-facts dl > div + div { border-top: 1px solid var(--line); }
.about-facts dt { font-size: 1.5rem; font-weight: 700; color: var(--blue); }
.about-facts dd { color: var(--ink-2); font-size: 0.88rem; }
.contact-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 50px); align-items: start; }
.contact-card { border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); }
.contact-card h2 { margin-bottom: 20px; }
.contact-aside { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.contact-block { background: var(--bg); padding: 24px; }
.contact-block h3 { color: var(--blue); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem; margin-bottom: 10px; }
.contact-big { font-size: 1.15rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
a.contact-big:hover { color: var(--blue); }
.contact-block p { color: var(--ink-2); font-size: 0.88rem; margin-top: 6px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr .9fr .9fr .9fr 1.1fr; gap: 30px;
  padding-block: clamp(40px, 6vw, 64px);
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-tag { font-weight: 750; line-height: 1.3; }
.footer-tag span { font-weight: 500; color: var(--ink-3); font-size: 0.85rem; }
.footer-h { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-3); margin-bottom: 14px; }
.site-footer nav a { display: block; color: var(--ink-2); padding: 4px 0; font-size: 0.92rem; }
.site-footer nav a:hover { color: var(--blue); }
.footer-contact { font-style: normal; }
.footer-contact a, .footer-contact span { display: block; padding: 4px 0; color: var(--ink-2); font-size: 0.92rem; }
.footer-base {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-block: 20px; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 0.82rem;
}
.footer-disclaimer { flex-basis: 100%; font-size: 0.78rem; color: var(--ink-3); margin: 0 0 8px; }

/* ---------- login ---------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(700px 320px at 80% -10%, rgba(10, 99, 224, 0.14), transparent 60%),
    var(--bg-soft);
}
.login-card { width: min(400px, 100%); border-radius: 18px; padding: 38px; text-align: center; border: 1px solid var(--line); }
.login-card .brand-mark { width: 42px; height: 42px; margin: 0 auto 18px; }
.login-card h1 { font-size: 1.4rem; margin-bottom: 6px; }
.login-sub { color: var(--ink-2); font-size: 0.9rem; margin-bottom: 24px; }
.login-card form { text-align: left; }
.login-back { display: inline-block; margin-top: 20px; font-size: 0.85rem; color: var(--ink-3); }

/* ---------- admin ---------- */
.admin-body { background: var(--bg-soft); min-height: 100vh; }
.admin-top { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 90; }
.admin-top-inner { display: flex; align-items: center; gap: 18px; min-height: 60px; padding-block: 6px; }
.admin-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.admin-nav a { padding: 7px 11px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 600; font-size: 0.85rem; white-space: nowrap; flex: 0 0 auto; }
.admin-nav a:hover { color: var(--blue); background: var(--bg-soft); }
.admin-nav a.is-active { color: var(--blue); background: var(--bg-blue); }

/* "More" dropdown — grouped sections that don't fit as primary pills */
.admin-more { position: relative; flex: 0 0 auto; }
.admin-more-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px;
  border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer;
  color: var(--ink-2); font: inherit; font-weight: 600; font-size: 0.85rem; white-space: nowrap;
}
.admin-more-btn:hover { color: var(--blue); background: var(--bg-soft); }
.admin-more-btn.is-active { color: var(--blue); background: var(--bg-blue); }
.admin-more-btn .admin-caret { width: 13px; height: 13px; }
.admin-more.is-open .admin-caret { transform: rotate(180deg); }
.admin-more-panel {
  position: absolute; left: 0; top: calc(100% + 8px); min-width: 190px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(11, 21, 38, 0.14); padding: 6px; z-index: 95;
}
.admin-more-panel a {
  display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 7px;
  color: var(--ink-2); font-size: 0.86rem; font-weight: 600;
}
.admin-more-panel a:hover { background: var(--bg-soft); color: var(--blue); }
.admin-more-panel a.is-active { color: var(--blue); background: var(--bg-blue); }

/* Mandarin coverage chip in the admin products table */
.zh-chip {
  display: inline-block; min-width: 18px; height: 18px; padding-inline: 4px;
  border-radius: 5px; background: var(--bg-blue); color: var(--blue);
  font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center;
  vertical-align: 2px;
}

/* quick action buttons (+ Product / + Invoice) */
.admin-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.admin-actions .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.admin-actions .btn svg { width: 14px; height: 14px; }

/* user identity + dropdown */
.admin-user { position: relative; flex: 0 0 auto; }
.admin-user-btn {
  display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent;
  color: var(--ink); cursor: pointer; font: inherit;
}
.admin-user-btn:hover, .admin-user.is-open .admin-user-btn { border-color: var(--line); background: var(--bg-soft); }
.admin-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  background: var(--blue); color: #fff; font-size: 0.78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; letter-spacing: 0.02em;
}
.admin-user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.admin-user-meta strong { font-size: 0.82rem; font-weight: 700; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-meta em { font-style: normal; font-size: 0.68rem; color: var(--ink-3); }
.admin-caret { width: 14px; height: 14px; color: var(--ink-3); }
.admin-user.is-open .admin-caret { transform: rotate(180deg); }
.admin-user-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(11, 21, 38, 0.14); padding: 6px; z-index: 95;
}
.admin-user-panel a {
  display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 7px;
  color: var(--ink-2); font-size: 0.86rem; font-weight: 600;
}
.admin-user-panel a:hover { background: var(--bg-soft); color: var(--blue); }
.admin-user-panel a.danger { color: var(--err); }
.admin-user-panel a.danger:hover { background: #fdf1f1; color: var(--err); }
.admin-user-panel hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }

/* hamburger + mobile panel (hidden on desktop) */
.admin-burger {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); cursor: pointer; flex: 0 0 auto;
}
.admin-burger svg { width: 20px; height: 20px; }
.admin-burger:hover { color: var(--blue); border-color: var(--blue); }
.admin-menu { display: none; }
.admin-main { padding-block: 26px 60px; display: flex; flex-direction: column; gap: 22px; }

.live-band {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--ink); color: #fff;
  border-radius: var(--radius); padding: 18px 24px;
}
.live-now { display: flex; align-items: center; gap: 14px; }
.live-count { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; display: block; line-height: 1; }
.live-label { font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); }
.live-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.live-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 100px;
  padding: 6px 13px; font-size: 0.8rem;
}
.live-chip .mono { color: #7fd3ff; }
.live-chip.is-hot { border-color: var(--ok); }
.live-side { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.live-side .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.live-side .btn-ghost:hover { border-color: #fff; color: #fff; }
.live-side .btn-ghost[aria-pressed="false"] { opacity: .5; }
.live-side .muted { color: rgba(255, 255, 255, 0.5); }

.kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpi { background: var(--bg); padding: 18px 20px; }
.kpi .mono { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.66rem; display: block; margin-bottom: 8px; }
.kpi strong { font-size: 1.55rem; letter-spacing: -0.02em; }
.kpi-hot strong { color: var(--blue); }

.admin-panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 1.05rem; }
.panel-head .muted { font-size: 0.82rem; }
.panel-title { padding: 18px 22px 0; font-size: 1.05rem; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th {
  text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3);
  padding: 12px 16px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table tbody tr { transition: background .15s; }
.admin-table tbody tr:hover { background: var(--bg-soft); }
.admin-table tr.is-new { background: #e8f7ef; animation: flash-row 2.4s ease; }
@keyframes flash-row { 0% { background: #b9ecd3; } 100% { background: #e8f7ef; } }
.row-thumb { width: 96px; height: 72px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); display: block; }
.row-thumb-link { display: inline-block; border-radius: 8px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.row-thumb-link:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.row-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; row-gap: 6px; }
.row-actions .btn { min-width: 96px; }
.row-actions form { display: inline; }
.lead-contact a { display: block; }
.lead-msg { max-width: 260px; }
.lead-msg span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-msg-toggle { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit;
  text-align: left; cursor: pointer; max-width: 100%; }
.lead-msg-toggle:hover span { color: var(--blue); }
.lead-detail td { background: var(--bg-soft); }
.lead-detail-msg { white-space: normal; line-height: 1.55; margin-bottom: 10px; }
.lead-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 22px; line-height: 1.45; }
.ref-cell a { word-break: break-all; }
/* ---------- referrals page ---------- */
.ref-add-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px;
  padding: 20px 22px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.ref-add-form .field { margin-bottom: 0; gap: 8px; flex: 1 1 220px; min-width: 0; }
.ref-add-form .field-narrow { flex: 0 0 140px; max-width: none; }
.ref-add-form .field label { white-space: nowrap; }
.ref-add-form input, .ref-add-form select { height: 46px; padding: 0 14px; }
.ref-add-form .btn { height: 46px; padding: 0 26px; }
.ref-link-row { display: flex; gap: 8px; align-items: center; }
.ref-link { height: 38px; padding: 0 12px; flex: 1; min-width: 260px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 0.78rem; background: var(--bg-soft);
  transition: border-color .18s, box-shadow .18s; }
.ref-link:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 99, 224, 0.14); }
.ref-link-row .btn { height: 38px; padding: 0 14px; }

/* settings — catalog drag & drop category manager */
.cat-sort { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column;
  gap: 6px; max-width: 560px; }
.cat-sort-item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px 0 10px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.cat-sort-item.is-dragging { opacity: .4; }
.cat-drag { cursor: grab; color: var(--ink-2); font-size: .9rem; letter-spacing: -2px; user-select: none;
  touch-action: none; }
.cat-sort-item:active .cat-drag { cursor: grabbing; }
.cat-sort-name { flex: 1; font-weight: 650; font-size: .9rem; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.cat-sort-item .badge { flex-shrink: 0; }
.cat-sort-remove { min-width: 0; padding: 0 14px; height: 32px; font-size: 1rem; line-height: 1; }
.cat-sort-add { display: flex; gap: 10px; max-width: 560px; margin-top: 10px; padding: 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.cat-sort-add input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; }
.cat-sort-add .btn { height: 46px; padding: 0 22px; }
.cat-sort-add input.is-invalid { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214, 69, 69, .15); }
@media (max-width: 720px) {
  .cat-sort-add { flex-direction: column; }
  .cat-sort-add .btn { width: 100%; }
}

/* dashboard — lead filters */
.lead-filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 22px;
  background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.lead-filters input, .lead-filters select { height: 46px; padding: 0 14px; min-width: 0; }
.lead-filters input { flex: 1 1 180px; }
.lead-filters select { flex: 0 0 170px; }
.lead-filters .btn { height: 46px; min-width: 0; padding: 0 18px; }
@media (max-width: 720px) {
  .lead-filters input, .lead-filters select, .lead-filters .btn { flex: 1 1 100%; width: 100%; }
}

/* referrals — traffic reports */
.kpi-row.kpi-4 { grid-template-columns: repeat(4, 1fr); }
.report-kpis { margin: 20px 22px 8px; }
.report-h { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); padding: 18px 22px 4px; }
.report-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 22px 0; }
.report-bar { flex: 1; min-height: 3px; background: var(--blue); opacity: 0.75;
  border-radius: 3px 3px 0 0; transition: opacity .15s; }
.report-bar:hover { opacity: 1; }
.report-bar.is-today { opacity: 1; background: var(--blue-dark); }
.report-axis { display: flex; justify-content: space-between; font-size: 0.72rem;
  padding: 6px 22px 18px; border-bottom: 1px solid var(--line); }
.report-empty { padding: 10px 22px 20px; border-bottom: 1px solid var(--line); }
.report-share { display: flex; flex-direction: column; gap: 12px; padding: 12px 22px 22px; }
.report-share-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto;
  gap: 14px; align-items: center; font-size: 0.86rem; }
.report-share-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-share-track { height: 10px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 100px; overflow: hidden; }
.report-share-fill { display: block; height: 100%; min-width: 2px; background: var(--blue);
  border-radius: 100px; transition: width .3s; }
.status-select {
  border: 1px solid var(--line-strong); border-radius: 100px; padding: 6px 12px;
  font-size: 0.78rem; font-weight: 650; background: var(--bg);
}
.status-select.st-new { color: var(--blue); border-color: var(--blue); }
.status-select.st-contacted { color: var(--warn); border-color: #e3c98a; }
.status-select.st-closed { color: var(--ok); border-color: #9fd9c0; }
.payment-select {
  border: 1px solid var(--line-strong); border-radius: 100px; padding: 5px 10px;
  font-size: 0.72rem; font-weight: 600; background: var(--bg);
}
.payment-select.ps-unpaid { color: var(--muted); border-color: var(--line-strong); }
.payment-select.ps-pending { color: #946c00; border-color: #f8e3a3; background: #fff8e6; }
.payment-select.ps-paid { color: #177245; border-color: #b7e4c7; background: #e8f7ee; }
.page-actions { padding: 4px 0 8px; border: 0; align-items: center; }
.page-actions h1 { font-size: 1.5rem; }
.admin-flash {
  padding: 12px 18px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600;
  background: var(--bg-blue); border: 1px solid var(--blue); color: var(--blue-ink);
}
.admin-flash.ok { background: #e8f7ef; border-color: #9fd9c0; color: #065f46; }
.admin-flash.err { background: #fdecec; border-color: #f0caca; color: #7f1d1d; }

/* ── Product editor: two-column workspace with sticky side rail ────────── */
.edit-form .edit-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.edit-main { display: grid; gap: 22px; }
.edit-side { position: sticky; top: 22px; display: grid; gap: 22px; }
.edit-form .admin-panel { padding-bottom: 20px; }
.edit-form .admin-panel .field, .edit-form .admin-panel .field-row, .edit-form .admin-panel .check { padding-inline: 22px; }

.panel-title-ic { display: flex; align-items: center; gap: 9px; }
.panel-title-ic svg { width: 17px; height: 17px; color: var(--blue); flex: none; }
.panel-sub { font-size: 0.8rem; color: var(--ink-3); padding: 5px 22px 14px; }

/* side rail */
.side-actions { display: grid; gap: 10px; padding: 16px 22px 4px; }
.side-3d .viewer3d { margin: 2px 22px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.side-3d #previewHint { padding: 12px 22px 0; }

/* char counter */
.char-count { align-self: flex-end; font-size: 0.72rem; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-top: -8px; }

/* images */
.img-current img { width: 220px; display: block; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 4px 22px 12px; }
.pick-previews { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 6px; }
.pick-previews:empty { display: none; }
.pick-chip { position: relative; width: 84px; height: 60px; border-radius: 8px; overflow: hidden; border: 1px dashed var(--line-strong); margin: 0; }
.pick-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-chip span { position: absolute; left: 4px; bottom: 4px; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--blue); color: #fff; border-radius: 4px; padding: 1px 6px; }

/* existing gallery: click a thumb to mark it for removal, click again to keep */
.gallery-sub { padding-bottom: 10px; }
.gallery-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 22px; }
.gal-thumb { position: relative; width: 110px; height: 78px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; transition: transform .15s; }
.gal-thumb:hover { transform: translateY(-2px); }
.gal-thumb:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.gal-thumb input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s; }
.gal-x { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--err); font-weight: 700; font-size: 0.85rem; line-height: 1; box-shadow: 0 1px 4px rgba(11,33,74,.18); opacity: 0; transition: opacity .15s; pointer-events: none; }
.gal-thumb:hover .gal-x, .gal-thumb.is-del .gal-x { opacity: 1; }
.gal-thumb.is-del { outline: 2px solid var(--err); }
.gal-thumb.is-del img { opacity: .45; }
.gal-thumb.is-del .gal-x { background: var(--err); color: #fff; }

/* spec + selling-point rows */
.spec-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 10px; padding: 6px 22px; }
.spec-row input { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 13px; }
.spec-row input:focus { outline: none; border-color: var(--blue); }
#specAdd { margin: 12px 22px 0; }
.benefit-row { display: grid; grid-template-columns: 170px 1.2fr 1.6fr auto; gap: 10px; padding: 6px 22px; }
.benefit-row select,
.benefit-row input { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 13px; }
.benefit-row select { background: var(--bg); }
.benefit-row input:focus, .benefit-row select:focus { outline: none; border-color: var(--blue); }
#benefitAdd { margin: 12px 22px 0; }

.edit-actions { margin-top: 0; }
.edit-actions .btn { width: 100%; }

/* gentle entry animation (respects reduced motion) */
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.edit-form .admin-panel { animation: panel-in .35s ease both; }
.edit-side .admin-panel:nth-child(2) { animation-delay: .06s; }
@media (prefers-reduced-motion: reduce) { .edit-form .admin-panel { animation: none; } }

@media (max-width: 1080px) {
  .edit-form .edit-layout { grid-template-columns: 1fr; }
  .edit-side { position: static; }
  .edit-actions { display: none; } /* Publish card follows immediately after */
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .grid-products, .grid-products.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid, .trust-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-chip { left: 14px; }
  .product-layout { grid-template-columns: 1fr; }
  .product-info { position: static; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .ref-add-form .field, .ref-add-form .field-narrow { flex: 1 1 100%; }
  .ref-add-form .btn { width: 100%; }
  .ref-link-row { flex-direction: column; align-items: stretch; }
  .ref-link { min-width: 0; }
  .ref-link-row .btn { width: 100%; }
  .main-nav {
    display: none; position: absolute; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 14px clamp(18px, 4vw, 40px) 20px;
    box-shadow: 0 30px 40px -30px rgba(11, 33, 74, 0.4);
  }
  .main-nav.is-open { display: flex; }
  .main-nav > a { padding: 13px 12px; font-size: 1rem; }
  .nav-phone { justify-content: center; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
  .nav-cta { margin: 6px 0 0; }
  .nav-toggle { display: flex; }
  .toolbar { grid-template-columns: 1fr; position: static; }
  .steps { grid-template-columns: 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .hero-stats dt { font-size: 1.1rem; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .live-band { gap: 14px; }
  .live-side { margin-left: 0; width: 100%; justify-content: space-between; }
  .footer-grid { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 1fr; }
  .benefit-row { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .details-tabs { display: flex; width: 100%; }
  .details-tabs button { flex: 1; }
  .product-highlights { grid-template-columns: 1fr; }
  .trust-row { justify-content: center; }
  body { padding-bottom: 74px; }
  .buy-actions .btn { width: 100%; }
  .product-actions-bar { flex-wrap: wrap; }
  .product-actions-bar .btn { flex: 1 1 auto; min-width: calc(50% - 5px); }
}
@media (max-width: 480px) {
  .grid-products, .grid-products.grid-4 { grid-template-columns: 1fr; }
  .trust-grid, .trust-grid-3 { grid-template-columns: 1fr; }
  #leadModal .field-row { grid-template-columns: 1fr; }
  #leadModal .field-narrow { max-width: none; }
}

/* ---------- chat widget (visitor) ---------- */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 380; }
.chat-bubble {
  position: relative; width: 72px; height: 72px; border-radius: 50%;
  background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -12px rgba(10, 99, 224, 0.65);
  transition: transform .18s ease, background .18s ease;
}
.chat-bubble:hover { transform: translateY(-2px); background: var(--blue-dark); }
.chat-bubble svg { width: 34px; height: 34px; }
.chat-bubble .chat-ico-close { display: none; }
.chat-widget.is-open .chat-ico-open { display: none; }
.chat-widget.is-open .chat-ico-close { display: block; }
.chat-bubble-badge {
  position: absolute; top: -3px; right: -3px; min-width: 26px; height: 26px;
  border-radius: 100px; background: var(--err); color: #fff;
  font-size: 0.85rem; font-weight: 700; line-height: 26px; text-align: center;
  padding-inline: 6px; border: 2px solid var(--bg);
}

/* welcome teaser — chatbot message bubble ("We are here to help you!") */
.chat-teaser {
  position: absolute; right: 0; bottom: 86px; width: min(320px, calc(100vw - 32px));
  display: flex; align-items: flex-end; gap: 10px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s ease, transform .4s ease;
}
.chat-teaser[hidden] { display: none; }
.chat-teaser.is-in { opacity: 1; transform: none; }
.chat-teaser-avatar {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -8px rgba(10, 99, 224, 0.65);
}
.chat-teaser-avatar svg { width: 19px; height: 19px; }
.chat-teaser-bubble {
  flex: 1 1 auto; text-align: left; padding: 11px 15px;
  background: var(--bg-soft); border: 1px solid var(--line-strong);
  border-radius: 15px; border-bottom-left-radius: 4px;
  box-shadow: 0 18px 38px -22px rgba(11, 33, 74, 0.4);
  font-size: 0.98rem; line-height: 1.45; color: var(--ink);
  transition: border-color .18s ease, background .18s ease;
}
.chat-teaser-bubble:hover { border-color: var(--blue); background: var(--bg-blue); }
.chat-teaser-from {
  display: block; margin-bottom: 2px;
  color: var(--ink-3); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.chat-teaser-close {
  position: absolute; top: -12px; right: -6px; padding: 6px; border-radius: 8px; color: var(--ink-3);
  background: var(--bg); border: 1px solid var(--line);
}
.chat-teaser-close:hover { color: var(--ink); background: var(--bg-blue); }
.chat-teaser-close svg { width: 16px; height: 16px; display: block; }
@media (prefers-reduced-motion: reduce) {
  .chat-teaser { transition: none; opacity: 1; transform: none; }
}

.chat-panel {
  position: absolute; right: 0; bottom: 86px; width: min(460px, calc(100vw - 32px));
  height: min(660px, calc(100vh - 130px));
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 34px 70px -34px rgba(11, 33, 74, 0.45);
  overflow: hidden;
}
/* author display rules beat the UA [hidden] rule — restore hiding
   (same pattern as .modal[hidden]) */
.chat-panel[hidden],
.chat-conv-composer[hidden],
.chat-human-btn[hidden] { display: none; }
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.chat-head strong { display: block; font-size: 1.1rem; letter-spacing: -0.01em; }
.chat-status { color: var(--ink-3); font-size: 0.78rem; }
.chat-head-close { color: var(--ink-3); padding: 10px; border-radius: 10px; }
.chat-head-close:hover { color: var(--ink); background: var(--bg-blue); }
.chat-head-close svg { width: 24px; height: 24px; }

.chat-log { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.chat-msg { max-width: 88%; display: flex; flex-direction: column; gap: 4px; }
.chat-msg-body {
  padding: 13px 16px; border-radius: 15px; font-size: 1.06rem; line-height: 1.5;
  white-space: pre-wrap; word-wrap: break-word;
}
.chat-msg-meta { color: var(--ink-3); font-size: 0.72rem; }
.chat-msg-visitor { align-self: flex-end; align-items: flex-end; }
.chat-msg-visitor .chat-msg-body { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-ai { align-self: flex-start; }
.chat-msg-ai .chat-msg-body { background: var(--bg-soft); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg-admin { align-self: flex-start; }
.chat-msg-admin .chat-msg-body { background: #e8f7ef; border: 1px solid #9fd9c0; border-bottom-left-radius: 4px; }
.chat-msg-body a { color: inherit; text-decoration: underline; word-break: break-all; }
.chat-msg-ai .chat-msg-body a, .chat-msg-admin .chat-msg-body a { color: var(--blue); }

/* quick-reply chips — big tap targets, no typing needed */
.chat-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 14px 4px; border-top: 1px solid var(--line);
}
.chat-chips button {
  min-height: 44px; padding: 10px 16px; border-radius: 100px;
  border: 1.5px solid var(--line-strong); background: var(--bg);
  font-size: 0.95rem; font-weight: 650; color: var(--ink-2);
}
.chat-chips button:hover { border-color: var(--blue); color: var(--blue); background: var(--bg-blue); }

.chat-human { border-top: 1px solid var(--line); padding: 14px 16px; background: var(--bg-blue); }
.chat-human-txt { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 10px; }
.chat-human-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chat-human-row input {
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 1rem; background: var(--bg); width: 100%;
}
.chat-human-row input:focus { outline: none; border-color: var(--blue); }
.chat-human-actions { display: flex; gap: 10px; margin-top: 12px; }


.chat-composer {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--line); padding: 12px 14px;
}
.chat-composer .hp { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }
.chat-human-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--ink-3); font-size: 0.68rem; font-weight: 650; padding: 6px 8px; border-radius: 10px;
  min-width: 52px; min-height: 52px; justify-content: center;
}
.chat-human-btn:hover { color: var(--blue); background: var(--bg-blue); }
.chat-human-btn svg { width: 24px; height: 24px; }
.chat-composer input[type="text"] {
  flex: 1; border: 1.5px solid var(--line-strong); border-radius: 100px;
  padding: 13px 18px; font-size: 1.05rem; min-height: 52px;
}
.chat-composer input[type="text"]:focus { outline: none; border-color: var(--blue); }
.chat-composer input[disabled] { background: var(--bg-soft); color: var(--ink-3); }
.chat-send {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center;
}
.chat-send:hover { background: var(--blue-dark); }
.chat-send[disabled] { opacity: .55; cursor: default; }
.chat-send[disabled]:hover { background: var(--blue); }
.chat-send svg { width: 22px; height: 22px; }

/* ---------- admin chat ---------- */
.chat-layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
.chat-list { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-list-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.chat-list-head h2 { font-size: 1.05rem; }
.chat-list-items { max-height: 640px; overflow-y: auto; }
.chat-item {
  display: block; width: 100%; text-align: left; padding: 13px 20px;
  border-bottom: 1px solid var(--line); transition: background .15s;
}
.chat-item:hover { background: var(--bg-soft); }
.chat-item.is-active { background: var(--bg-blue); box-shadow: inset 3px 0 0 var(--blue); }
.chat-item-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.chat-item-name { font-weight: 700; font-size: 0.9rem; }
.online-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); margin-right: 6px; vertical-align: 1px;
  box-shadow: 0 0 0 3px #e8f7ef;
}
.chat-item-ago { color: var(--ink-3); font-size: 0.7rem; white-space: nowrap; }
.chat-item-preview { color: var(--ink-3); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.chat-item-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.chat-chip {
  font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em;
  border-radius: 100px; padding: 3px 9px; border: 1px solid var(--line-strong); color: var(--ink-3);
}
.chat-chip.st-ai { color: var(--ink-2); }
.chat-chip.st-waiting { color: var(--warn); border-color: #e3c98a; background: #fdf6e3; }
.chat-chip.st-live { color: var(--ok); border-color: #9fd9c0; background: #e8f7ef; }
.chat-chip.st-closed { color: var(--ink-3); background: var(--bg-soft); }
.chat-unread {
  margin-left: auto; min-width: 20px; height: 20px; border-radius: 100px;
  background: var(--err); color: #fff; font-size: 0.7rem; font-weight: 700;
  line-height: 20px; text-align: center; padding-inline: 5px;
}

.chat-conv { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 704px; }
.chat-conv-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.chat-conv-head h2 { font-size: 1.05rem; }
.chat-conv-head .muted { font-size: 0.8rem; }
.chat-conv-actions { display: flex; gap: 8px; }
.chat-conv-log { flex: 1; overflow-y: auto; padding: 18px 20px 8px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-soft); }
.chat-conv-log .chat-msg-admin { align-self: flex-end; align-items: flex-end; }
.chat-conv-log .chat-msg-admin .chat-msg-body { background: var(--blue); color: #fff; border: 0; border-bottom-right-radius: 4px; border-bottom-left-radius: 13px; }
.chat-conv-log .chat-msg-visitor { align-self: flex-start; align-items: flex-start; }
.chat-conv-log .chat-msg-visitor .chat-msg-body { background: var(--bg); border: 1px solid var(--line-strong); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-conv-log .chat-msg-ai { align-self: center; max-width: 92%; }
.chat-conv-log .chat-msg-ai .chat-msg-body { background: var(--bg); border: 1px dashed var(--line-strong); color: var(--ink-2); font-size: 0.84rem; }
.chat-conv-composer { display: flex; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line); }
.chat-conv-composer input {
  flex: 1; border: 1px solid var(--line-strong); border-radius: 100px; padding: 10px 16px; font-size: 0.9rem;
}
.chat-conv-composer input:focus { outline: none; border-color: var(--blue); }
.chat-conv-composer input[disabled] { background: var(--bg-soft); color: var(--ink-3); }
.chat-empty { padding: 60px 20px; text-align: center; color: var(--ink-3); }
.chat-nav-badge {
  display: inline-block; min-width: 18px; height: 18px; margin-left: 5px;
  border-radius: 100px; background: var(--err); color: #fff;
  font-size: 0.66rem; font-weight: 700; line-height: 18px; text-align: center; padding-inline: 4px;
  vertical-align: 1px;
}

@media (max-width: 1020px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-conv { height: 560px; }
  .chat-list-items { max-height: 300px; }
}
@media (max-width: 480px) {
  .chat-widget { right: 12px; bottom: 12px; }
  .chat-panel { width: calc(100vw - 24px); height: min(85vh, 700px); bottom: 84px; }
  .chat-human-row { grid-template-columns: 1fr; }
}

/* ---------- quote / invoice document (admin/quote.php) ---------- */
.quote-body { background: var(--bg-soft); }
.quote-toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(18px, 4vw, 40px); background: var(--bg);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.quote-toolbar .btn-primary { margin-left: auto; }
.q-to {
  margin-left: auto; width: 230px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px;
}
.q-to + .btn-primary { margin-left: 0; }
.q-mail-msg {
  margin: 12px clamp(18px, 4vw, 40px) 0; padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
}
.q-mail-msg.ok  { background: #e8f7ee; color: #177245; border: 1px solid #b7e4c7; }
.q-mail-msg.err { background: #fdeeee; color: #b3261e; border: 1px solid #f3c2c0; }
.q-mail-msg.info { background: #eef6ff; color: #1a56db; border: 1px solid #c3ddff; }
.q-payment-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px clamp(18px, 4vw, 40px) 0;
  font-size: 14px;
}
.q-status-badge {
  display: inline-block; padding: 4px 10px; border-radius: 100px;
  font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2);
}
.q-status-paid { background: #e8f7ee; color: #177245; border-color: #b7e4c7; }
.q-status-pending { background: #fff8e6; color: #946c00; border-color: #f8e3a3; }
.q-status-unpaid { background: #f3f4f6; color: var(--ink-2); border-color: var(--line); }
.quote-doc {
  max-width: 900px; margin: 26px auto 60px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 46px); display: flex; flex-direction: column; gap: 22px;
}
.q-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; border-bottom: 3px solid var(--blue); padding-bottom: 18px; }
.q-head h1 { font-size: 1.5rem; }
.q-head .q-legal-in { text-align: center; min-width: 0; }
.q-head > div:first-child { width: 100%; }
.q-legal-in { font-size: 1.3rem; font-weight: 750; width: 100%; min-width: 320px; }
.q-sub { color: var(--ink-3); margin-top: 4px; }
.q-badge {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; line-height: 1;
  background: var(--blue); color: #fff; border-radius: 8px; padding: 8px 14px; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.q-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.q-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.q-box h2 { font-size: 0.82rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 12px; }
.q-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
.q-dl dt { font-size: 0.82rem; color: var(--ink-3); font-weight: 650; }
.q-grid5 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; }
.q-lbl { display: block; font-size: 0.74rem; color: var(--ink-3); font-weight: 650; margin-bottom: 4px; }
.qin {
  width: 100%; border: 1px dashed transparent; border-radius: 6px;
  padding: 6px 8px; font: inherit; background: transparent;
}
.qin:hover { border-color: var(--line-strong); }
.qin:focus { outline: none; border-color: var(--blue); background: var(--bg-blue); }
.q-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.q-table th {
  text-align: left; font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-3); padding: 8px 10px; border-bottom: 2px solid var(--line-strong);
}
.q-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.q-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.q-num { width: 90px; text-align: right; }
.q-total { font-weight: 650; }
.q-area { width: 100%; min-height: 64px; resize: vertical; font: inherit; line-height: 1.35; }
.q-table tfoot td { border-bottom: 0; font-weight: 650; }
.q-grand td { font-size: 1.08rem; color: var(--blue-ink); border-top: 2px solid var(--blue); }
.q-note { font-size: 0.78rem; color: var(--ink-3); margin-top: 10px; }
.q-legal p { font-size: 0.84rem; color: var(--ink-2); margin-bottom: 8px; }

@media (max-width: 720px) {
  .q-cols, .q-grid5 { grid-template-columns: 1fr; }
}

@media print {
  .no-print { display: none !important; }
  .quote-body { background: #fff; }
  .quote-doc { border: 0; border-radius: 0; margin: 0; max-width: none; padding: 0; }
  .qin { border-color: transparent; padding: 2px 0; }
  .q-box { break-inside: avoid; }
}

/* ---------- chat motion & typing indicators ---------- */
@media (prefers-reduced-motion: no-preference) {
  .chat-msg { animation: chat-in .25s ease-out; }
  .chat-panel { animation: chat-panel-in .18s ease-out; }
  @keyframes chat-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes chat-panel-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .chat-dots span { animation: chat-dot 1.2s infinite ease-in-out; }
  .chat-dots span:nth-child(2) { animation-delay: .15s; }
  .chat-dots span:nth-child(3) { animation-delay: .3s; }
  @keyframes chat-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30%           { transform: translateY(-5px); opacity: 1; }
  }
}

.chat-dots { display: inline-flex; gap: 5px; align-items: center; min-height: 20px; }
.chat-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); display: block; }
.chat-conv-log .chat-msg-admin .chat-dots span { background: #fff; }

.chat-pending { opacity: .65; }
.chat-pending .chat-msg-meta { font-style: italic; }
.chat-failed { opacity: 1; cursor: pointer; }
.chat-failed .chat-msg-body { outline: 2px solid var(--err); }
.chat-failed .chat-msg-meta { color: var(--err); font-style: normal; font-weight: 650; }

/* ---------- cookie consent banner & panel ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 14px 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(11, 21, 38, 0.08);
}
.cookie-banner-body {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.cookie-banner-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
  flex: 1 1 260px;
}
.cookie-banner-body a {
  color: var(--blue);
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  padding: 14px 0 22px;
}
.cookie-panel-body {
  max-width: 480px;
  margin: 0 auto;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
}
.cookie-panel-body h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}
.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: var(--ink-2);
  cursor: pointer;
}
.cookie-option input {
  margin-top: 3px;
  flex-shrink: 0;
}
.cookie-option input:disabled {
  accent-color: var(--ink-3);
}
.cookie-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
.footer-legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-legal a {
  color: var(--ink-3);
  font-size: 0.85rem;
}
.footer-legal a:hover {
  color: var(--blue);
}
@media (max-width: 640px) {
  .cookie-banner-body {
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-panel-body {
    margin: 0 14px;
  }
}

/* ---------- admin full-width page (quote / invoice editor) ---------- */
.admin-full {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}
.admin-full .quote-toolbar {
  top: 64px;
}

/* ---------- leads cards (admin dashboard) ---------- */
.leads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.lead-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .15s, border-color .15s;
  border-left: 4px solid transparent;
}
.lead-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.lead-card.is-new {
  border-left-color: var(--blue);
  background: #f6fbff;
  animation: flash-card 2.4s ease;
}
@keyframes flash-card {
  0% { background: #e8f4ff; }
  100% { background: #f6fbff; }
}
.lead-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.lead-card__name {
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--ink);
  word-break: break-word;
}
.lead-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lead-card__time { font-size: 0.78rem; }
.lead-card__type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px 8px;
}
.lead-payment-badge {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: 100px; padding: 3px 8px;
  border: 1px solid var(--line);
}
.lead-payment-paid { background: #e8f7ee; color: #177245; border-color: #b7e4c7; }
.lead-payment-pending { background: #fff8e6; color: #946c00; border-color: #f8e3a3; }
.lead-card__product {
  font-size: 0.9rem;
  color: var(--ink-2);
}
.lead-card__contact a {
  display: inline-block;
  font-size: 0.86rem;
  color: var(--blue);
  margin-right: 10px;
}
.lead-card .lead-msg-toggle {
  width: 100%;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.86rem;
  color: var(--ink-2);
}
.lead-card .lead-msg-toggle:hover {
  border-color: var(--line-strong);
  color: var(--blue);
}
.lead-card__details {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.88rem;
}
.lead-card__actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}
.lead-card__actions .btn {
  flex: 1 1 auto;
  text-align: center;
}

/* ---------- funding-type conditional fields (modal, chat, admin quote) ---------- */
.fund-fields { display: block; }
.fund-fields[hidden] { display: none; }
.q-type-label {
  font-size: 0.8rem;
  color: var(--ink-2);
  font-weight: 600;
  margin-right: 6px;
}
.q-type-select {
  width: auto;
  min-width: 220px;
  margin-right: auto;
  background: var(--bg);
}
.q-fund-fields { display: block; }
.q-fund-fields[hidden] { display: none; }
.q-legal-extra[hidden] { display: none; }


/* ---------- mail templates & log ---------- */
.field-stack { display: flex; flex-direction: column; gap: 16px; }
.admin-subnav { display: flex; flex-direction: column; gap: 6px; }
.admin-subnav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; border: 1px solid transparent;
}
.admin-subnav a:hover { background: var(--bg-soft); border-color: var(--line); }
.admin-subnav a.is-active { background: #e8f0fe; color: var(--blue); border-color: #b8d4f7; font-weight: 600; }
.mail-error-row td { border-top: 0; padding-bottom: 12px; }

/* ── Admin mailbox + admin users ─────────────────────────────────────── */
.mailbox-tabs { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.mailbox-tabs a { border-color: var(--line); }
.mail-body {
  white-space: pre-wrap; word-wrap: break-word;
  font-size: 0.92rem; line-height: 1.65;
  padding: 18px 22px; max-width: 880px;
}
.admin-nav-user { font-size: 0.82rem; color: var(--ink-3); padding: 0 6px; white-space: nowrap; }

/* ==========================================================================
   Products catalog enhancements
   ========================================================================== */

/* Layout: left filter sidebar + main column */
.products-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.products-main { min-width: 0; grid-column: 2; grid-row: 1; }

/* Filter sidebar */
.filter-panel {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: calc(var(--header-h) + 10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 18px;
}
.filter-panel > summary {
  display: none; /* desktop: panel always open */
}
.filter-panel-body { display: flex; flex-direction: column; gap: 20px; }
.filter-form { display: flex; flex-direction: column; gap: 16px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.filter-label {
  color: var(--ink-3);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.filter-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: var(--bg);
}
.filter-form select:focus { border-color: var(--blue); outline: none; }

/* Category list — plain names, big tap targets */
.filter-cats { display: flex; flex-direction: column; gap: 4px; }
.filter-cats > .filter-label { display: block; margin-bottom: 6px; }
.filter-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 600;
  transition: background .18s, color .18s;
}
.filter-cat:hover { background: var(--bg-soft); color: var(--blue); }
.filter-cat.is-active { background: var(--bg-blue); color: var(--blue); font-weight: 700; }
.filter-cat-name { overflow: hidden; text-overflow: ellipsis; }
.filter-cat-count {
  flex: none;
  min-width: 26px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.78rem;
  font-weight: 650;
}
.filter-cat.is-active .filter-cat-count { background: #fff; border-color: transparent; color: var(--blue); }

/* Budget — readout + dual range slider */
.filter-budget-readout { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }
.filter-slider {
  display: none; /* revealed by JS (.has-slider) — number fields are the no-JS path */
  position: relative;
  height: 30px;
  margin: 4px 0 6px;
}
.filter-group-budget.has-slider .filter-slider { display: block; }
.filter-slider::before,
.filter-slider::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 100px;
}
.filter-slider::before { left: 0; right: 0; background: var(--line); }
.filter-slider::after {
  left: var(--from, 0%);
  right: calc(100% - var(--to, 100%));
  background: var(--blue);
}
.filter-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none; /* thumbs re-enable interaction below */
}
.filter-slider input[type="range"]:focus { outline: none; }
.filter-slider input[type="range"]::-webkit-slider-runnable-track { background: transparent; border: 0; }
.filter-slider input[type="range"]::-moz-range-track { background: transparent; border: 0; }
.filter-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 28px;
  height: 28px;
  margin-top: 0;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--blue);
  box-shadow: 0 2px 8px rgba(10, 99, 224, 0.35);
  cursor: grab;
}
.filter-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--blue);
  box-shadow: 0 2px 8px rgba(10, 99, 224, 0.35);
  cursor: grab;
}
.filter-slider input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }

/* Budget min/max fields */
.filter-budget { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-price {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  transition: border-color .18s;
}
.filter-price:focus-within { border-color: var(--blue); }
.filter-price span { color: var(--ink-3); font-size: 0.85rem; flex: none; }
.filter-price input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 10px 0;
  font-size: 0.95rem;
  background: transparent;
  appearance: textfield;
  -moz-appearance: textfield;
}
.filter-price input::-webkit-outer-spin-button,
.filter-price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-price input:focus { outline: none; }

.filter-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.filter-actions .btn { width: 100%; text-align: center; justify-content: center; }

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

/* Active filter chips */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -6px 0 18px;
}
.active-filters-label {
  color: var(--ink-3);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color .18s, color .18s, background .18s;
}
.filter-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--bg);
}
.filter-chip span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1;
  transition: background .18s, color .18s;
}
.filter-chip:hover span { background: var(--blue); color: #fff; }
.filter-chip-clear {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-3);
}
.filter-chip-clear:hover {
  border-color: var(--err);
  color: var(--err);
  background: transparent;
}
.filter-chip-clear:hover span { background: var(--err); color: #fff; }

/* Results meta */
.results-meta {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.results-meta .mono { color: var(--ink); font-weight: 700; }

/* Search clear button */
.toolbar-search { position: relative; }
.toolbar-search-clear {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: var(--line);
  color: var(--ink-2);
  font-size: 0.85rem;
  line-height: 1;
  transition: background .18s, color .18s;
}
.toolbar-search-clear:hover { background: var(--ink-3); color: #fff; }
.toolbar-search-clear[hidden] { display: none; }

/* Empty-state suggestions */
.empty-state-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 18px 0 22px;
}
.empty-state-suggestions .mono {
  display: block;
  width: 100%;
  color: var(--ink-3);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color .18s, color .18s;
}
.pill:hover { border-color: var(--blue); color: var(--blue); }

/* Responsive filter sidebar */
@media (max-width: 900px) {
  .products-layout { grid-template-columns: 1fr; }
  .products-main { grid-column: auto; grid-row: auto; }
  .filter-panel {
    grid-column: auto;
    grid-row: auto;
    position: static;
    padding: 0;
    overflow: hidden;
  }
  .filter-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 12px 18px;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
  }
  .filter-panel > summary::-webkit-details-marker { display: none; }
  .filter-panel > summary svg { width: 18px; height: 18px; color: var(--ink-3); transition: transform .18s; }
  .filter-panel[open] > summary { border-bottom: 1px solid var(--line); }
  .filter-panel[open] > summary svg { transform: rotate(180deg); }
  .filter-panel .filter-panel-body { padding: 18px; }
  .products-layout .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .active-filters { margin-top: 0; }
}

@media (max-width: 480px) {
  .filter-budget { grid-template-columns: 1fr; }
  .products-layout .grid-products { grid-template-columns: 1fr; }
}

/* Payment return page */
.payment-card {
  max-width: 620px; margin: 0 auto; padding: 34px;
  text-align: center;
}
.payment-card .success-mark { margin: 0 auto 18px; }
.payment-card h2 { margin-bottom: 12px; }
.payment-card .lede { margin-bottom: 20px; color: var(--ink-2); }
.payment-card p { margin-bottom: 14px; }
.payment-card .btn { margin: 6px; }


/* ==========================================================================
   Homepage search — live suggestions & previews
   ========================================================================== */
.home-search {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg); padding: 10px 10px 10px 20px;
  min-height: 68px;
  margin-bottom: 40px;
  box-shadow: 0 12px 34px -22px rgba(11, 33, 74, 0.28);
  transition: border-color .18s, box-shadow .18s;
}
.home-search:focus-within { border-color: var(--blue); box-shadow: 0 14px 38px -20px rgba(10, 99, 224, 0.35); }
.home-search > svg { width: 26px; height: 26px; color: var(--ink-3); flex: none; }
.home-search input { flex: 1; min-width: 0; border: 0; padding: 12px 0; font-size: 1.25rem; background: transparent; }
.home-search input:focus { outline: none; }
.home-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.home-search .btn { min-height: 52px; padding: 0 26px; font-size: 1.05rem; }

.hs-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 90;
  border-radius: var(--radius); padding: 12px;
  max-height: min(560px, 75vh); overflow-y: auto;
}
.hs-suggest-label { display: block; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; padding: 4px 8px 10px; }
.hs-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 4px 8px; }
.hs-chip {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-size: 1rem; color: var(--ink-2); background: var(--bg);
  transition: border-color .18s, color .18s, background .18s;
}
.hs-chip:hover { border-color: var(--blue); color: var(--blue); background: var(--bg-blue); }

.hs-item {
  display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 14px;
  padding: 14px; border-radius: var(--radius-sm); color: var(--ink);
  transition: background .15s;
}
.hs-item + .hs-item { border-top: 1px solid var(--line); }
.hs-item:hover, .hs-item.is-active { background: var(--bg-soft); color: var(--ink); }
.hs-item img { width: 92px; height: 92px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.hs-item-name { display: block; font-weight: 650; font-size: 1.12rem; letter-spacing: -0.01em; }
.hs-item-cat { display: block; color: var(--ink-3); margin-top: 3px; font-size: 0.9rem; }
.hs-item-price { font-weight: 700; font-size: 1.1rem; color: var(--blue-ink); white-space: nowrap; }

.hs-empty { padding: 16px 12px; color: var(--ink-2); font-size: 1rem; }
.hs-all {
  display: block; margin-top: 8px; padding: 14px;
  border-top: 1px solid var(--line);
  font-weight: 650; font-size: 1.05rem;
}
.hs-all:hover { color: var(--blue-dark); }

@media (max-width: 640px) {
  .home-search { flex-wrap: wrap; padding: 12px; }
  .home-search input { flex: 1 1 calc(100% - 46px); }
  .home-search .btn { flex: 1 1 100%; }
  .hs-item { grid-template-columns: 72px 1fr; }
  .hs-item img { width: 72px; height: 72px; }
  .hs-item-price { grid-column: 2; }
}

/* ---------- admin mobile (≤1100px burger / ≤720px / ≤480px) — appended, desktop untouched ---------- */
@media (max-width: 1100px) {
  /* sections + actions collapse into a burger-driven panel */
  .admin-nav, .admin-actions { display: none; }
  .admin-burger { display: flex; }
  .admin-menu {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 32px rgba(11, 21, 38, 0.12); padding: 10px 16px 14px; z-index: 94;
  }
  .admin-menu[hidden] { display: none; }
  .admin-menu nav { display: flex; flex-direction: column; gap: 1px; }
  .admin-menu nav a {
    padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink-2);
    font-weight: 600; font-size: 0.9rem; display: flex; align-items: center;
  }
  .admin-menu nav a:hover { background: var(--bg-soft); color: var(--blue); }
  .admin-menu nav a.is-active { color: var(--blue); background: var(--bg-blue); }
  .admin-menu-actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  .admin-menu-actions .btn { flex: 1; justify-content: center; }
}

@media (max-width: 720px) {
  /* the shared public block above leaks a bottom bar offset into admin — undo it */
  body.admin-body { padding-bottom: 0; }

  .admin-top-inner { gap: 10px; padding-block: 8px; }
  .admin-user-meta { display: none; }
  .admin-user-btn { padding: 4px; }
  .admin-caret { display: none; }

  .admin-main { padding-block: 18px 40px; gap: 16px; }

  /* live band + KPIs denser */
  .live-band { gap: 12px 16px; padding: 14px 16px; }
  .kpi { padding: 13px 14px; }
  .kpi strong { font-size: 1.3rem; }
  .kpi-row.kpi-4 { grid-template-columns: repeat(2, 1fr); } /* specificity beats the 4-col base */

  /* lead cards never overflow narrow screens */
  .leads-grid { grid-template-columns: 1fr; }

  /* wide admin tables scroll horizontally inside their panel instead of clipping */
  .admin-panel .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { font-size: 0.82rem; }
  .admin-table th, .admin-table td { padding: 9px 10px; }
  .row-thumb { width: 64px; height: 48px; }

  .panel-head { padding: 14px 16px; }
  .page-actions h1 { font-size: 1.25rem; }

  /* referrals report: tighter gutters, share bars stack */
  .report-kpis { margin: 14px 16px 6px; }
  .report-h { padding-inline: 16px; }
  .report-chart { padding-inline: 16px; }
  .report-axis, .report-empty { padding-inline: 16px; }
  .report-share { padding-inline: 16px; }
  .report-share-row { grid-template-columns: 1fr; gap: 6px; }

  /* chat admin: conversation fits the viewport under the list */
  .chat-conv { height: 72vh; }

  /* quote / invoice editor */
  .admin-full .quote-toolbar { position: static; }
  .quote-toolbar { gap: 10px; }
  .quote-toolbar .btn-primary { margin-left: 0; }
  .q-to { margin-left: 0; width: 100%; flex: 1 1 100%; }
  .quote-doc { margin: 16px 12px 40px; padding: 18px 14px; }
  .quote-doc > *, .q-cols > *, .q-dl > * { min-width: 0; } /* flex/grid children must be allowed to shrink */
  .q-legal-in { min-width: 0; width: 100%; }
  .q-head h1 { font-size: 1.2rem; }
  .quote-doc .q-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .q-num { width: 70px; }

  /* mail templates: sidebar above the editor (inline-style hook) */
  .mt-layout { grid-template-columns: 1fr !important; gap: 16px !important; padding: 16px !important; }
  .mt-layout .admin-subnav { flex-direction: row; flex-wrap: wrap; }
  .mt-layout .admin-subnav a { border-color: var(--line); }
}

@media (max-width: 480px) {
  .kpi-row, .kpi-row.kpi-4 { grid-template-columns: repeat(2, 1fr); }
  .kpi strong { font-size: 1.15rem; }
  .live-count { font-size: 1.6rem; }
  .quote-toolbar .btn { flex: 1 1 calc(50% - 6px); }
  .page-actions h1 { font-size: 1.15rem; }
}

/* ---------- deals slider + sale pricing (homepage) ---------- */
.section-deals { background: var(--bg); }

.deal-slider { position: relative; }
.deal-track {
  display: flex; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;                 /* Firefox */
  padding: 4px 2px 10px;                 /* room for card hover outline */
}
.deal-track::-webkit-scrollbar { display: none; }
.deal-item {
  flex: 0 0 min(340px, 82vw);
  scroll-snap-align: start;
  display: flex;
}
.deal-item .card {
  flex: 1;
  border: 1px solid var(--line); border-radius: var(--radius);
}

.deal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: 0 6px 18px rgba(11, 21, 38, 0.12);
  cursor: pointer; z-index: 2;
  transition: background .18s, color .18s, opacity .18s;
}
.deal-nav svg { width: 20px; height: 20px; }
.deal-nav:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.deal-prev { left: -8px; }
.deal-next { right: -8px; }
.deal-nav[disabled] { opacity: 0.25; pointer-events: none; }
.deal-nav[hidden] { display: none; }

/* sale price block (cards + product page) */
.card-price-sale { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.price .card-price-sale { font-size: inherit; }
.price-old { color: var(--ink-3); font-size: 0.85rem; font-weight: 500; text-decoration: line-through; }
.card-price-sale strong { color: var(--err); }
.save-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--err); background: rgba(214, 69, 69, 0.1);
  border: 1px solid rgba(214, 69, 69, 0.35);
  padding: 3px 8px; border-radius: 100px; white-space: nowrap;
}

/* large sale variant — product page price panel (elder-friendly) */
.card-price-sale-lg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.card-price-sale-lg .price-was {
  flex-basis: 100%;
  font-size: 1.05rem; font-weight: 500; color: var(--ink-2);
}
.card-price-sale-lg .price-old { font-size: 1.1rem; }
.card-price-sale-lg strong {
  font-size: clamp(2.1rem, 8vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink);
}
.card-price-sale-lg .save-badge {
  font-size: 1.15rem; letter-spacing: 0.01em; padding: 10px 18px;
  color: #fff; background: var(--ok); border-color: transparent;
}


/* ---------- homepage hero carousel — appended, follows deal-nav look ---------- */
.hero-carousel {
  position: relative;
  margin-block: clamp(24px, 4vw, 56px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(11, 33, 74, 0.4);
  outline-offset: 3px;
}
.hero-carousel-track {
  display: flex;
  transition: transform .5s ease;
  will-change: transform;
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: clamp(380px, 46vw, 560px);
  display: flex;
  align-items: center;
}
.hero-slide-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-slide::after {           /* readability scrim behind the copy panel */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 21, 38, 0.28) 0%, rgba(11, 21, 38, 0.05) 60%, transparent 100%);
  pointer-events: none;
}
.hero-slide-copy {
  position: relative; z-index: 1;
  margin: clamp(20px, 4vw, 56px);
  max-width: 580px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.hero-slide-title {
  font-size: clamp(1.45rem, 2.8vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.hero-slide-sub { color: var(--ink-2); margin: 0 0 20px; }

.hero-carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.9); color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: 0 6px 18px rgba(11, 21, 38, 0.18);
  cursor: pointer; z-index: 2;
  transition: background .18s, color .18s;
}
.hero-carousel-nav svg { width: 20px; height: 20px; }
.hero-carousel-nav:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.hero-carousel-prev { left: 14px; }
.hero-carousel-next { right: 14px; }

.hero-carousel-dots {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0; z-index: 2;
}
/* 24×24 tap target (WCAG 2.5.8) around a 10px visual dot */
.hero-carousel-dot {
  width: 24px; height: 24px; padding: 0; border: 0; background: none;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .18s;
}
.hero-carousel-dot::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.65);
  transition: background .18s;
}
.hero-carousel-dot:hover { transform: scale(1.2); }
.hero-carousel-dot[aria-selected="true"]::before { background: var(--blue); border-color: var(--blue); }

@media (max-width: 720px) {
  .hero-slide { min-height: 430px; align-items: flex-end; }
  .hero-slide-copy { margin: 14px; padding: 18px; max-width: none; }
  .hero-carousel-nav { width: 38px; height: 38px; top: auto; bottom: 14px; transform: none; }
  .hero-carousel-prev { left: 14px; }
  .hero-carousel-next { right: 14px; left: auto; }
  .hero-carousel-dots { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel-track { transition: none; }
  .hero-carousel-dot, .hero-carousel-nav { transition: none; }
}


/* ---------- product page: 3D loading cover + gallery/zoom arrows — appended ---------- */
.viewer-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: var(--bg-soft);
  transition: opacity .4s;
  pointer-events: none;
}
.viewer3d.ready .viewer-cover { opacity: 0; }
.viewer3d .viewer-loading { align-items: end; padding-bottom: 44px; } /* keep the note readable over the cover photo */

/* prev/next arrows overlaid on the main gallery image */
.gallery { position: relative; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.92); color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: 0 6px 18px rgba(11, 21, 38, 0.14);
  cursor: pointer; z-index: 2;
  transition: background .18s, color .18s;
}
.gallery-nav svg { width: 20px; height: 20px; }
.gallery-nav:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

/* prev/next arrows in the full-screen zoom overlay (dark variant) */
.img-zoom-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; background: rgba(255, 255, 255, 0.12);
  border: 0; cursor: pointer; z-index: 2;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .18s;
}
.img-zoom-nav svg { width: 22px; height: 22px; }
.img-zoom-nav:hover { background: rgba(255, 255, 255, 0.28); }
.img-zoom-prev { left: 16px; }
.img-zoom-next { right: 16px; }

@media (max-width: 720px) {
  .gallery-nav { width: 36px; height: 36px; }
  .gallery-prev { left: 8px; }
  .gallery-next { right: 8px; }
  .img-zoom-nav { width: 40px; height: 40px; }
  .img-zoom-prev { left: 10px; }
  .img-zoom-next { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .viewer-cover, .gallery-nav, .img-zoom-nav { transition: none; }
}


/* ---------- product page: funding classifications (Support at Home / NDIS) — appended ---------- */
.fund-info {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
}
.fund-tabs { display: flex; gap: 1px; background: var(--line); }
.fund-tabs [data-fund-tab] {
  flex: 1; padding: 11px 10px;
  font: inherit; font-size: 0.88rem; font-weight: 650;
  color: var(--ink-3); background: var(--bg-soft);
  border: 0; cursor: pointer;
  transition: background .18s, color .18s;
}
.fund-tabs [data-fund-tab]:hover { color: var(--ink); }
.fund-tabs [data-fund-tab].is-active { background: var(--bg); color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.fund-panel { margin: 0; padding: 14px 18px; display: grid; gap: 8px; background: var(--bg); }
.fund-panel[hidden] { display: none; }   /* restore hiding — display:grid above beats the UA [hidden] rule */
.fund-list { margin: 0; display: grid; gap: 8px; }
.fund-list > div { display: flex; gap: 14px; align-items: baseline; }
.fund-panel dt {
  flex: 0 0 130px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-3);
}
.fund-panel dd { margin: 0; font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.fund-empty { margin: 0; color: var(--ink-3); font-size: 0.9rem; }

@media (max-width: 720px) {
  .fund-panel dt { flex-basis: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .fund-tabs [data-fund-tab] { transition: none; }
}


/* ---------- admin: funding classification group labels — appended ---------- */
.fund-group-label {
  margin: 14px 0 2px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-2);
  border-top: 1px solid var(--line); padding-top: 14px;
}

/* ---------- language switcher (EN | ??) ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 4px 0 10px;
  white-space: nowrap;
}
.lang-switch a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.lang-switch .lang-sep { color: var(--ink-3); font-size: 0.75rem; }


/* ---------- product page: photos first, 3D view once loaded ---------- */
/* Both panels share one grid cell, so the stage is always as tall as the
 * tallest panel: swapping photos ⇄ 3D never shifts the page (CLS 0), and the
 * hidden 3D canvas already has its final size while the model loads. */
.media-stage { display: grid; }
.media-stage > .media-panel { grid-area: 1 / 1; min-width: 0; }
.media-stage > .media-panel[hidden] { display: block; visibility: hidden; pointer-events: none; }
.media-stage .viewer3d { aspect-ratio: auto; height: 100%; min-height: 280px; }
.media-stage .viewer3d canvas { position: absolute; inset: 0; }
.media-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.media-tabs button svg { width: 16px; height: 16px; }
.media-tabs button[hidden] { display: none; }
.media-tabs button.is-new:not(.is-active) { animation: media-new 1.6s ease 2; }
@keyframes media-new {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 99, 224, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(10, 99, 224, .22); }
}
.media-3d-status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 12px 10px; font-size: 0.78rem; color: var(--ink-3);
  vertical-align: top; line-height: 38px;
}
.media-3d-status[hidden], .media-3d-load[hidden] { display: none; }
.media-3d-status .spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--blue);
  animation: media-spin .8s linear infinite;
}
@keyframes media-spin { to { transform: rotate(360deg); } }
.media-3d-load {
  margin: 0 0 14px 10px; padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--line-strong); font-size: 0.85rem; font-weight: 600; color: var(--blue);
  vertical-align: top;
}
.media-3d-load:hover { border-color: var(--blue); }
@media (prefers-reduced-motion: reduce) {
  .media-3d-status .spinner, .media-tabs button.is-new { animation: none; }
}
