/* ==========================================================================
   B2B Medical Marketplace — design system
   Local fonts · inline SVG icons · light + dark · mobile first
   ========================================================================== */

/* ── fonts (self-hosted variable fonts, no CDN) ──────────────────────────── */
@font-face {
  font-family: "Vazirmatn"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/vazirmatn-arabic-400.woff2") format("woff2-variations"),
       url("/static/fonts/vazirmatn-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E,
                 U+2010-2011, U+204F, U+2E41, U+FBB2-FBC2, U+200C-200E;
}
@font-face {
  font-family: "Vazirmatn"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/vazirmatn-latin-400.woff2") format("woff2-variations"),
       url("/static/fonts/vazirmatn-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+2219, U+221A, U+FB00-FB06;
}

/* Theme switching must never depend on a transition completing. */
body.theme-switching, body.theme-switching * {
  transition: none !important;
}


/* ── the [hidden] attribute must win over display:flex / display:grid ──── */
[hidden] { display: none !important; }

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-xs: 6px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 56px; --sp-16: 72px;

  --dur: .18s;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --header-h: 72px;

  --bg: #f6f8fb;
  --bg-soft: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f9fbfd;
  --surface-3: #f1f5f9;
  --line: #e3e9f0;
  --line-2: #cfd9e5;
  --text: #0f1b2d;
  --text-2: #33455c;
  --muted: #64748b;
  --primary: #0d9488;
  --primary-2: #0369a1;
  --primary-ink: #ffffff;
  --primary-soft: rgba(13, 148, 136, .1);
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, .14);
  --ok: #15803d;
  --ok-soft: rgba(21, 128, 61, .1);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, .12);
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, .1);
  --shadow-xs: 0 1px 2px rgba(15, 27, 45, .06);
  --shadow-sm: 0 2px 8px rgba(15, 27, 45, .07);
  --shadow: 0 8px 24px rgba(15, 27, 45, .09);
  --shadow-lg: 0 18px 48px rgba(15, 27, 45, .14);
  --ring: 0 0 0 3px rgba(13, 148, 136, .28);
}

html[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-soft: #0f1626;
  --surface: #121b2c;
  --surface-2: #162034;
  --surface-3: #1c2840;
  --line: #22304a;
  --line-2: #2e3f5c;
  --text: #e9f0f8;
  --text-2: #bccbdd;
  --muted: #8698b0;
  --primary: #2dd4bf;
  --primary-2: #38bdf8;
  --primary-ink: #04201c;
  --primary-soft: rgba(45, 212, 191, .14);
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, .16);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  --shadow-lg: 0 22px 56px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(45, 212, 191, .3);
}

/* ── reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.8;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4, h5 { line-height: 1.4; font-weight: 700; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-xs); }
::selection { background: var(--primary); color: var(--primary-ink); }

.ico { flex: 0 0 auto; }
.container { width: min(1280px, 100% - 2 * var(--sp-5)); margin-inline: auto; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; inset-inline-start: -9999px; top: 8px; z-index: 200;
  background: var(--primary); color: var(--primary-ink); padding: 10px 18px;
  border-radius: var(--r-sm); font-weight: 600;
  transition: inset-inline-start var(--dur) var(--ease);
}
.skip-link:focus { inset-inline-start: 8px; }

/* ── top bar ────────────────────────────────────────────────────────────── */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12.5px; }
.topbar-inner { display: flex; align-items: center; gap: var(--sp-5); min-height: 38px; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.topbar-item a:hover { color: var(--primary); }
.topbar-spacer { flex: 1; }
.topbar-lang { display: flex; align-items: center; gap: 2px; }
.topbar-lang-link {
  padding: 3px 11px; border-radius: var(--r-full); color: var(--muted);
  font-weight: 500; transition: background var(--dur), color var(--dur);
}
.topbar-lang-link:hover { background: var(--surface-3); color: var(--text); }
.topbar-lang-link.active { background: var(--primary); color: var(--primary-ink); }

/* ── header ─────────────────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-main { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; }
.brand-text strong { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; }
.brand-text small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; }

.searchbar { position: relative; flex: 1; max-width: 620px; }
.searchbar-icon {
  position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.searchbar input {
  width: 100%; height: 44px; padding-inline: 42px 116px;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: var(--r-full); color: var(--text);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); background: var(--surface); }
.searchbar-btn { position: absolute; inset-inline-end: 4px; top: 4px; height: 36px; }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); margin-inline-start: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--text-2); background: transparent; border: 1px solid transparent;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--line); }
.mobile-toggle { display: none; }

/* ── navbar ─────────────────────────────────────────────────────────────── */
.navbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.navbar-inner { display: flex; align-items: center; gap: var(--sp-1); min-height: 48px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background var(--dur), color var(--dur);
}
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.navbar-spacer { flex: 1; }
.nav-cta { display: flex; align-items: center; gap: var(--sp-2); }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; background: var(--surface-3); color: var(--text);
  transition: background var(--dur), color var(--dur), border-color var(--dur),
              transform var(--dur), box-shadow var(--dur);
}
.btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; box-shadow: 0 2px 10px rgba(13, 148, 136, .28);
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 6px 20px rgba(13, 148, 136, .34); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: var(--r-xs); }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15.5px; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }

/* ── forms ──────────────────────────────────────────────────────────────── */
.field { margin-bottom: var(--sp-4); }
.field > label, .label {
  display: block; margin-bottom: 6px; font-size: 13.5px;
  font-weight: 600; color: var(--text-2);
}
.req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); color: var(--text);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--primary); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
.select { appearance: none; padding-inline-end: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; }
.hint { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.form-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.check {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  font-size: 14px; color: var(--text-2); margin-bottom: 10px;
}
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--primary); flex: 0 0 auto; }
.form-msg { margin-top: var(--sp-3); font-size: 13.5px; min-height: 20px; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }
.radio-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer;
  background: var(--surface); transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
}
.radio-card:hover { border-color: var(--primary); }
.radio-card input { margin-top: 4px; accent-color: var(--primary); width: 18px; height: 18px; flex: 0 0 auto; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.radio-card b { display: block; font-size: 14.5px; }
.radio-card small { color: var(--muted); font-size: 12.5px; }

/* ── cards & grids ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur);
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.grid { display: grid; gap: var(--sp-4); }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.grid-companies { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-cats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* product card */
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-3); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media-empty { width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface-3), var(--bg-soft)); }
.media-badge { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; }
.wish-btn {
  position: absolute; inset-block-start: 6px; inset-inline-end: 6px;
  width: 40px; height: 40px; border-radius: var(--r-full); display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--muted);
  backdrop-filter: blur(6px); border: 1px solid var(--line);
  transition: color var(--dur), background var(--dur), transform var(--dur);
}
.wish-btn:hover { color: var(--danger); transform: scale(1.08); }
.wish-btn.on { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.product-body { padding: var(--sp-4); display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-cat { font-size: 11.5px; color: var(--primary); font-weight: 600; }
.product-title { font-size: 15px; font-weight: 600; line-height: 1.6; }
.product-title a:hover { color: var(--primary); }
.product-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.product-meta span { display: inline-flex; align-items: center; gap: 6px; }
.product-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  margin-top: auto; padding-top: var(--sp-3); border-top: 1px solid var(--line);
}
.product-price { font-weight: 700; font-size: 14.5px; color: var(--text); }

/* company card */
.company-card { padding: var(--sp-5); display: flex; flex-direction: column; gap: 10px; text-align: center; align-items: center; }
.company-logo {
  width: 62px; height: 62px; border-radius: var(--r); display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted); overflow: hidden; margin-bottom: 2px;
}
.company-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.company-name { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.company-meta { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.verified { color: var(--ok); }

/* category card */
.cat-card { padding: var(--sp-5); display: flex; flex-direction: column; gap: 9px; }
.cat-icon {
  width: 48px; height: 48px; border-radius: var(--r); display: grid; place-items: center;
  background: color-mix(in srgb, var(--cat, var(--primary)) 13%, transparent);
  color: var(--cat, var(--primary));
}
.cat-name { font-weight: 700; font-size: 15.5px; }
.cat-count { font-size: 12.5px; color: var(--muted); }

/* ── badges & chips ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: var(--r-full); font-size: 11.5px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2);
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--warn); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px;
  border-radius: var(--r-full); border: 1px solid var(--line-2);
  font-size: 13px; color: var(--text-2); background: var(--surface);
  transition: border-color var(--dur), color var(--dur), background var(--dur);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ── sections ───────────────────────────────────────────────────────────── */
.section { padding: var(--sp-16) 0; }
.section-sm { padding: var(--sp-10) 0; }
.section-alt { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.section-title { font-size: clamp(21px, 2.4vw, 27px); font-weight: 800; letter-spacing: -.3px; }
.section-sub { color: var(--muted); font-size: 14.5px; margin-top: 4px; max-width: 62ch; }
.section-link { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-weight: 600; font-size: 14px; }
.section-link:hover { gap: 11px; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 460px at 88% -12%, rgba(13, 148, 136, .16), transparent 60%),
    radial-gradient(760px 380px at 8% 108%, rgba(3, 105, 161, .14), transparent 62%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: clamp(44px, 7vw, 84px) 0 clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-10); align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px;
  border-radius: var(--r-full); background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 600; margin-bottom: var(--sp-4);
}
.hero-title { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; line-height: 1.32; letter-spacing: -.6px; }
.hero-title em { font-style: normal; color: var(--primary); }
.hero-sub { font-size: clamp(15px, 1.3vw, 17.5px); color: var(--text-2); margin-top: var(--sp-4); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
.hero-stat b { display: block; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; line-height: 1.2; }
.hero-stat span { color: var(--muted); font-size: 13px; }
.hero-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: var(--sp-6); box-shadow: var(--shadow-lg);
}
.hero-panel h3 { font-size: 17px; margin-bottom: 4px; }
.hero-panel-sub { color: var(--muted); font-size: 13.5px; margin-bottom: var(--sp-4); }
.hero-cat-list { display: flex; flex-direction: column; gap: 2px; }
.hero-cat {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px;
  border-radius: var(--r-sm); transition: background var(--dur);
}
.hero-cat:hover { background: var(--surface-3); }
.hero-cat .grow { flex: 1; font-size: 14px; font-weight: 500; }
.hero-cat .n { font-size: 12px; color: var(--muted); }

/* ── trust band ─────────────────────────────────────────────────────────── */
.trust-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-4); }
.trust-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.trust-item .ico-wrap { width: 42px; height: 42px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; }
.trust-item b { display: block; font-size: 14.5px; }
.trust-item small { color: var(--muted); font-size: 12.5px; }

/* ── CTA band ───────────────────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: var(--r-xl); padding: clamp(28px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap;
  color: #fff; box-shadow: var(--shadow);
}
.cta-band h3 { font-size: clamp(20px, 2.2vw, 27px); color: #fff; }
.cta-band p { opacity: .92; margin-top: 6px; max-width: 56ch; }
.cta-band .btn { background: #fff; color: var(--primary-2); }
.cta-band .btn:hover { background: #fff; filter: brightness(.96); transform: translateY(-2px); }
.cta-band .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.cta-band .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }

/* ── breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: var(--sp-4) 0; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ── page head ──────────────────────────────────────────────────────────── */
.page-head { padding: var(--sp-6) 0 var(--sp-5); }
.page-title { font-size: clamp(23px, 2.6vw, 31px); font-weight: 800; letter-spacing: -.4px; }
.page-sub { color: var(--muted); margin-top: 6px; font-size: 14.5px; }

/* ── listing layout ─────────────────────────────────────────────────────── */
.listing { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: var(--sp-6); align-items: start; padding-bottom: var(--sp-12); }
.filter-panel { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); }
.filter-group { padding-bottom: var(--sp-4); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.filter-title { font-size: 13.5px; font-weight: 700; margin-bottom: var(--sp-3); display: flex; align-items: center; gap: 7px; }
.filter-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.filter-list a { padding: 6px 10px; border-radius: var(--r-xs); font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filter-list a:hover { background: var(--surface-3); color: var(--text); }
.filter-list a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.filter-list .n { font-size: 11.5px; color: var(--muted); }
.listing-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.listing-count { color: var(--muted); font-size: 14px; }
.view-switch { display: flex; gap: 3px; background: var(--surface-3); padding: 3px; border-radius: var(--r-sm); }
.view-switch button { width: 34px; height: 32px; border-radius: var(--r-xs); display: grid; place-items: center; color: var(--muted); }
.view-switch button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs); }

/* list view */
.product-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: var(--sp-4); padding: var(--sp-4); align-items: center; }
.product-row .product-media { aspect-ratio: 1; border-radius: var(--r); }
.product-row .product-body { padding: 0; }

/* ── pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: var(--sp-8); flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 14px;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ── product detail ─────────────────────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--sp-8); align-items: start; padding-bottom: var(--sp-12); }
.detail-gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.detail-main-img { aspect-ratio: 4 / 3; background: var(--surface-3); }
.detail-main-img img { width: 100%; height: 100%; object-fit: contain; }
.detail-thumbs { display: flex; gap: var(--sp-2); padding: var(--sp-3); overflow-x: auto; }
.detail-thumbs button { width: 62px; height: 62px; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; flex: 0 0 auto; background: var(--surface-3); }
.detail-thumbs button.active { border-color: var(--primary); }
.detail-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-side { display: flex; flex-direction: column; gap: var(--sp-4); position: sticky; top: calc(var(--header-h) + 16px); }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv > div { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-weight: 600; text-align: end; }
.detail-price { font-size: 25px; font-weight: 800; color: var(--primary); }
.sticky-cta { position: sticky; bottom: 0; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: var(--sp-3) 0; }

/* ── tabs (detail pages) ────────────────────────────────────────────────── */
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-5); overflow-x: auto; }
.tab-btn { padding: 10px 16px; font-size: 14.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .2s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ── modal ──────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--sp-4); }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 12, 22, .62); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; width: min(620px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: var(--sp-6); animation: pop .2s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.modal-head h3 { font-size: 19px; }
.modal-close { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); }
.modal-close:hover { background: var(--surface-3); color: var(--text); }

/* ── toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; inset-block-end: 24px; inset-inline-start: 50%; transform: translate(-50%, 16px);
  background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 120;
  opacity: 0; pointer-events: none; transition: opacity var(--dur), transform var(--dur);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── states ─────────────────────────────────────────────────────────────── */
.empty-state { padding: var(--sp-12) var(--sp-4); text-align: center; color: var(--muted); }
.empty-state .ico-wrap { width: 66px; height: 66px; border-radius: var(--r-lg); background: var(--surface-3); color: var(--muted); display: grid; place-items: center; margin: 0 auto var(--sp-4); }
.empty-state h3 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.empty-state p { max-width: 46ch; margin: 0 auto var(--sp-4); }
.skeleton { display: flex; flex-direction: column; gap: var(--sp-4); }
.sk { height: 14px; border-radius: var(--r-xs); background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.sk-card { height: 290px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ── footer ─────────────────────────────────────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: var(--sp-8); padding: var(--sp-12) 0 var(--sp-8); }
.footer h4 { font-size: 14.5px; margin-bottom: var(--sp-4); }
.footer-about { color: var(--muted); font-size: 13.5px; margin-top: var(--sp-3); max-width: 42ch; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: var(--muted); font-size: 13.5px; display: inline-flex; align-items: center; gap: 7px; }
.footer-links a:hover { color: var(--primary); }
.footer-contact li { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 13.5px; margin-bottom: 11px; }
.footer-contact .ico { color: var(--primary); margin-top: 5px; }
.footer-social { display: flex; gap: 8px; margin-top: var(--sp-4); }
.footer-social a { width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.footer-social a:hover { background: var(--primary); color: #fff; }
.newsletter-form { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.newsletter-form .input { flex: 1; }
.footer-bottom { border-top: 1px solid var(--line); padding: var(--sp-4) 0; font-size: 13px; color: var(--muted); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }

/* ── exhibitor module ───────────────────────────────────────────────────── */
.booth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--sp-4); }
.booth-option {
  position: relative; display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); cursor: pointer;
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur);
}
.booth-option:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.booth-option input { position: absolute; opacity: 0; pointer-events: none; }
.booth-option:has(input:checked) { border-color: var(--primary); box-shadow: var(--ring); background: var(--primary-soft); }
.booth-option .badge { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; }
.booth-option h4 { font-size: 16.5px; }
.booth-size { font-size: 13px; color: var(--muted); }
.booth-price { font-size: 19px; font-weight: 800; color: var(--primary); }
.booth-perks { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--text-2); }
.booth-perks li { display: flex; align-items: flex-start; gap: 7px; }
.booth-perks .ico { color: var(--ok); margin-top: 4px; }

/* multi-step form */
.stepper { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.step .n {
  width: 30px; height: 30px; border-radius: var(--r-full); display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted); font-size: 13px; font-weight: 700;
}
.step.active { color: var(--primary); }
.step.active .n { background: var(--primary); color: #fff; }
.step.done { color: var(--ok); }
.step.done .n { background: var(--ok-soft); color: var(--ok); }
.step-line { flex: 1; min-width: 18px; height: 1px; background: var(--line); }
.form-step { display: none; }
.form-step.active { display: block; animation: fadeUp .22s var(--ease); }
.form-step-head { margin-bottom: var(--sp-5); }
.form-step-head h3 { font-size: 19px; }
.form-step-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.form-nav { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); }

/* registration result */
.result-card { max-width: 620px; margin: var(--sp-10) auto; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--sp-8); box-shadow: var(--shadow); }
.result-icon { width: 74px; height: 74px; border-radius: var(--r-full); display: grid; place-items: center; margin: 0 auto var(--sp-4); background: var(--ok-soft); color: var(--ok); }
.tracking-code {
  display: inline-flex; align-items: center; gap: 10px; margin: var(--sp-4) 0;
  padding: 11px 22px; border-radius: var(--r); background: var(--surface-3);
  font-family: var(--mono); font-size: 19px; font-weight: 700; letter-spacing: 2px;
}

/* exhibitor directory */
.exhibitor-card { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.exhibitor-head { display: flex; align-items: center; gap: var(--sp-3); }
.exhibitor-logo { width: 52px; height: 52px; border-radius: var(--r-sm); background: var(--surface-3); display: grid; place-items: center; color: var(--muted); overflow: hidden; flex: 0 0 auto; }
.exhibitor-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.exhibitor-name { font-weight: 700; font-size: 15.5px; }
.exhibitor-meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: 2px; }
.status-badge { text-transform: capitalize; }

/* ── utility layout helpers ─────────────────────────────────────────────── */
.stack { display: flex; flex-direction: column; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.row-center { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); }
.text-center { text-align: center; }
.flex-1 { flex: 1; }
.divider { height: 1px; background: var(--line); margin: var(--sp-6) 0; }


/* ── currency switcher ─────────────────────────────────────────────────── */
.currency-switcher { position: relative; }
.currency-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--r-full);
  background: var(--surface-3); border: 1px solid var(--line);
  color: var(--text-2); font-size: 12.5px; font-weight: 600;
  transition: border-color var(--dur), color var(--dur), background var(--dur);
}
.currency-btn:hover { border-color: var(--primary); color: var(--primary); }
.currency-menu {
  position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0;
  z-index: 80; width: 268px; max-height: 380px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px;
  animation: pop .16s var(--ease);
}
.currency-menu[hidden] { display: none; }
.currency-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-2);
  transition: background var(--dur), color var(--dur);
}
.currency-item:hover { background: var(--surface-3); color: var(--text); }
.currency-item.active { background: var(--primary-soft); color: var(--primary); }
.currency-item .grow { display: flex; flex-direction: column; line-height: 1.4; }
.currency-item b { font-size: 13px; font-weight: 700; }
.currency-item small { font-size: 11.5px; color: var(--muted); }
.currency-item.active small { color: var(--primary); opacity: .8; }
.currency-flag { font-size: 17px; line-height: 1; }
.currency-rate { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.currency-fx-note {
  margin-top: 6px; padding: 8px 10px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted); line-height: 1.6;
}


/* ── compare tray & table ──────────────────────────────────────────────── */
.compare-tray {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 75;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(15, 27, 45, .12);
  transform: translateY(110%); transition: transform .25s var(--ease);
}
.compare-tray.show { transform: translateY(0); }
.compare-tray-inner { display: flex; align-items: center; gap: var(--sp-3); padding: 11px 0; }
.compare-tray-icon {
  width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); flex: 0 0 auto;
}
.compare-tray-text { line-height: 1.4; }
.compare-tray-text b { display: block; font-size: 13.5px; }
.compare-tray-text small { color: var(--muted); font-size: 12px; }
.compare-tray-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-2); }

.card-actions { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; display: flex; gap: 6px; z-index: 2; }
.card-actions .wish-btn { position: static; }
.compare-btn.on { color: var(--primary); background: var(--primary-soft); border-color: transparent; }

.compare-wrap {
  overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.compare-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.compare-table th, .compare-table td {
  padding: 13px 16px; text-align: start; vertical-align: middle;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.compare-table thead th { border-bottom: 2px solid var(--line-2); vertical-align: top; padding: 18px 16px; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:hover { background: var(--surface-2); }
.compare-label-col {
  width: 148px; font-size: 12.5px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); white-space: nowrap;
}
.compare-table thead .compare-label-col { background: var(--surface-2); vertical-align: middle; }
.compare-card { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.compare-media {
  display: block; aspect-ratio: 4/3; border-radius: var(--r-sm);
  overflow: hidden; background: var(--surface-3); margin-bottom: 6px;
}
.compare-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.compare-media:hover img { transform: scale(1.05); }
.compare-name { font-size: 14px; font-weight: 600; line-height: 1.6; }
.compare-name a:hover { color: var(--primary); }
.compare-actions { display: flex; gap: 6px; margin-top: 8px; }
.compare-price { font-weight: 800; color: var(--primary); font-size: 15px; }
.compare-desc { padding: var(--sp-4); display: flex; flex-direction: column; gap: 7px; }
.compare-desc h4 { font-size: 14px; }
.compare-desc p { color: var(--muted); font-size: 12.5px; line-height: 1.8; }

@media (max-width: 760px) {
  .compare-tray-inner { flex-wrap: wrap; gap: var(--sp-2); padding: 10px 0; }
  .compare-tray-actions { width: 100%; margin-inline-start: 0; }
  .compare-tray-actions .btn { flex: 1; }
  .compare-label-col { width: 108px; }
  .compare-table th, .compare-table td { padding: 10px 12px; font-size: 13px; }
}


/* ── smart assistant widget ────────────────────────────────────────────── */
.bot-fab {
  position: fixed; inset-block-end: 22px; inset-inline-start: 22px; z-index: 90;
  width: 54px; height: 54px; border-radius: var(--r-full);
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 24px rgba(13, 148, 136, .38);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur);
}
.bot-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 12px 32px rgba(13, 148, 136, .46); }
.bot-fab-dot {
  position: absolute; inset-block-start: 5px; inset-inline-end: 5px;
  width: 11px; height: 11px; border-radius: var(--r-full);
  background: #22c55e; border: 2px solid var(--surface);
}

.bot-panel {
  position: fixed; inset-block-end: 88px; inset-inline-start: 22px; z-index: 95;
  width: min(392px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 140px));
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: pop .2s var(--ease);
}
.bot-panel[hidden] { display: none; }
.bot-head {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
}
.bot-head b { display: block; font-size: 14.5px; }
.bot-head small { display: block; font-size: 11.5px; opacity: .88; }
.bot-avatar {
  width: 38px; height: 38px; border-radius: var(--r-full); display: grid; place-items: center;
  background: rgba(255,255,255,.22); flex: 0 0 auto;
}
.bot-close { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; color: #fff; }
.bot-close:hover { background: rgba(255,255,255,.18); }

.bot-log { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 11px; }
.bot-msg { max-width: 88%; padding: 10px 13px; border-radius: var(--r); font-size: 13.8px; line-height: 1.85; }
.bot-msg.bot {
  align-self: flex-start; background: var(--surface-3); color: var(--text);
  border-end-start-radius: var(--r-xs);
}
.bot-msg.me {
  align-self: flex-end; background: var(--primary); color: #fff; border-end-end-radius: var(--r-xs);
}
.bot-msg.bot.err { background: var(--danger-soft); color: var(--danger); }
.bot-msg a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.bot-msg.me a { color: #fff; }

.bot-cards { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.bot-card {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color var(--dur), transform var(--dur);
}
.bot-card:hover { border-color: var(--primary); transform: translateX(-2px); }
.bot-card img { width: 42px; height: 42px; border-radius: var(--r-xs); object-fit: cover; flex: 0 0 auto; background: var(--surface-3); }
.bot-card .bot-card-icon {
  width: 42px; height: 42px; border-radius: var(--r-xs); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); flex: 0 0 auto;
}
.bot-card b { display: block; font-size: 13px; font-weight: 600; line-height: 1.5; }
.bot-card small { display: block; font-size: 11.5px; color: var(--muted); }
.bot-card .bot-card-price { color: var(--primary); font-weight: 700; font-size: 12px; }

.bot-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 7px; margin-top: 9px; }
.bot-stat { background: var(--surface-3); border-radius: var(--r-sm); padding: 9px; text-align: center; }
.bot-stat b { display: block; font-size: 17px; color: var(--primary); font-weight: 800; }
.bot-stat small { font-size: 10.5px; color: var(--muted); }

.bot-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.bot-chip {
  padding: 5px 11px; border-radius: var(--r-full); border: 1px solid var(--line-2);
  font-size: 12px; color: var(--text-2); background: var(--surface);
  transition: border-color var(--dur), color var(--dur), background var(--dur);
}
.bot-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.bot-action {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 9px;
  padding: 8px 15px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600;
  background: var(--primary); color: #fff;
}
.bot-action:hover { filter: brightness(1.07); }

.bot-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.bot-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: botBlink 1.2s infinite;
}
.bot-typing span:nth-child(2) { animation-delay: .18s; }
.bot-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes botBlink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.bot-input { display: flex; gap: 8px; padding: 11px; border-top: 1px solid var(--line); background: var(--surface-2); }
.bot-input input {
  flex: 1; height: 42px; padding: 0 14px; border-radius: var(--r-full);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
}
.bot-input input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.bot-input button {
  width: 42px; height: 42px; border-radius: var(--r-full); display: grid; place-items: center;
  background: var(--primary); color: #fff; flex: 0 0 auto;
}
.bot-input button:hover { filter: brightness(1.07); }

@media (max-width: 760px) {
  .bot-fab { inset-block-end: 16px; inset-inline-start: 16px; width: 50px; height: 50px; }
  .bot-panel { inset-block-end: 78px; inset-inline: 12px; width: auto; height: min(72vh, calc(100vh - 110px)); }
  .to-top { inset-block-end: 78px !important; }
}


/* ==========================================================================
   v3 — modern minimal refinement
   A calmer visual system: fewer competing accents, more breathing room,
   tighter type scale, softer surfaces, and motion that feels intentional.
   ========================================================================== */

/* ── spacing & rhythm ───────────────────────────────────────────────────── */
:root {
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-7: 30px; --sp-8: 38px; --sp-10: 48px; --sp-12: 64px;
  --sp-16: 88px; --sp-20: 112px;

  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 22px; --r-xl: 30px;

  --shadow-xs: 0 1px 2px rgba(15, 27, 45, .04);
  --shadow-sm: 0 2px 6px rgba(15, 27, 45, .05), 0 1px 2px rgba(15, 27, 45, .04);
  --shadow: 0 6px 20px rgba(15, 27, 45, .07), 0 2px 4px rgba(15, 27, 45, .04);
  --shadow-lg: 0 20px 48px rgba(15, 27, 45, .10), 0 4px 12px rgba(15, 27, 45, .05);
  --ring: 0 0 0 3px rgba(13, 148, 136, .22);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: .14s;
  --dur: .22s;
}

body {
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: -.005em;
  font-feature-settings: "ss01";
}

/* ── calmer surfaces ────────────────────────────────────────────────────── */
.bg-soft { background: var(--bg-soft); }
.section { padding: var(--sp-16) 0; }
.section-sm { padding: var(--sp-10) 0; }
.section-alt { background: var(--bg-soft); }

.card {
  border-radius: var(--r-lg);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}
.card-hover { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur); }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-2);
}

/* ── typography scale ───────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { letter-spacing: -.02em; }
.section-title { font-size: clamp(22px, 2.2vw, 30px); font-weight: 800; letter-spacing: -.035em; }
.section-sub { font-size: 15px; color: var(--muted); margin-top: 6px; max-width: 58ch; }
.page-title { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.035em; }
.hero-title { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; line-height: 1.22; letter-spacing: -.045em; }
.hero-sub { font-size: clamp(15px, 1.2vw, 17px); color: var(--text-2); line-height: 1.85; }

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

/* ── header: single clean row, calmer ───────────────────────────────────── */
.header {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--line);
}
.topbar { background: transparent; border-bottom: 0; color: var(--muted); }
.topbar-inner { min-height: 34px; }
.topbar-item { opacity: .85; }
.topbar-item:hover { opacity: 1; }

.brand-text strong { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.brand-text small { font-size: 11px; }
.brand-mark { transition: transform var(--dur) var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }

.searchbar { max-width: 560px; }
.searchbar input {
  height: 42px;
  background: var(--surface-3);
  border-color: transparent;
  font-size: 14.5px;
  transition: background var(--dur), border-color var(--dur), box-shadow var(--dur);
}
.searchbar input:hover { background: var(--surface-2); border-color: var(--line); }
.searchbar input:focus { background: var(--surface); border-color: var(--primary); }
.searchbar-btn { height: 34px; top: 4px; font-size: 13px; }

.icon-btn { transition: background var(--dur), color var(--dur), transform var(--dur) var(--ease-out); }
.icon-btn:active { transform: scale(.94); }

/* ── navbar: quiet, editorial ───────────────────────────────────────────── */
.navbar { background: transparent; border-bottom: 1px solid var(--line); position: relative; }
.navbar-inner { min-height: 46px; gap: 2px; }
.nav-link {
  position: relative;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--r-sm);
}
.nav-link:hover { color: var(--text); background: transparent; }
.nav-link.active { color: var(--text); background: transparent; font-weight: 600; }
.nav-link.active::after {
  content: ""; position: absolute; inset-block-end: -1px; inset-inline: 10px;
  height: 2px; border-radius: 2px; background: var(--primary);
}

/* ── buttons: softer, weightier ─────────────────────────────────────────── */
.btn {
  height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  transition: background var(--dur), color var(--dur), border-color var(--dur),
              transform var(--dur-fast) var(--ease-out), box-shadow var(--dur);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(13, 148, 136, .2), 0 4px 12px rgba(13, 148, 136, .18);
}
.btn-primary:hover { filter: none; background: color-mix(in srgb, var(--primary) 88%, #000); box-shadow: 0 6px 20px rgba(13, 148, 136, .26); }
.btn-outline { background: var(--surface); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--text); color: var(--text); background: var(--surface); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 32px; padding: 0 12px; border-radius: var(--r-xs); font-size: 13px; }
.btn-lg { height: 48px; padding: 0 24px; border-radius: var(--r); font-size: 15.5px; }
.btn-block { width: 100%; }

/* ── hero: more air, less decoration ────────────────────────────────────── */
.hero {
  background:
    radial-gradient(900px 420px at 85% -20%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 62%),
    radial-gradient(700px 340px at 5% 115%, color-mix(in srgb, var(--primary-2) 10%, transparent), transparent 60%),
    var(--surface);
}
.hero-inner { padding: clamp(52px, 7vw, 96px) 0 clamp(44px, 6vw, 80px); gap: var(--sp-12); }
.hero-eyebrow {
  padding: 5px 13px; font-size: 12.5px; letter-spacing: .01em;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
  box-shadow: var(--shadow-xs);
}
.hero-eyebrow .ico { color: var(--primary); }
.hero-actions { gap: var(--sp-3); margin-top: var(--sp-7); }
.hero-stats { gap: var(--sp-10); margin-top: var(--sp-10); padding-top: var(--sp-7); }
.hero-stat b { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.04em; }
.hero-stat span { font-size: 13px; }
.hero-panel {
  border-radius: var(--r-xl); padding: var(--sp-7);
  box-shadow: var(--shadow-lg); border-color: var(--line);
}
.hero-panel h3 { font-size: 17.5px; }
.hero-cat { padding: 9px 12px; border-radius: var(--r-sm); }
.hero-cat:hover { background: var(--surface-3); transform: translateX(-3px); transition: transform var(--dur) var(--ease-out), background var(--dur); }
html[dir="ltr"] .hero-cat:hover { transform: translateX(3px); }

/* ── trust band: quieter ────────────────────────────────────────────────── */
.trust-item { background: transparent; border: 0; padding: var(--sp-3) 0; gap: var(--sp-4); }
.trust-item .ico-wrap { width: 40px; height: 40px; border-radius: var(--r-sm); }
.trust-item b { font-size: 14px; font-weight: 600; }
.trust-item small { font-size: 12.5px; color: var(--muted); }

/* ── product card: cleaner, image-first ─────────────────────────────────── */
.product-card { border-radius: var(--r-lg); }
.product-media { background: var(--surface-3); }
.product-media img { transition: transform .5s var(--ease-out), opacity var(--dur); }
.product-card:hover .product-media img { transform: scale(1.06); }
.media-badge { inset-block-start: 12px; inset-inline-start: 12px; backdrop-filter: blur(8px); }
.badge { backdrop-filter: blur(6px); }
.card-actions { inset-block-start: 12px; inset-inline-end: 12px; }
.wish-btn {
  width: 40px; height: 40px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transition: transform var(--dur-fast) var(--ease-out), color var(--dur), background var(--dur);
}
.wish-btn:hover { transform: scale(1.1); color: var(--danger); background: var(--surface); }
.wish-btn.on { color: var(--danger); background: var(--danger-soft); }
.product-body { padding: var(--sp-5); gap: 6px; }
.product-cat { font-size: 11.5px; letter-spacing: .01em; }
.product-title { font-size: 15px; font-weight: 600; line-height: 1.55; letter-spacing: -.01em; }
.product-meta { font-size: 12.5px; }
.product-foot { padding-top: var(--sp-4); margin-top: var(--sp-2); }
.product-price { font-size: 15.5px; font-weight: 700; letter-spacing: -.02em; }

/* ── chips & badges: consistent radius ──────────────────────────────────── */
.chip, .badge, .sub-chip { font-weight: 500; letter-spacing: .005em; }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-accent { background: var(--accent-soft); color: var(--warn); }

/* ── filters: airy ──────────────────────────────────────────────────────── */
.filter-panel { border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--shadow-xs); }
.filter-title { font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.filter-list a { padding: 7px 11px; border-radius: var(--r-xs); }
.filter-list a:hover { background: var(--surface-3); }
.filter-list a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.input, .select, .textarea {
  border-radius: var(--r-sm); border-color: var(--line-2); background: var(--surface);
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.label { font-size: 13px; font-weight: 500; color: var(--text-2); }

/* ── empty state: helpful, not apologetic ───────────────────────────────── */
.empty-state { padding: var(--sp-16) var(--sp-6); }
.empty-state .ico-wrap {
  width: 72px; height: 72px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.empty-state h3 { font-size: 19px; letter-spacing: -.02em; }
.empty-state p { color: var(--muted); font-size: 14.5px; }

/* ── footer: quiet ──────────────────────────────────────────────────────── */
.footer { background: var(--surface-2); }
.footer-grid { padding: var(--sp-12) 0 var(--sp-8); gap: var(--sp-10); }
.footer h4 { font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.footer-about { font-size: 13.5px; line-height: 1.9; }
.footer-links a { font-size: 13.5px; }
.footer-links a:hover { color: var(--primary); transform: translateX(-2px); transition: transform var(--dur) var(--ease-out), color var(--dur); }
html[dir="ltr"] .footer-links a:hover { transform: translateX(2px); }
.footer-social a { border-radius: var(--r-sm); transition: background var(--dur), color var(--dur), transform var(--dur) var(--ease-out); }
.footer-social a:hover { transform: translateY(-2px); }
.footer-bottom { font-size: 12.5px; }

/* ── CTA band: quieter ──────────────────────────────────────────────────── */
.cta-band { border-radius: var(--r-xl); box-shadow: var(--shadow); }
.cta-band h3 { letter-spacing: -.03em; }

/* ── pagination: minimal ────────────────────────────────────────────────── */
.pagination a, .pagination span {
  border-color: transparent; background: transparent; min-width: 36px; height: 36px;
  font-weight: 500; transition: background var(--dur), color var(--dur);
}
.pagination a:hover { background: var(--surface-3); border-color: transparent; }
.pagination .current { background: var(--primary); color: #fff; font-weight: 700; }

/* ── toast: refined ─────────────────────────────────────────────────────── */
.toast {
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
  font-weight: 500; font-size: 13.5px; padding: 11px 18px;
}

/* ── modal: focused ─────────────────────────────────────────────────────── */
.modal-card { border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.modal-head h3 { letter-spacing: -.02em; }

/* ── reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .card-hover:hover, .btn:hover, .hero-cat:hover { transform: none !important; }
}


/* ── v3 UX components ──────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed; inset-block-start: 0; inset-inline-start: 0; z-index: 110;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width .08s linear;
}

/* recent search suggestions */
.searchbar { z-index: 5; }
.recent-search {
  position: absolute; inset-block-start: calc(100% + 6px); inset-inline: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg);
}
.recent-search[hidden] { display: none; }
.recent-label { font-size: 11.5px; color: var(--muted); margin-inline-end: 2px; }
.recent-item {
  padding: 4px 10px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-2); font-size: 12.5px;
  transition: background var(--dur), color var(--dur);
}
.recent-item:hover { background: var(--primary-soft); color: var(--primary); }

/* keyboard hint inside the search field */
.searchbar kbd {
  position: absolute; inset-inline-end: 84px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 7px; border-radius: var(--r-xs);
  background: var(--surface); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  pointer-events: none;
}
.searchbar:focus-within kbd { opacity: 0; }
html[dir="rtl"] .searchbar kbd { inset-inline-end: auto; inset-inline-start: 84px; }

@media (max-width: 760px) {
  .searchbar kbd { display: none; }
  .recent-search { position: static; margin-top: 6px; box-shadow: none; }
}

/* mobile drawer: full-height sheet with a calmer look */
@media (max-width: 760px) {
  .navbar.open {
    background: var(--bg);
    padding: 0;
    display: flex; flex-direction: column;
  }
  .navbar.open .navbar-inner {
    flex: 1; overflow-y: auto; padding: var(--sp-5) var(--sp-4) var(--sp-10);
    gap: 2px;
  }
  .navbar.open .nav-link {
    font-size: 16.5px; font-weight: 500; padding: 13px 14px;
    border-radius: var(--r-sm); color: var(--text-2);
  }
  .navbar.open .nav-link:hover { background: var(--surface-3); color: var(--text); }
  .navbar.open .nav-link.active {
    background: var(--primary-soft); color: var(--primary); font-weight: 600;
  }
  .navbar.open .nav-cta {
    margin-top: auto; padding: var(--sp-4) var(--sp-4) var(--sp-6);
    border-top: 1px solid var(--line); background: var(--surface);
    display: flex; flex-direction: column; gap: 8px; align-items: stretch;
  }
  .navbar.open .nav-cta .nav-link { display: none; }
  .navbar.open .nav-cta .btn { width: 100%; height: 46px; }
}

/* compact section separators */
.section-head { margin-bottom: var(--sp-7); }
.section-link { transition: gap var(--dur) var(--ease-out), color var(--dur); }
.section-link:hover { gap: 10px; }

/* tighter grids */
.grid-products { gap: var(--sp-5); }
.grid-cats { gap: var(--sp-4); }
.grid-companies { gap: var(--sp-4); }
.cat-card { padding: var(--sp-5); gap: 10px; }
.cat-icon { width: 46px; height: 46px; border-radius: var(--r); }
.cat-name { font-size: 15px; font-weight: 600; }

/* quiet badges */
.badge { padding: 3px 9px; font-size: 11px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* focus visibility for keyboard users */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.button:focus-visible, .btn:focus-visible { outline-offset: 3px; }

/* reduced visual noise on hover for touch devices */
@media (hover: none) {
  .card-hover:hover { transform: none; box-shadow: var(--shadow-xs); }
  .btn:hover { transform: none; }
}


/* ── language dropdown ──────────────────────────────────────────────────── */
.topbar-lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-full);
  color: var(--text-2); font-size: 12.5px; font-weight: 600;
  transition: background var(--dur), color var(--dur);
}
.lang-btn:hover { background: var(--surface-3); color: var(--text); }
.lang-menu {
  position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0;
  z-index: 85; width: 178px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  animation: pop .16s var(--ease);
}
.lang-menu[hidden] { display: none; }
.lang-item {
  display: flex; flex-direction: column; gap: 1px; padding: 7px 11px;
  border-radius: var(--r-sm); color: var(--text-2); transition: background var(--dur), color var(--dur);
}
.lang-item:hover { background: var(--surface-3); color: var(--text); }
.lang-item.active { background: var(--primary-soft); color: var(--primary); }
.lang-native { font-size: 13.5px; font-weight: 600; }
.lang-name { font-size: 11px; color: var(--muted); }
.lang-item.active .lang-name { color: var(--primary); opacity: .75; }

/* brand mark sizing */
.brand-mark { line-height: 0; }
.brand-mark svg { display: block; }


/* ── off-canvas filter drawer ──────────────────────────────────────────── */
.listing { grid-template-columns: minmax(0, 1fr); }
.filter-panel {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 100;
  width: min(360px, 92vw); overflow-y: auto;
  background: var(--surface); border-inline-start: 1px solid var(--line);
  border-radius: 0; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .28s var(--ease-out);
  padding: var(--sp-6);
}
@media (max-width: 900px) {
  html[dir="rtl"] .filter-panel { transform: translateX(-100%); }
  .filter-panel.open { transform: translateX(0); }
}
.filter-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-5); padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.filter-panel-head .filter-title { margin: 0; }
.filter-backdrop {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(6, 12, 22, .5); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease);
}
.filter-backdrop.show { opacity: 1; pointer-events: auto; }
.filter-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  display: inline-block; margin-inline-start: 4px;
}
.filter-toggle-btn { display: none; }

@media (max-width: 900px) {
  .listing { grid-template-columns: 1fr; }
}


/* ==========================================================================
   v3 mobile — a purpose-built small-screen experience
   Bottom tab bar · collapsing header · touch-sized targets · no sidebars
   ========================================================================== */

/* ── base mobile posture ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --header-h: 58px;
    --sp-16: 56px;
    --sp-12: 44px;
    --sp-10: 36px;
    --sp-8: 28px;
  }

  body {
    font-size: 15px;
    line-height: 1.8;
    /* keep the fixed bottom bar from covering the last content */
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  /* Tap targets: nothing smaller than 44px on touch screens. */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .icon-btn { width: 42px; height: 42px; }
  .nav-link { min-height: 44px; display: flex; align-items: center; }
  input, select, textarea { font-size: 16px !important; }  /* prevents iOS zoom */

  /* Kill decorative shadows that muddy small screens. */
  .hero-panel { box-shadow: var(--shadow); }
  .cta-band { box-shadow: var(--shadow-sm); }
  .compare-tray { box-shadow: 0 -4px 20px rgba(15,27,45,.10); }
}

/* ── collapsing header on scroll ───────────────────────────────────────── */
@media (max-width: 900px) {
  .header { transition: transform .25s var(--ease-out); }
  .header.header-hidden { transform: translateY(-100%); }
  .header { position: sticky; top: 0; }
  .header-inner-compact .brand-text small { display: none; }
}

/* ── top bar on mobile: compact single row ─────────────────────────────── */
@media (max-width: 900px) {
  .topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
  .topbar-inner { min-height: 36px; gap: var(--sp-3); }
  .topbar-item.hide-sm { display: none !important; }
  .topbar-spacer { flex: 1; }
  .currency-btn { padding: 4px 9px; font-size: 12px; }
  .lang-btn { padding: 4px 9px; font-size: 12px; }
}

/* ── header layout on mobile ───────────────────────────────────────────── */
@media (max-width: 760px) {
  .header-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand . actions" "search search search";
    gap: 10px var(--sp-3);
    padding-block: 9px 11px;
    align-items: center;
  }
  .brand { grid-area: brand; }
  .header-actions { grid-area: actions; margin: 0; }
  .searchbar { grid-area: search; width: 100%; max-width: none; }

  .brand-text small { display: none; }
  .brand-text strong { font-size: 15px; }

  .searchbar input { height: 44px; font-size: 15px; }
  .searchbar-btn { height: 36px; font-size: 13px; padding-inline: 14px; }
  .searchbar kbd { display: none; }
  .recent-search { display: none; }
}

/* ── bottom tab bar (mobile primary navigation) ────────────────────────── */
.bottom-nav {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 80;
  display: none; align-items: stretch;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 8px 4px 7px;
  color: var(--muted); font-size: 10.5px; font-weight: 500;
  position: relative; transition: color var(--dur);
  min-height: 58px;
}
.bottom-nav-item .ico { transition: transform var(--dur) var(--ease-out); }
.bottom-nav-item.active { color: var(--primary); font-weight: 600; }
.bottom-nav-item.active .ico { transform: translateY(-2px); }
.bottom-nav-item.active::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 22%;
  height: 2.5px; border-radius: 0 0 3px 3px; background: var(--primary);
}
.bottom-nav-item .nav-badge {
  position: absolute; inset-block-start: 6px; inset-inline-end: 50%;
  margin-inline-end: -22px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-full);
  background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}

@media (max-width: 900px) {
  .bottom-nav { display: flex; }
  /* the compare tray sits above the tab bar */
  .compare-tray { inset-block-end: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .bot-fab { inset-block-end: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .bot-panel { inset-block-end: calc(132px + env(safe-area-inset-bottom, 0px)); }
  .to-top { inset-block-end: calc(70px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ── drawer navigation (mobile menu) ───────────────────────────────────── */
@media (max-width: 760px) {
  .navbar.open { background: var(--bg); }
  .navbar.open .navbar-inner {
    padding: var(--sp-4) var(--sp-4) var(--sp-8);
    display: flex; flex-direction: column; gap: 3px;
  }
  .navbar.open .nav-link {
    min-height: 50px; font-size: 16px; padding: 12px 14px;
    border-radius: var(--r); font-weight: 500;
  }
  .navbar.open .nav-link .ico { width: 19px; height: 19px; }
  .navbar.open .nav-link.active { background: var(--primary-soft); color: var(--primary); }
  .navbar.open .nav-cta {
    margin-top: var(--sp-6); padding: var(--sp-4) 0 0;
    border-top: 1px solid var(--line); gap: 9px;
  }
  .navbar.open .nav-cta .nav-link { display: flex; }
  .navbar.open .nav-cta .btn { width: 100%; height: 48px; }
}

/* ── hero on mobile ─────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .hero-inner {
    padding: var(--sp-8) 0 var(--sp-7);
    grid-template-columns: 1fr; gap: var(--sp-7);
  }
  .hero-copy { order: 1; }
  .hero-panel { order: 2; padding: var(--sp-5); border-radius: var(--r-lg); }
  .hero-title { font-size: clamp(26px, 8vw, 36px); line-height: 1.28; }
  .hero-sub { font-size: 15px; margin-top: var(--sp-3); }
  .hero-actions { flex-direction: column; align-items: stretch; margin-top: var(--sp-5); gap: 10px; }
  .hero-actions .btn { width: 100%; height: 50px; }
  .hero-stats {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4) var(--sp-5); margin-top: var(--sp-6); padding-top: var(--sp-5);
  }
  .hero-stat b { font-size: 24px; }
  .hero-cat-list { max-height: 260px; overflow-y: auto; }
}

/* ── product grid on mobile: 2 columns, tight ──────────────────────────── */
@media (max-width: 760px) {
  .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-companies { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .product-card { border-radius: var(--r); }
  .product-body { padding: 12px; gap: 4px; }
  .product-title { font-size: 13.5px; line-height: 1.5; }
  .product-cat { font-size: 10.5px; }
  .product-meta { font-size: 11.5px; }
  .product-meta span:nth-child(2) { display: none; }
  .product-foot { padding-top: 10px; margin-top: 6px; }
  .product-price { font-size: 13.5px; }
  .product-foot .btn { width: 100%; height: 36px; min-height: 36px; font-size: 12.5px; }
  .card-actions { inset-block-start: 8px; inset-inline-end: 8px; gap: 4px; }
  .wish-btn { width: 40px; height: 40px; }
  .wish-btn .ico { width: 14px; height: 14px; }
  .media-badge { inset-block-start: 8px; inset-inline-start: 8px; font-size: 10px; padding: 2px 7px; }

  .cat-card { padding: 14px; gap: 8px; }
  .cat-icon { width: 40px; height: 40px; }
  .cat-name { font-size: 13.5px; }
  .cat-count { font-size: 11.5px; }

  .company-card { padding: 14px; gap: 6px; }
  .company-logo { width: 48px; height: 48px; }
  .company-name { font-size: 13.5px; }
  .company-meta { font-size: 11.5px; }
  .company-meta:nth-of-type(2) { display: none; }
}

/* ── listing bar / filters on mobile ───────────────────────────────────── */
@media (max-width: 900px) {
  .listing { padding-bottom: var(--sp-6); }
  .listing-bar { gap: 10px; margin-bottom: var(--sp-4); }
  .listing-count { font-size: 13px; }
  .view-switch { display: none; }
  .filter-panel { width: min(340px, 92vw); padding: var(--sp-5); }
  .filter-panel .field { margin-bottom: var(--sp-4); }
  .filter-group { padding-bottom: var(--sp-4); margin-bottom: var(--sp-4); }
  .filter-list { max-height: 200px; }
  .filter-panel .btn-block { min-height: 46px; }
}

/* ── compare on mobile: horizontal scroll with sticky label column ─────── */
@media (max-width: 760px) {
  .compare-wrap { border-radius: var(--r); }
  .compare-table { min-width: 560px; }
  .compare-label-col { position: sticky; inset-inline-start: 0; z-index: 2; width: 92px; }
  .compare-table thead .compare-label-col { z-index: 3; }
  .compare-card { min-width: 160px; }
  .compare-table th, .compare-table td { padding: 10px 12px; font-size: 13px; }
  .compare-tray-inner { padding: 9px 0; }
  .compare-tray-icon { width: 32px; height: 32px; }
  .compare-tray-text b { font-size: 12.5px; }
  .compare-tray-text small { font-size: 11px; }
  .compare-tray-actions .btn { min-height: 36px; }
}

/* ── forms on mobile ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .field { margin-bottom: var(--sp-4); }
  .input, .select { min-height: 48px; }
  .textarea { min-height: 120px; }
  .form-nav { flex-direction: column-reverse; gap: 10px; }
  .form-nav .btn { width: 100%; }
  .stepper { gap: 5px; }
  .step .n { width: 32px; height: 32px; }
  .stepper-progress { margin-bottom: var(--sp-4); }
  .booth-grid { grid-template-columns: 1fr; }
  .booth-option { padding: var(--sp-4); }
  .result-card { padding: var(--sp-5); margin: var(--sp-6) auto; }
  .tracking-code { font-size: 17px; padding: 10px 16px; letter-spacing: 1.5px; }
  .radio-card { padding: 12px; }
  .contact-cards { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

/* ── detail pages on mobile ────────────────────────────────────────────── */
@media (max-width: 760px) {
  .detail-layout { grid-template-columns: 1fr; gap: var(--sp-5); }
  .detail-side { position: static; gap: var(--sp-3); }
  .detail-title { font-size: 20px; }
  .detail-price { font-size: 21px; }
  .info-card { padding: var(--sp-4); }
  .tabs { gap: 0; }
  .tab-btn { padding: 11px 13px; font-size: 13.5px; }
  .company-hero { padding: var(--sp-4); gap: var(--sp-3); }
  .company-hero .company-logo.lg { width: 60px; height: 60px; }
  .company-hero .stack { width: 100%; }
  .company-hero .stack .btn { width: 100%; }
  .detail-thumbs { padding: 10px; gap: 8px; }
  .detail-thumbs button { width: 52px; height: 52px; }
}

/* ── modal on mobile: bottom sheet ─────────────────────────────────────── */
@media (max-width: 760px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-card {
    width: 100%; max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: var(--sp-5) var(--sp-4) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
    animation: sheetUp .24s var(--ease-out);
  }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
  .modal-head { margin-bottom: var(--sp-4); }
  .modal-card .btn { width: 100%; }
}


/* ── touch target sizing (mobile) ─────────────────────────────────────── */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  /* Inline text links that act as controls get a comfortable hit area. */
  .section-link { min-height: 40px; padding-block: 8px; }
  .sub-chip { min-height: 36px; padding-block: 8px; }
  .breadcrumb a { min-height: 32px; display: inline-flex; align-items: center; }
  .footer-links a { min-height: 38px; display: inline-flex; align-items: center; }
  .product-title a { display: inline-block; padding-block: 2px; }
  .compare-table a { display: inline-block; padding-block: 4px; }
  .pagination a, .pagination span { min-width: 40px; height: 40px; }

  /* Icon-only buttons need a bigger hit area than their visual size. */
  .wish-btn { position: relative; }
  .wish-btn::after {
    content: ""; position: absolute; inset: -7px;
  }
  .icon-btn::after {
    content: ""; position: absolute; inset: -4px;
  }
  .icon-btn { position: relative; }

  /* Inline SVG links that only wrap an icon */
  .hero-cat .ico, .cat-block-side .btn .ico { pointer-events: none; }
  a > svg:only-child { min-width: 24px; min-height: 24px; }
}

/* The visual icon can stay small while the target grows. */
@media (max-width: 760px) {
  .wish-btn { width: 40px; height: 40px; }
  .wish-btn .ico { width: 15px; height: 15px; }
  .card-actions .wish-btn::after { inset: -9px; }
}


/* ── icon-only links get a proper hit area ─────────────────────────────── */
@media (max-width: 900px) {
  /* Inline links whose only content is an SVG (e.g. footer socials, card arrows). */
  a:has(> svg:only-child) {
    min-width: 42px; min-height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  /* Breadcrumb separators are not interactive — shrink their measured box. */
  .breadcrumb .sep { min-width: 0; min-height: 0; line-height: 1; }
  .breadcrumb .sep .ico { width: 12px; height: 12px; }
  /* Sub-chips and filter links */
  .filter-list a { min-height: 38px; }
  .cat-block-side .btn { min-height: 40px; }
  .bot-card { min-height: 62px; }
  .bot-chip { min-height: 34px; display: inline-flex; align-items: center; }
  .recent-item { min-height: 32px; display: inline-flex; align-items: center; }
}


/* ── final touch-target pass ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .breadcrumb a { min-height: 34px; min-width: 34px; display: inline-flex; align-items: center; }
  .product-title a { min-height: 30px; display: inline-flex; align-items: center; }
  .compare-table tbody a { min-height: 32px; display: inline-flex; align-items: center; }
  .company-card .company-name { min-height: 30px; display: inline-flex; align-items: center; }
}


/* ── mobile: keep the assistant button clear of the tab bar ────────────── */
@media (max-width: 900px) {
  .bot-fab {
    inset-block-end: calc(72px + env(safe-area-inset-bottom, 0px));
    inset-inline-start: 14px;
    width: 46px; height: 46px;
  }
  .bot-fab .ico { width: 20px; height: 20px; }
  .bot-fab-dot { width: 9px; height: 9px; inset-block-start: 4px; inset-inline-end: 4px; }
  .bot-panel {
    inset-block-end: calc(126px + env(safe-area-inset-bottom, 0px));
    inset-inline: 10px; width: auto;
    height: min(66vh, calc(100vh - 190px));
  }
  .bot-head { padding: 11px 13px; }
  .bot-avatar { width: 34px; height: 34px; }
  .bot-log { padding: 12px; gap: 9px; }
  .bot-msg { font-size: 13.2px; padding: 9px 11px; max-width: 92%; }
  .bot-card { padding: 8px 9px; gap: 8px; }
  .bot-card img, .bot-card .bot-card-icon { width: 36px; height: 36px; }
  .bot-input { padding: 9px; }
  .bot-input input { height: 44px; font-size: 16px; }
  .bot-input button { width: 44px; height: 44px; }
}

/* ── mobile: back-to-top clears the tab bar and assistant ──────────────── */
@media (max-width: 900px) {
  .to-top {
    inset-block-end: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    inset-inline-end: 14px !important;
    width: 42px; height: 42px;
  }
}

/* ── mobile: compare tray clears both the tab bar and the assistant ────── */
@media (max-width: 900px) {
  .compare-tray {
    inset-block-end: calc(58px + env(safe-area-inset-bottom, 0px));
  }
  .compare-tray-inner { gap: 9px; }
  .compare-tray-icon { display: none; }
  .compare-tray-text { min-width: 0; }
  .compare-tray-text b { font-size: 12.5px; white-space: nowrap; }
}


/* ── mobile drawer: full-screen, header preserved, links aligned ──────── */
@media (max-width: 760px) {
  .navbar.open {
    position: fixed; inset: 0; z-index: 120;
    background: var(--bg);
    display: flex; flex-direction: column;
    padding: 0;
    overflow: hidden;
  }
  .navbar.open .navbar-inner {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: var(--sp-5) var(--sp-4) var(--sp-10);
    display: flex; flex-direction: column; gap: 4px;
  }
  .navbar.open .nav-link {
    min-height: 54px; width: 100%;
    display: flex; align-items: center; gap: 13px;
    font-size: 16px; font-weight: 500; padding: 13px 15px;
    border-radius: var(--r); color: var(--text-2); text-align: start;
  }
  .navbar.open .nav-link .ico { width: 20px; height: 20px; flex: 0 0 auto; }
  .navbar.open .nav-link:hover { background: var(--surface-3); color: var(--text); }
  .navbar.open .nav-link.active {
    background: var(--primary-soft); color: var(--primary); font-weight: 600;
  }
  .navbar.open .nav-cta {
    margin-top: var(--sp-6); padding: var(--sp-5) 0 0;
    border-top: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 8px; align-items: stretch;
  }
  .navbar.open .nav-cta .nav-link { min-height: 50px; }
  .navbar.open .nav-cta .btn { width: 100%; height: 50px; }

  /* The header must stay visible above the drawer. */
  .header { z-index: 130; }
  .bottom-nav { z-index: 110; }
  .bot-fab, .bot-panel, .compare-tray { z-index: 100; }
}

/* Give the drawer a close affordance via the header hamburger. */
@media (max-width: 760px) {
  .navbar.open ~ .main { filter: none; }
  body.menu-open .bottom-nav { display: none; }
}


/* ── mobile drawer: start below the sticky header ──────────────────────── */
@media (max-width: 760px) {
  /* The drawer top is set by JS to sit exactly below the live header. */
  .navbar.open { inset-block-start: var(--header-h); }
  .navbar.open .navbar-inner {
    padding: var(--sp-4) var(--sp-4) var(--sp-10);
  }
  .navbar.open .nav-link { min-height: 52px; }
}

/* Hide the sticky search bar while the drawer is open — it duplicates
   navigation and steals vertical space. */
@media (max-width: 760px) {
  body.menu-open .searchbar { display: none; }
  body.menu-open .header-main { padding-block: 9px; }
}


/* ── the filter drawer is a mobile-only pattern; desktop keeps a sidebar ── */
@media (min-width: 901px) {
  .listing { grid-template-columns: 272px minmax(0, 1fr); gap: var(--sp-7); align-items: start; }
  .filter-panel {
    position: sticky; inset: auto; top: calc(var(--header-h) + 18px);
    width: auto; max-height: none; transform: none;
    border-radius: var(--r-lg); border: 1px solid var(--line);
    box-shadow: var(--shadow-xs); padding: var(--sp-5);
    background: var(--surface); overflow: visible;
  }
  .filter-panel-head { display: none; }
  .filter-panel .filter-group:first-of-type .filter-title { display: flex; }
  .filter-backdrop { display: none !important; }
  /* the desktop toggle lives in the listing bar */
  .listing-bar #filterToggle { display: inline-flex; }
}


/* On desktop the filters are always visible in the sidebar, so the toggle
   button is redundant — keep the count badge only. */
@media (min-width: 901px) {
  .listing-bar #filterToggle {
    display: none !important;
  }
}


/* ── RFQ basket tray ─────────────────────────────────────────────────── */
.rfq-tray {
  position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 76;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(15, 27, 45, .12);
  transform: translateY(110%); transition: transform .25s var(--ease);
}
.rfq-tray.show { transform: translateY(0); }
.rfq-btn.on { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* Two trays cannot share the same slot — stack them. */
body:has(.compare-tray.show) .rfq-tray.show { inset-block-end: 62px; }

@media (max-width: 900px) {
  .rfq-tray { inset-block-end: calc(58px + env(safe-area-inset-bottom, 0px)); }
  body:has(.compare-tray.show) .rfq-tray.show {
    inset-block-end: calc(58px + 58px + env(safe-area-inset-bottom, 0px));
  }
}


/* ── v3 final polish ──────────────────────────────────────────────────── */

/* Top bar: keep language + currency grouped together on one side. */
.topbar-inner { justify-content: flex-start; }
.topbar-spacer { order: 9; }
.topbar-item.topbar-lang { order: 10; }
.currency-switcher { order: 11; }

/* Brand: make the mark the clear anchor of the header. */
.brand-mark { line-height: 0; }
.brand-mark svg { display: block; filter: drop-shadow(0 2px 6px rgba(13, 148, 136, .22)); }
.brand { gap: 13px; }
.brand-text strong { font-size: 17px; letter-spacing: -.03em; }

/* Product card: the three action buttons crowd the image on small cards.
   Keep the wish button always visible; reveal compare + RFQ on hover/focus. */
@media (min-width: 761px) {
  .product-card .card-actions .compare-btn,
  .product-card .card-actions .rfq-btn {
    opacity: 0; transform: translateX(6px) scale(.9);
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
    pointer-events: none;
  }
  html[dir="rtl"] .product-card .card-actions .compare-btn,
  html[dir="rtl"] .product-card .card-actions .rfq-btn { transform: translateX(-6px) scale(.9); }
  .product-card:hover .card-actions .compare-btn,
  .product-card:hover .card-actions .rfq-btn,
  .product-card:focus-within .card-actions .compare-btn,
  .product-card:focus-within .card-actions .rfq-btn {
    opacity: 1; transform: none; pointer-events: auto;
  }
  .product-card .card-actions .compare-btn.on,
  .product-card .card-actions .rfq-btn.on { opacity: 1; transform: none; pointer-events: auto; }
}

/* Navbar CTA should not compete with the header CTA. */
.nav-cta .btn-primary { box-shadow: none; }

/* Scroll progress should not fight the sticky header. */
.scroll-progress { z-index: 130; }


/* ── image loading states ───────────────────────────────────────────────── */
.product-media img,
.detail-main-img img,
.company-logo img,
.exhibitor-logo img {
  opacity: 0;
  transition: opacity .35s var(--ease), transform .4s var(--ease-out);
  background: var(--surface-3);
}
.product-media img.loaded,
.detail-main-img img.loaded,
.company-logo img.loaded,
.exhibitor-logo img.loaded { opacity: 1; }


/* ── live search suggestions ────────────────────────────────────────────── */
.suggest-box {
  position: absolute; inset-block-start: calc(100% + 6px); inset-inline: 0;
  z-index: 70; max-height: 340px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px;
  animation: pop .14s var(--ease);
}
.suggest-box[hidden] { display: none; }
.suggest-head {
  padding: 6px 11px 8px; font-size: 11px; color: var(--muted);
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.suggest-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px;
  border-radius: var(--r-sm); color: var(--text-2); font-size: 14px;
  transition: background var(--dur), color var(--dur);
}
.suggest-item:hover, .suggest-item:focus { background: var(--surface-3); color: var(--text); outline: none; }
.suggest-icon {
  width: 26px; height: 26px; border-radius: var(--r-xs); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-size: 12px; flex: 0 0 auto;
}
.suggest-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-kind { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }


/* ── supplier portal ───────────────────────────────────────────────────── */
.stat-tile {
  padding: var(--sp-5); display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden;
}
.stat-tile b { font-size: 27px; font-weight: 800; letter-spacing: -.035em; }
.stat-tile small { color: var(--muted); font-size: 12.5px; }
.stat-icon {
  width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 8px;
}
.stat-tile .badge { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; }

.lead-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.lead-table th, .lead-table td { padding: 12px 16px; text-align: start; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.lead-table thead th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.lead-table tbody tr:last-child td { border-bottom: 0; }
.lead-table tbody tr:hover { background: var(--surface-2); }

.lead-row { padding: var(--sp-5); display: flex; align-items: flex-start; gap: var(--sp-4); flex-wrap: wrap; }
.lead-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.lead-row.done { opacity: .62; }

@media (max-width: 760px) {
  .lead-row { padding: var(--sp-4); }
  .lead-actions { width: 100%; }
  .lead-actions .btn { flex: 1; }
  .stat-tile b { font-size: 23px; }
}


/* ── buyer account ────────────────────────────────────────────────────── */
.account-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.account-nav { padding: 10px; position: sticky; top: calc(var(--header-h) + 18px); }
.account-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--r-sm); color: var(--text-2); font-size: 14px;
  transition: background var(--dur), color var(--dur);
}
.account-nav-item:hover { background: var(--surface-3); color: var(--text); }
button.account-nav-item {
  width: 100%; background: none; border: 0; cursor: pointer;
  font-family: inherit; text-align: start;
}
.account-nav-item .badge { font-size: 10.5px; }

.notif-row { padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px; }
.notif-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); flex: 0 0 auto;
}
.notif-price_drop { background: var(--accent-soft); color: var(--warn); }
.notif-reply { background: var(--ok-soft); color: var(--ok); }
.notif-new_rfq { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .account-nav-item { flex: 1 1 44%; min-height: 44px; }
  .account-nav .divider { display: none; }
}


/* ── insights dashboard ────────────────────────────────────────────────── */
.bar-chart {
  display: flex; align-items: flex-end; gap: 6px; height: 190px;
  padding: 20px 4px 0; border-bottom: 1px solid var(--line);
}
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
           align-items: center; height: 100%; gap: 5px; position: relative; }
.bar {
  width: 100%; min-height: 3px; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  transition: height .5s var(--ease-out), filter var(--dur);
}
.bar-col:hover .bar { filter: brightness(1.15); }
.bar-value {
  font-size: 10.5px; color: var(--muted); opacity: 0;
  transition: opacity var(--dur); position: absolute; top: -2px;
}
.bar-col:hover .bar-value { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 8px; }

.demand-bar {
  display: inline-block; width: 70px; height: 6px; border-radius: var(--r-full);
  background: var(--surface-3); overflow: hidden; vertical-align: middle;
  margin-inline-end: 6px;
}
.demand-bar > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rank {
  width: 20px; height: 20px; border-radius: var(--r-xs); display: grid; place-items: center;
  background: var(--surface-3); font-size: 11px; font-weight: 700; color: var(--muted);
}


/* ── editorial content ─────────────────────────────────────────────────── */
.guide-card { display: block; text-decoration: none; color: inherit; }
.guide-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 210px; }
.guide-card-title { font-size: 16.5px; font-weight: 700; line-height: 1.7; margin: 0; }
.guide-card:hover .guide-card-title { color: var(--primary); }
.guide-card-excerpt { font-size: 13.5px; line-height: 1.95; flex: 1; margin: 0; }

.article-body p { font-size: 15px; line-height: 2.25; margin: 0 0 18px; color: var(--text-2); }
.article-body p:last-child { margin-bottom: 0; }

.glossary-item { padding: 16px 18px; }
.glossary-item b { font-size: 14.5px; color: var(--text); }

.faq-item { padding: 0; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: start;
  padding: 16px 18px; background: none; border: 0; cursor: pointer;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  font-family: inherit; transition: background var(--dur);
}
.faq-q:hover { background: var(--surface-3); }
.faq-icon { flex: 0 0 auto; color: var(--muted); transition: transform var(--dur); }
.faq-item.is-open .faq-icon { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 18px 16px; }
.faq-item.is-open .faq-a { display: block; }
.faq-a p { font-size: 13.8px; line-height: 2.1; color: var(--text-2); margin: 0; }


/* ── reviews & ratings ─────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 1px; }
.star { color: var(--line-strong); font-size: 15px; line-height: 1; }
.star.on { color: var(--warn); }

.review-summary { padding: 20px 22px; }
.rating-big { text-align: center; min-width: 120px; }
.rating-big b { display: block; font-size: 38px; font-weight: 800; line-height: 1.1; }
.rating-big small { display: block; margin-top: 4px; font-size: 12px; }
.rating-bars { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rating-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rating-row-k { width: 28px; color: var(--muted); flex: 0 0 auto; }
.rating-row-n { width: 26px; text-align: end; color: var(--muted); flex: 0 0 auto; }
.rating-bar { flex: 1; height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; min-width: 0; }
.rating-bar > span { display: block; height: 100%; background: var(--warn); border-radius: inherit; }

.review-item { padding: 18px 20px; }
.review-title { display: block; margin-top: 8px; font-size: 15px; }
.review-body { margin: 8px 0 0; font-size: 13.8px; line-height: 2.05; color: var(--text-2); }
.review-pc { margin-top: 8px; font-size: 12.8px; }
.review-pc .pros { color: var(--ok); }
.review-pc .cons { color: var(--danger); }

.star-input { display: flex; gap: 3px; }
.star-input button { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--line-strong); transition: color var(--dur); }
.star-input button.on { color: var(--warn); }
.star-input button:hover { transform: scale(1.1); }

.badge-ok { background: var(--ok-soft); color: var(--ok); }
.btn-xs { padding: 4px 9px; font-size: 11.5px; min-height: 28px; }

@media (max-width: 560px) {
  .review-summary .row-center { flex-direction: column; align-items: stretch; gap: 16px; }
  .rating-big { min-width: 0; }
}


/* ── company page ──────────────────────────────────────────────────────── */
.company-hero { display: flex; align-items: flex-start; gap: 18px; }
.company-logo {
  width: 74px; height: 74px; border-radius: var(--r-md); flex: 0 0 auto;
  background: var(--surface-3); display: grid; place-items: center;
  overflow: hidden; font-weight: 800; font-size: 22px; color: var(--muted);
}
.company-logo img { width: 100%; height: 100%; object-fit: cover; }
.company-hero .page-sub { display: flex; align-items: center; gap: 5px; }

.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.trust-badge {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px;
  border-radius: var(--r-full); background: var(--primary-soft); color: var(--text);
  font-size: 12.5px;
}
.trust-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
              background: var(--primary); color: #fff; flex: 0 0 auto; }
.trust-badge b { display: block; font-size: 13px; }
.trust-badge small { display: block; font-size: 11px; color: var(--muted); }

@media (max-width: 640px) {
  .company-hero { flex-direction: column; }
  .company-logo { width: 58px; height: 58px; }
}


/* ── share ──────────────────────────────────────────────────────────────── */
.share-preview { border-radius: var(--r-md); overflow: hidden; background: var(--surface-3); min-height: 90px; display: grid; place-items: center; }
.share-preview img { max-width: 100%; max-height: 220px; object-fit: contain; }


/* ── nav density: more top-level links need more room ─────────────────────── */
@media (max-width: 1140px) {
  .nav-link { padding-inline: 8px; font-size: 13.2px; gap: 5px; }
  .nav-link svg { width: 15px; height: 15px; }
  .nav-cta .btn { padding-inline: 11px; font-size: 13px; }
}
@media (max-width: 1040px) {
  .nav-link span { display: none; }
  .nav-link { padding-inline: 7px; }
  .nav-link svg { width: 18px; height: 18px; }
  .nav-cta .btn span { display: none; }
  .nav-cta .btn { padding-inline: 9px; }
}


/* ── super-admin ───────────────────────────────────────────────────────── */
.admin-head { background: linear-gradient(180deg, var(--primary-soft), transparent); }
.admin-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.admin-nav { padding: 10px; position: sticky; top: calc(var(--header-h) + 18px); }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--r-sm); color: var(--text-2); font-size: 13.8px;
  transition: background var(--dur), color var(--dur);
}
.admin-nav-item:hover { background: var(--surface-3); color: var(--text); }
.admin-nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.admin-nav-item .badge { font-size: 10.5px; }

.stat-tile-warn .stat-icon { background: var(--warn-soft); color: var(--warn); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
}
.card-title { font-size: 15px; font-weight: 700; margin: 0; }
.card-head + .stack, .card-head + .empty-state { padding: 16px 20px; }

.admin-queue-row, .admin-audit-row {
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-3);
  font-size: 13px;
}
.admin-mod-card { padding: 18px 20px; }
.admin-mod-title { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; }

.badge-soft { background: var(--surface-3); color: var(--muted); }
.badge-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }

.btn-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.btn-ok:hover { background: var(--ok); color: #fff; }
.btn-danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }

.alert { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: var(--r-sm); font-size: 13px; }
.alert-err { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-nav-item { flex: 1 1 44%; min-height: 44px; }
}


/* ── PWA install banner ─────────────────────────────────────────────────── */
.pwa-install {
  position: fixed; inset-block-end: 16px; inset-inline: 16px;
  max-width: 440px; margin-inline: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); z-index: 1200;
  animation: pwaSlide .35s var(--ease-out);
}
@keyframes pwaSlide { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.pwa-icon { border-radius: 12px; flex: 0 0 auto; }
.pwa-install b { display: block; font-size: 13.5px; }
.pwa-install small { display: block; font-size: 11.5px; color: var(--muted); }
.pwa-close { width: 30px; height: 30px; flex: 0 0 auto; }
@media (max-width: 560px) {
  .pwa-install { inset-block-end: 74px; inset-inline: 12px; }
  .pwa-install small { display: none; }
}


/* ── checkout & orders ──────────────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-6); align-items: start; }
.checkout-form { padding: 20px; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb { width: 52px; height: 52px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-3); flex: 0 0 auto; }
.cart-qty { width: 74px; }

.order-steps { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.order-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.order-step::before {
  content: ""; position: absolute; inset-block-start: 14px; inset-inline-start: -50%;
  width: 100%; height: 2px; background: var(--line);
}
.order-step:first-child::before { display: none; }
.order-step.done::before { background: var(--primary); }
.order-step-dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 700;
  position: relative; z-index: 1;
}
.order-step.done .order-step-dot { background: var(--primary); color: #fff; }
.order-step small { font-size: 11.5px; color: var(--muted); text-align: center; }
.order-step.done small { color: var(--text-2); }

.invoice-paper { background: var(--surface); }
.invoice-head { align-items: flex-start; }
.invoice-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.invoice-parties b { display: block; font-size: 14.5px; margin-top: 4px; }
.invoice-parties small { font-size: 11.5px; }

@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static !important; }
  .invoice-parties { grid-template-columns: 1fr; }
  .order-step small { font-size: 10px; }
}
@media print {
  .header, .footer, .topbar, .bottom-nav, #botFab, #botPanel, .breadcrumb, .btn { display: none !important; }
  .invoice-paper { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; }
}


/* ── USD price provenance ───────────────────────────────────────────────── */
.price-provenance {
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-3); border: 1px solid var(--line);
}
.price-provenance b { font-size: 16px; color: var(--text); }
.price-range-bar {
  position: relative; height: 5px; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--ok-soft), var(--warn-soft), var(--danger-soft));
  margin-top: 6px;
}
.price-range-bar > span {
  position: absolute; inset-block-start: -3px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--text); border: 2px solid var(--surface);
  transform: translateX(-50%);
}
html[dir="rtl"] .price-range-bar > span { transform: translateX(50%); }


.btn-xs.btn-ok, .btn-xs.btn-danger { min-width: 34px; justify-content: center; }


.lead-table td { text-align: start; }


/* Action pairs must not wrap — in RTL the first button renders right-most,
   which keeps the primary (approve) action on the right. */
.admin-queue-row .row-center,
.admin-mod-card .row-center,
.lead-table .row-center { flex-wrap: nowrap; }


/* ── price intelligence ─────────────────────────────────────────────────── */
.spread-cell { display: flex; align-items: center; gap: 8px; }
.spread-bar {
  position: relative; display: inline-block; width: 90px; height: 6px;
  border-radius: var(--r-full); background: var(--surface-3); overflow: visible;
}
.spread-bar > span {
  position: absolute; inset-block-start: -3px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--primary); border: 2px solid var(--surface);
  transform: translateX(-50%);
}
html[dir="rtl"] .spread-bar > span { transform: translateX(50%); }

.pi-match-card { padding: 16px 18px; }
.pi-score {
  min-width: 54px; text-align: center; padding: 4px 10px;
  border-radius: var(--r-full); background: var(--primary-soft); color: var(--primary);
  font-weight: 800; font-size: 14px;
}
.pi-products { display: flex; flex-direction: column; gap: 4px; }
.pi-product {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--text-2); text-decoration: none;
  padding: 5px 9px; border-radius: var(--r-xs); background: var(--surface-3);
}
.pi-product:hover { background: var(--primary-soft); color: var(--primary); }


/* ── supplier performance dashboard ────────────────────────────────────── */
.position-scale {
  position: relative; height: 10px; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--ok) 0%, var(--warn) 50%, var(--danger) 100%);
}
.position-marker {
  position: absolute; inset-block-start: -5px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--surface); border: 3px solid var(--text);
  transform: translateX(-50%);
}
html[dir="rtl"] .position-marker { transform: translateX(50%); }
.position-labels { display: flex; justify-content: space-between; margin-top: 8px; }
.position-labels small { font-size: 11px; color: var(--muted); }

.position-mini {
  position: relative; display: inline-block; width: 70px; height: 5px;
  border-radius: var(--r-full); background: var(--surface-3);
}
.position-mini > span {
  position: absolute; inset-block-start: -2px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--primary);
  transform: translateX(-50%);
}
html[dir="rtl"] .position-mini > span { transform: translateX(50%); }

.funnel-bar {
  height: 7px; border-radius: var(--r-full); background: var(--surface-3);
  overflow: hidden; margin-top: 5px;
}
.funnel-bar > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }


.spread-stack { display: flex; flex-direction: column; gap: 3px; }
.spread-labels { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); }


/* ══ UI.xlsx — shared page chrome (rows 3 & 4) ══════════════════════════════ */
.page-toolbar {
  position: sticky; inset-block-start: var(--header-h, 64px); z-index: 40;
  background: var(--surface); border-block-end: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.page-toolbar-inner { display: flex; flex-direction: column; }
.ptb-row { display: flex; align-items: center; gap: 6px; min-height: 46px; }
.ptb-row-main { padding-block: 8px; }
.ptb-row-tools {
  min-height: 40px; border-block-start: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.ptb-row-tools::-webkit-scrollbar { display: none; }

.ptb-home, .ptb-prof, .ptb-tool {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 11px; border-radius: var(--r-md); font-size: 13px; font-weight: 600;
  color: var(--text-2); transition: background .15s, color .15s;
}
.ptb-home:hover, .ptb-prof:hover, .ptb-tool:hover { background: var(--surface-3); color: var(--text); }
.ptb-home.on, .ptb-prof.on, .ptb-tool.on { background: var(--primary-soft); color: var(--primary); }

.ptb-search {
  flex: 1; min-width: 0; max-width: 560px; display: flex; align-items: center; gap: 8px;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--r-full); padding-inline: 14px; height: 38px;
  transition: border-color .15s, box-shadow .15s;
}
.ptb-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ptb-search-icon { color: var(--muted); display: inline-flex; flex-shrink: 0; }
.ptb-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 13.5px; color: var(--text); font-family: inherit;
}
.ptb-search input::placeholder { color: var(--muted); }
.ptb-spacer { flex: 1; }

/* ══ UI.xlsx — advanced filter panel (RESULT PAGE (FILTER) rows 5-12) ══════ */
/* .filter-panel is the single element: off-canvas drawer on mobile, sticky
   sidebar on desktop. .filter-body is the scrollable content inside it. */
.listing > .filter-panel {
  position: sticky;
  inset: auto;
  inset-block-start: calc(var(--header-h, 64px) + 104px);
  inset-inline: auto;
  width: auto; max-height: calc(100vh - 160px);
  overflow-y: auto;
  transform: none;
}
.filter-body > .filter-group:first-child { padding-block-start: 0; }
.filter-group { padding-block: 14px; border-block-end: 1px solid var(--border); }
.filter-group:first-child { padding-block-start: 0; }
.filter-group:last-of-type { border-block-end: 0; }
.filter-title {
  font-size: 12.5px; font-weight: 700; margin-block-end: 10px;
  color: var(--text); letter-spacing: .01em;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  display: inline-flex; align-items: center; padding: 5px 11px;
  border: 1px solid var(--border); border-radius: var(--r-full);
  font-size: 12px; font-weight: 500; color: var(--text-2);
  background: var(--surface-2); transition: all .15s; white-space: nowrap;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-inline { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.filter-inline > span { font-size: 11px; color: var(--muted); font-weight: 600; }
.filter-inline .input { height: 34px; font-size: 12.5px; }
.filter-check {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--text-2); cursor: pointer;
}
.filter-check input { width: 15px; height: 15px; accent-color: var(--primary); }

.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 14px; }
.active-filters .badge { gap: 5px; }

@media (max-width: 767px) {
  .page-toolbar { position: static; }
  .ptb-row-main { flex-wrap: wrap; }
  .ptb-search { order: 3; flex-basis: 100%; max-width: none; }
  .ptb-spacer { display: none; }

}


.sort-bar {
  display: flex; align-items: center; gap: 12px; margin-block-end: 14px;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); flex-wrap: wrap;
}
.sort-bar-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--text); flex-shrink: 0;
}
.sort-bar .filter-chips { flex: 1; }
@media (max-width: 767px) {
  .sort-bar { padding: 10px; }
  .sort-bar .filter-chips { overflow-x: auto; flex-wrap: nowrap; padding-block-end: 2px; }
}


/* ══ UI.xlsx — profile appearance options ═══════════════════════════════════ */
.opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.opt-grid-3 { grid-template-columns: repeat(3, 1fr); }
.opt-grid-2 { grid-template-columns: repeat(2, 1fr); }
.opt-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px; border: 2px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface-2); cursor: pointer; transition: all .16s; text-align: center;
}
.opt-card:hover { border-color: var(--primary); }
.opt-card.on { border-color: var(--primary); background: var(--primary-soft); }
.opt-card-simple { padding: 16px 12px; }
.opt-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.opt-preview {
  width: 100%; height: 52px; border-radius: var(--r-md); padding: 8px;
  display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--border);
}
.opt-preview-light { background: #fff; }
.opt-preview-dark { background: #0f172a; }
.opt-preview .opt-bar { height: 8px; border-radius: 3px; background: #0ea5a4; width: 60%; }
.opt-preview-light .opt-line { height: 5px; border-radius: 3px; background: #e2e8f0; width: 100%; }
.opt-preview-dark .opt-line { height: 5px; border-radius: 3px; background: #334155; width: 100%; }
.opt-preview .opt-line.short { width: 55%; }
.opt-sample { font-weight: 800; color: var(--text); line-height: 1; }
.opt-sample-lg { font-size: 30px; }
.opt-sample-md { font-size: 22px; }
.opt-sample-sm { font-size: 15px; }

.switch-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer;
  background: var(--surface-2);
}
.switch-row:hover { border-color: var(--primary); }
.switch-row b { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.switch-row small { font-size: 11.5px; }
.switch {
  appearance: none; width: 42px; height: 24px; border-radius: var(--r-full);
  background: var(--surface-3); position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .18s;
}
.switch::after {
  content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch:checked { background: var(--primary); }
html[dir="ltr"] .switch:checked::after { transform: translateX(18px); }
html[dir="rtl"] .switch:checked::after { transform: translateX(-18px); }

@media (max-width: 640px) {
  .opt-grid, .opt-grid-2, .opt-grid-3 { grid-template-columns: 1fr 1fr; }
}


.listing > .sort-bar,
.listing > .active-filters { grid-column: 1 / -1; }


/* ══ Reels — vertical snap-scroll feed ═════════════════════════════════════ */
.reels-page {
  --reel-max: min(520px, 100vw);
  background: #05070a;
  min-height: 100vh;
  display: flex; justify-content: center;
  padding-block: calc(var(--header-h, 64px) + 92px) 0;
}
.reels-stage {
  width: var(--reel-max);
  height: calc(100vh - var(--header-h, 64px) - 92px);
  overflow-y: auto; scroll-snap-type: y mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.reels-stage::-webkit-scrollbar { display: none; }

.reel {
  position: relative; height: 100%; scroll-snap-align: start;
  scroll-snap-stop: always; overflow: hidden; background: #000;
}
.reel-media { position: absolute; inset: 0; }
.reel-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: #0b1220;
}
.reel-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.35) 32%, rgba(0,0,0,0) 58%);
}

.reel-top {
  position: absolute; inset-block-start: 0; inset-inline: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; z-index: 3;
}
.reel-brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .02em;
}
.reel-icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.16);
  color: #fff; cursor: pointer; backdrop-filter: blur(8px);
}
.reel-icon-btn:hover { background: rgba(0,0,0,.6); }

.reel-rail {
  position: absolute; inset-block-end: 108px; inset-inline-end: 12px;
  display: flex; flex-direction: column; gap: 16px; z-index: 3;
}
.reel-action {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; cursor: pointer; color: #fff; padding: 0;
}
.reel-action-icon {
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px); transition: transform .16s, background .16s, color .16s;
}
.reel-action:hover .reel-action-icon { transform: scale(1.08); background: rgba(0,0,0,.62); }
.reel-action.on .reel-action-icon { background: var(--primary); border-color: var(--primary); color: #fff; }
.reel-action.on[data-reel-like] .reel-action-icon { background: #ef4444; border-color: #ef4444; }
.reel-action.on[data-reel-save] .reel-action-icon { background: #f59e0b; border-color: #f59e0b; }
.reel-action-count { font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

.reel-caption {
  position: absolute; inset-block-end: 0; inset-inline: 0; z-index: 3;
  padding: 18px 74px 26px 16px;
  display: flex; flex-direction: column; gap: 9px;
}
html[dir="rtl"] .reel-caption { padding: 18px 16px 26px 74px; }
.reel-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.reel-chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-full);
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
}
.reel-chip-ghost { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); }
.reel-title {
  font-size: 18px; font-weight: 800; color: #fff; line-height: 1.5;
  text-shadow: 0 2px 8px rgba(0,0,0,.5); margin: 0;
}
.reel-text {
  font-size: 12.8px; color: rgba(255,255,255,.82); line-height: 1.8; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reel-price { display: flex; align-items: baseline; gap: 9px; }
.reel-price b { font-size: 17px; color: #5eead4; font-weight: 800; }
.reel-price small { font-size: 11.5px; color: rgba(255,255,255,.6); }
.reel-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.reel-links .btn-outline {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.26); color: #fff;
  backdrop-filter: blur(8px);
}
.reel-links .btn-outline:hover { background: rgba(255,255,255,.22); }
.reel-stats { font-size: 11.5px; color: rgba(255,255,255,.6); display: flex; gap: 12px; }

.reel-progress {
  position: absolute; inset-block-end: 0; inset-inline: 0; height: 3px;
  background: rgba(255,255,255,.16); z-index: 4;
}
.reel-progress > span {
  display: block; height: 100%; width: 0%; background: #fff;
  transition: width .1s linear;
}
.reel-hint {
  position: absolute; inset-block-end: 60px; inset-inline: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; color: rgba(255,255,255,.72);
  animation: reel-bob 1.8s ease-in-out infinite; pointer-events: none;
}
@keyframes reel-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

.reels-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; height: 100%; color: rgba(255,255,255,.6);
}
.reels-empty-icon {
  width: 92px; height: 92px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
}

/* ── send-to-friends sheet ─────────────────────────────────────────────── */
.reel-sheet { position: fixed; inset: 0; z-index: 200; }
.reel-sheet[hidden] { display: none !important; }
.reel-sheet-backdrop { position: absolute; inset: 0; background: rgba(2,6,12,.66); backdrop-filter: blur(3px); }
.reel-sheet-panel {
  position: absolute; inset-block-end: 0; inset-inline: 0; margin-inline: auto;
  width: min(440px, 100%); background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 20px 18px 26px;
  box-shadow: 0 -14px 44px rgba(0,0,0,.36); animation: reel-sheet-up .26s var(--ease-out);
}
@keyframes reel-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.reel-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.reel-sheet-head h3 { font-size: 15.5px; font-weight: 700; margin: 0; }
.reel-share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.reel-share-btn {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 6px; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface-2); cursor: pointer; font-size: 11px; font-weight: 600;
  color: var(--text-2); transition: border-color .15s, transform .15s;
}
.reel-share-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
.reel-share-ico {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff;
}
.reel-share-ico.tg { background: #229ed9; }
.reel-share-ico.wa { background: #25d366; }
.reel-share-ico.cp { background: #64748b; }
.reel-share-ico.nt { background: var(--primary); }

@media (max-width: 767px) {
  .reels-page { padding-block: calc(var(--header-h, 64px) + 86px) 0; }
  .reels-stage { height: calc(100vh - var(--header-h, 64px) - 86px); }
  .reel-caption { padding: 16px 66px 24px 14px; }
  html[dir="rtl"] .reel-caption { padding: 16px 14px 24px 66px; }
  .reel-title { font-size: 16px; }
  .reel-rail { inset-block-end: 100px; gap: 13px; }
  .reel-action-icon { width: 42px; height: 42px; }
  .reel-share-grid { grid-template-columns: repeat(2, 1fr); }
}


/* Reels: the stage is capped at 520px, so keep the header from overflowing
   at intermediate widths, and enlarge the reel controls for touch. */
@media (max-width: 1100px) {
  .reels-page { --reel-max: min(520px, 100vw); }
}
.reel-icon-btn { width: 44px; height: 44px; }
.reel-links .btn { min-height: 42px; }
@media (max-width: 767px) {
  .reel-icon-btn { width: 42px; height: 42px; }
  .reel-links .btn { min-height: 44px; }
}


/* Keep the header from overflowing between 761px and 1100px, where the
   nav links plus the CTA no longer fit next to the logo. */
@media (max-width: 1100px) {
  .nav-cta .nav-link#navReels { display: none !important; }
}


/* Reels is an immersive feed — the site header and toolbar step aside. */
body.page-reels .header,
body.page-reels .page-toolbar,
body.page-reels .footer,
body.page-reels .bottom-nav { display: none !important; }

body.page-reels .reels-page {
  --reel-max: min(520px, 100vw);
  padding-block: 0;
  min-height: 100vh;
  height: 100vh;
}
body.page-reels .reels-stage {
  height: 100vh;
  width: min(520px, 100vw);
}


body.page-reels .topbar { display: none !important; }
body.page-reels .reels-page { padding-block: 0; min-height: 100vh; height: 100vh; }
body.page-reels .reels-stage { height: 100vh; }


/* Reels is immersive — no install banner over the video. */
body.page-reels .pwa-install,
body.page-reels .pwa-banner,
body.page-reels #pwaInstall { display: none !important; }


.reel-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.reel-links .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 767px) {
  .reel-caption { padding: 16px 66px 24px 14px; }
  .reel-links .btn { font-size: 12.5px; padding-inline: 12px; }
  .reel-stats { margin-top: 2px; }
}


body.page-reels .reels-page {
  --reel-max: min(520px, 100vw);
  padding-block: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
}
body.page-reels .reels-stage {
  height: 100vh;
  height: 100dvh;
}


body.page-reels { margin: 0; padding: 0; overflow: hidden; height: 100dvh; }
body.page-reels .reels-page {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
body.page-reels .reels-stage { height: 100dvh; }


/* Reels is immersive — the compare tray and RFQ tray must not float over it. */
body.page-reels .compare-tray,
body.page-reels .rfq-tray,
body.page-reels .sticky-cta,
body.page-reels .to-top { display: none !important; }


/* Reels is immersive — the chat FAB would sit on top of the action buttons. */
body.page-reels .bot-fab,
body.page-reels .bot-panel,
body.page-reels .bot-fab-dot { display: none !important; }
/* Give the reel action buttons breathing room from the screen edge. */
body.page-reels .reel-rail { inset-inline-end: 10px; }
body.page-reels .reel-caption { padding-inline-end: 72px; }
html[dir="rtl"] body.page-reels .reel-caption { padding-inline-end: 72px; }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-8); }
  .hero-panel { order: 2; }
  .detail-layout { grid-template-columns: 1fr; gap: var(--sp-6); }
  .detail-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .listing { grid-template-columns: 1fr; }
  .filter-panel {
    position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 100;
    width: min(360px, 92vw); max-height: none; overflow-y: auto;
    background: var(--surface); border-inline-start: 1px solid var(--line);
    border-radius: 0; box-shadow: var(--shadow-lg); padding: var(--sp-5);
    transform: translateX(100%); transition: transform .28s var(--ease);
  }
  html[dir="rtl"] .filter-panel { transform: translateX(-100%); }
  .filter-panel.open { transform: translateX(0); display: block; }
  .topbar { display: none; }
  .searchbar { max-width: none; }
  .nav-link { padding: 7px 10px; font-size: 13.5px; }
  .nav-link .ico { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .container { width: min(1280px, 100% - 2 * var(--sp-4)); }
  .section { padding: var(--sp-10) 0; }
  .mobile-toggle { display: grid; }
  .hide-sm { display: none !important; }
  .header-main { flex-wrap: wrap; gap: var(--sp-3); padding-block: 10px; }
  .brand { order: 1; }
  .header-actions { order: 2; margin-inline-start: auto; }
  .searchbar { order: 3; flex-basis: 100%; }
  .searchbar input { height: 42px; padding-inline-end: 96px; }
  .navbar { display: none; }
  .navbar.open {
    display: block; position: fixed; inset: 0; z-index: 90;
    background: var(--surface); padding: var(--sp-5); overflow-y: auto;
  }
  .navbar-inner { flex-direction: column; align-items: stretch; min-height: 0; gap: 4px; }
  .nav-link { padding: 12px 14px; font-size: 15.5px; }
  .nav-link .ico { display: inline; }
  .navbar-spacer { display: none; }
  .nav-cta { margin-top: var(--sp-4); flex-direction: column; align-items: stretch; }
  .nav-cta .btn { width: 100%; }
  .grid-products { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: var(--sp-3); }
  .grid-cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
  .grid-companies { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: var(--sp-3); }
  .product-body { padding: var(--sp-3); }
  .product-title { font-size: 13.5px; }
  .product-foot { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
  .product-foot .btn { width: 100%; }
  .company-card { padding: var(--sp-4); }
  .company-logo { width: 50px; height: 50px; }
  .hero-stats { gap: var(--sp-5); }
  .hero-stat b { font-size: 21px; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .product-row { grid-template-columns: 92px minmax(0, 1fr); gap: var(--sp-3); }
  .product-row .product-foot { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; padding: var(--sp-8) 0 var(--sp-6); }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  .form-grid { grid-template-columns: 1fr; }
  .modal-card { padding: var(--sp-5); border-radius: var(--r); }
  .stepper { gap: 6px; }
  .step span:not(.n) { display: none; }
  .step-line { min-width: 12px; }
}

@media (max-width: 460px) {
  .container { width: min(1280px, 100% - 2 * var(--sp-3)); }
  .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions .btn { width: 100%; }
  .newsletter-form { flex-direction: column; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .pagination a, .pagination span { min-width: 34px; height: 34px; }
}

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

@media print {
  .topbar, .header, .navbar, .footer, .btn, .filter-panel, .sticky-cta { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ── view modes ────────────────────────────────────────────────────────── */
.view-list { grid-template-columns: 1fr !important; }
.view-list .product-card { flex-direction: row; align-items: stretch; }
.view-list .product-media { width: 180px; flex: 0 0 180px; aspect-ratio: 4/3; }
.view-list .product-body { padding: var(--sp-5); }
.view-list .wish-btn { inset-inline-start: 10px; inset-inline-end: auto; }
.view-list .company-card { flex-direction: row; align-items: center; text-align: start; gap: var(--sp-4); }
.view-list .company-logo { margin: 0; }
.view-list .company-card .company-meta { margin-inline-end: var(--sp-4); }

.filter-toggle-btn { display: none; }

/* ── category blocks ───────────────────────────────────────────────────── */
.cat-block { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.cat-block-head { display: flex; align-items: flex-start; gap: var(--sp-4); }
.cat-block-head .grow { min-width: 0; }
.cat-block-title { font-size: 18px; font-weight: 700; }
.cat-block-desc { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.cat-block-side { display: flex; align-items: center; gap: var(--sp-3); flex: 0 0 auto; }
.sub-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.sub-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2);
  font-size: 13px; transition: background var(--dur), color var(--dur);
}
.sub-chip:hover { background: var(--primary-soft); color: var(--primary); }
.sub-chip b { font-size: 11px; color: var(--muted); font-weight: 600; }
.sub-chip:hover b { color: var(--primary); }

/* ── about ─────────────────────────────────────────────────────────────── */
.about-body { padding: var(--sp-6); font-size: 15px; line-height: 2; color: var(--text-2); }
.pillar { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.pillar h3 { font-size: 16.5px; }
.pillar p { color: var(--muted); font-size: 14px; }
.pillar .cat-icon { width: 46px; height: 46px; border-radius: var(--r); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }

/* ── contact ───────────────────────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--sp-6); align-items: start; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-4); }
.contact-card { padding: var(--sp-5); display: flex; flex-direction: column; gap: 7px; }
.contact-card .cat-icon { width: 46px; height: 46px; border-radius: var(--r); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.contact-card h3 { font-size: 15.5px; }
.contact-card p { color: var(--muted); font-size: 13.5px; }
.contact-form-card { padding: var(--sp-6); }

/* ── company hero ──────────────────────────────────────────────────────── */
.company-hero { display: flex; align-items: center; gap: var(--sp-5); padding: var(--sp-6); flex-wrap: wrap; }
.company-hero .company-logo.lg { width: 92px; height: 92px; border-radius: var(--r-lg); }
.company-hero .company-logo.lg img { padding: 10px; }
.company-hero .grow { min-width: 0; flex: 1; }
.detail-title { font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-desc { color: var(--text-2); line-height: 2; font-size: 14.5px; }
.detail-title .verified { color: var(--ok); display: inline-flex; }

/* ── reveal animation ──────────────────────────────────────────────────── */
/* `no-js` (and any failure in the observer) must never hide content: the
   hiding rule only applies once the script marks the document as enhanced. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }
html.js [data-reveal]:focus-within { opacity: 1; transform: none; }

/* ── stepper progress bar ──────────────────────────────────────────────── */
[data-stepper] { position: relative; }
.stepper-progress { height: 4px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; margin-bottom: var(--sp-5); }
.stepper-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: var(--r-full); transition: width .3s var(--ease); }


/* ── directional icons mirror in RTL ────────────────────────────────────── */
/* The SVG set is authored LTR; in RTL a "next" arrow must point left. */
html[dir="rtl"] .ico-mirror { transform: scaleX(-1); }
html[dir="rtl"] .hero-cat .ico:last-child,
html[dir="rtl"] .section-link .ico,
html[dir="rtl"] .cat-block-side .btn .ico,
html[dir="rtl"] .info-card .btn .ico,
html[dir="rtl"] .modal-card .btn .ico { transform: scaleX(-1); }
html[dir="rtl"] .breadcrumb .sep .ico { transform: scaleX(-1); }
html[dir="rtl"] .form-nav [data-step-prev] .ico { transform: scaleX(-1); }

/* ── additional responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .filter-toggle-btn { display: inline-flex; }
  .view-list .product-card { flex-direction: column; }
  .view-list .product-media { width: 100%; flex: none; }
  .view-list .company-card { flex-direction: column; text-align: center; }
}

@media (max-width: 760px) {
  .cat-block { padding: var(--sp-4); }
  .cat-block-head { flex-wrap: wrap; }
  .cat-block-side { width: 100%; justify-content: space-between; }
  .company-hero { padding: var(--sp-4); gap: var(--sp-4); }
  .company-hero .company-logo.lg { width: 68px; height: 68px; }
  .about-body { padding: var(--sp-5); }
  .contact-form-card { padding: var(--sp-5); }
  .detail-thumbs button { width: 52px; height: 52px; }
}

@media (max-width: 460px) {
  .cat-block-side { flex-direction: column; align-items: stretch; }
  .cat-block-side .btn { width: 100%; }
}

/* Touch-sized controls: applied on narrow viewports so they hold on
   phones even when hover/pointer media features are unreliable. */
@media (max-width: 900px) {
  .wish-btn { width: 42px; height: 42px; }
  .icon-btn { min-width: 42px; min-height: 42px; }
  .chip { min-height: 42px; padding-block: 9px; }
  .btn, .btn-sm, .btn-xs { min-height: 42px; }
}
@media (hover: none) and (pointer: coarse) {
  .wish-btn { width: 42px; height: 42px; }
  .icon-btn { min-width: 42px; min-height: 42px; }
  .chip { min-height: 42px; padding-block: 9px; }
  .btn, .btn-sm, .btn-xs { min-height: 42px; }
}


/* ═══════════════════════════════════════════════════════════════════════
   Design system v2 — editorial marketplace layout
   Adds a consistent rhythm: section headers with a lead line, refined
   product cards, a calmer category grid and a stronger visual hierarchy.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Section header: eyebrow + title + lead + action ─────────────────── */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-6); margin-block-end: var(--sp-8);
}
.section-head-main { min-width: 0; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary);
  margin-block-end: 10px;
}
.section-title {
  font-size: clamp(22px, 2.4vw, 30px); font-weight: 800;
  line-height: 1.35; letter-spacing: -.015em; color: var(--text);
  margin: 0;
}
.section-lead {
  margin-block-start: 10px; font-size: 14.5px; line-height: 1.85;
  color: var(--muted); max-width: 62ch;
}
.section-head-action { flex-shrink: 0; }

/* ── Refined product card ─────────────────────────────────────────────── */
.product-card {
  position: relative; display: flex; flex-direction: column;
  padding: 0; overflow: hidden; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              border-color .22s var(--ease);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-2);
}
.product-card:focus-within { border-color: var(--primary); }

.product-media {
  position: relative; display: block; aspect-ratio: 4 / 3;
  background: var(--surface-3); overflow: hidden;
  border-block-end: 1px solid var(--line);
}
.product-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s var(--ease), opacity .3s;
  opacity: 0;
}
.product-media img.loaded { opacity: 1; }
.product-card:hover .product-media img { transform: scale(1.045); }
.media-badge {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px;
  z-index: 2; border: 0; backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(15, 27, 45, .18);
}

.card-actions {
  position: absolute; inset-block-start: 10px; inset-inline-end: 10px;
  z-index: 3; display: flex; flex-direction: column; gap: 6px;
}
.card-actions .wish-btn {
  width: 34px; height: 34px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); color: var(--text-2);
  border: 1px solid var(--line); cursor: pointer;
  backdrop-filter: blur(8px); box-shadow: var(--shadow-xs);
  transition: transform .16s var(--ease), color .16s, background .16s;
}
.card-actions .wish-btn:hover { transform: scale(1.1); background: #fff; }
.card-actions .wish-btn.on { color: var(--danger); background: #fff; }
.card-actions .compare-btn.on { color: var(--primary); background: #fff; }
.card-actions .rfq-btn.on { color: var(--ok); background: #fff; }

.product-body {
  display: flex; flex-direction: column; gap: 9px;
  padding: var(--sp-4) var(--sp-5) var(--sp-5); flex: 1;
}
.product-cat {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--primary); text-transform: uppercase;
}
.product-title {
  margin: 0; font-size: 15px; font-weight: 700; line-height: 1.6;
  color: var(--text); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em;
}
.product-title a { color: inherit; }
.product-title a:hover { color: var(--primary); }
.product-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px;
  color: var(--muted); margin-block-start: -2px;
}
.product-meta span { display: inline-flex; align-items: center; gap: 5px; }
.product-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-block-start: auto; padding-block-start: var(--sp-4);
  border-block-start: 1px solid var(--line);
}
.product-price {
  font-size: 15.5px; font-weight: 800; color: var(--text);
  letter-spacing: -.01em; white-space: nowrap;
}
.product-foot .btn { flex-shrink: 0; }

/* ── Category tiles ───────────────────────────────────────────────────── */
.cat-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.cat-tile {
  position: relative; display: flex; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-5); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
  color: inherit; overflow: hidden; min-height: 104px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              border-color .2s var(--ease);
}
.cat-tile::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0;
  width: 4px; background: var(--cat, var(--primary)); opacity: .9;
}
.cat-tile:hover {
  transform: translateY(-2px); box-shadow: var(--shadow);
  border-color: var(--line-2);
}
.cat-tile-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); color: var(--cat, var(--primary));
  background: color-mix(in srgb, var(--cat, var(--primary)) 12%, transparent);
}
.cat-tile-body { min-width: 0; flex: 1; }
.cat-tile-name {
  font-size: 14.5px; font-weight: 700; color: var(--text);
  line-height: 1.55; margin: 0 0 3px;
}
.cat-tile-count { font-size: 12px; color: var(--muted); }
.cat-tile-arrow {
  position: absolute; inset-block-end: var(--sp-4); inset-inline-end: var(--sp-4);
  color: var(--line-2); transition: transform .2s var(--ease), color .2s;
}
.cat-tile:hover .cat-tile-arrow { color: var(--primary); transform: translateX(-3px); }
html[dir="rtl"] .cat-tile:hover .cat-tile-arrow { transform: translateX(3px); }

/* ── Company card ─────────────────────────────────────────────────────── */
.company-card {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-5); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-xs); color: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              border-color .2s var(--ease);
}
.company-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.company-card-top { display: flex; align-items: center; gap: var(--sp-3); }
.company-logo {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
  font-weight: 800; font-size: 17px; overflow: hidden;
}
.company-logo img { width: 100%; height: 100%; object-fit: cover; }
.company-card-name {
  font-size: 14.5px; font-weight: 700; color: var(--text);
  line-height: 1.5; margin: 0;
}
.company-card-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: 12px; color: var(--muted);
}
.company-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.company-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); padding-block-start: var(--sp-4);
  border-block-start: 1px solid var(--line); margin-block-start: auto;
  font-size: 12.5px; color: var(--muted);
}

/* ── Hero polish ──────────────────────────────────────────────────────── */
.hero { padding-block: 0; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: var(--r-full);
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  margin-block-end: var(--sp-5);
}
.hero-title {
  font-size: clamp(30px, 4.2vw, 50px); font-weight: 800;
  line-height: 1.28; letter-spacing: -.025em; color: var(--text);
  margin: 0 0 var(--sp-5); max-width: 100%; text-wrap: balance;
}
.hero-title em { font-style: normal; color: var(--primary); }
.hero-sub {
  font-size: clamp(14.5px, 1.5vw, 17px); line-height: 1.95;
  color: var(--text-2); max-width: 56ch; margin: 0 0 var(--sp-7);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-block-end: var(--sp-8); }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4); padding-block-start: var(--sp-6);
  border-block-start: 1px solid var(--line);
}
.hero-stat b {
  display: block; font-size: clamp(20px, 2.2vw, 27px); font-weight: 800;
  color: var(--text); letter-spacing: -.02em; line-height: 1.2;
}
.hero-stat span { font-size: 12.5px; color: var(--muted); }

.hero-panel {
  padding: var(--sp-6); border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-panel h3 { font-size: 16px; font-weight: 700; margin: 0 0 5px; }
.hero-panel-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 var(--sp-5); }
.hero-cat-list { display: flex; flex-direction: column; gap: 3px; }
.hero-cat {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 9px 10px; border-radius: var(--r-md);
  color: var(--text-2); font-size: 13.5px; font-weight: 600;
  transition: background .15s, color .15s;
}
.hero-cat:hover { background: var(--surface-3); color: var(--text); }
.hero-cat .cat-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cat, var(--primary));
  background: color-mix(in srgb, var(--cat, var(--primary)) 12%, transparent);
}
.hero-cat .n { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.hero-cat svg { color: var(--line-2); }

/* ── Trust band ───────────────────────────────────────────────────────── */
.trust-band {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}
.trust-item {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-5); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
}
.trust-item .ico-wrap {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.trust-item b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); margin-block-end: 3px; }
.trust-item small { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); }

/* ── CTA band ─────────────────────────────────────────────────────────── */
.cta-band {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-6); flex-wrap: wrap;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--primary) 0%, #0f766e 55%, #115e59 100%);
  color: #fff; box-shadow: var(--shadow);
}
.cta-band h3 { margin: 0 0 6px; font-size: clamp(19px, 2.2vw, 25px); font-weight: 800; }
.cta-band p { margin: 0; font-size: 14px; line-height: 1.85; color: rgba(255, 255, 255, .86); max-width: 56ch; }
.cta-band .btn { flex-shrink: 0; }
.cta-band .btn-outline { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.32); color: #fff; }
.cta-band .btn-outline:hover { background: rgba(255,255,255,.24); }

/* ── Page head ────────────────────────────────────────────────────────── */
.page-head {
  padding-block: var(--sp-8) var(--sp-6);
  border-block-end: 1px solid var(--line);
  background: var(--surface);
}
.page-title {
  font-size: clamp(21px, 2.6vw, 29px); font-weight: 800;
  letter-spacing: -.015em; line-height: 1.35; color: var(--text); margin: 0;
}
.page-sub { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.8; }
.breadcrumb {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); margin-block-end: var(--sp-4);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { display: inline-flex; opacity: .5; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ── Empty state ──────────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-4); padding: var(--sp-16) var(--sp-6); text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  background: var(--surface-2); color: var(--muted);
}
.empty-state h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.empty-state p { margin: 0; font-size: 13.5px; line-height: 1.85; max-width: 48ch; }
.empty-state .ico-wrap {
  width: 60px; height: 60px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--muted);
}

/* ── Buttons: consistent sizing ───────────────────────────────────────── */
.btn { transition: transform .14s var(--ease), box-shadow .18s var(--ease), background .16s; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 50px; padding-inline: var(--sp-7); font-size: 15px; }
.btn-sm { min-height: 38px; padding-inline: var(--sp-4); font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { order: 2; }
  .trust-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--sp-4); }
  .section-title { font-size: 21px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
  .trust-band { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-3); }
  .cat-tile { padding: var(--sp-4); min-height: 92px; }
  .cat-tile-icon { width: 40px; height: 40px; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .product-body { padding: var(--sp-4); }
  .page-head { padding-block: var(--sp-6) var(--sp-5); }
}

/* ── companies listing keeps the compact legacy card ──────────────────── */
.company-card-list {
  padding: var(--sp-5); display: flex; flex-direction: column; gap: 10px;
  align-items: flex-start; text-align: start;
}
.company-card-list .company-logo {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.company-card-list .company-logo img { width: 100%; height: 100%; object-fit: cover; }
.company-card-list .company-name {
  min-height: 30px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.5;
}
.company-card-list .company-meta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--muted);
}

/* ── PWA install: slim bottom toast, never covering the fold ───────────── */
.pwa-install {
  inset-block-end: 14px; inset-inline: auto;
  inset-inline-end: 14px; margin-inline: 0;
  max-width: 330px; padding: 10px 12px; gap: 10px;
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  animation: pwa-slide-in .3s var(--ease);
}
@keyframes pwa-slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.pwa-install b { font-size: 12.5px; }
.pwa-install small { display: none; }
.pwa-install .ico-wrap { width: 34px; height: 34px; flex-shrink: 0; }
@media (max-width: 767px) {
  .pwa-install { inset-block-end: 78px; inset-inline-end: 10px; left: auto; max-width: 300px; }
}


/* ══ Polish pass ═════════════════════════════════════════════════════════ */

/* Category icons need a touch more presence — the glyph was nearly invisible
   against the tinted square. */
.hero-cat .cat-icon,
.cat-tile-icon { color: var(--cat, var(--primary)); }
.hero-cat .cat-icon { background: color-mix(in srgb, var(--cat, var(--primary)) 16%, transparent); }
.cat-tile-icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cat, var(--primary)) 13%, transparent);
}
.cat-tile-icon svg { stroke-width: 1.9; }

/* The install toast competes with the chat button; keep it low-key. */
.pwa-install { z-index: 60; }
.pwa-install .ico-wrap { background: var(--primary-soft); color: var(--primary); }

/* Hero statistics read better as a divided strip. */
.hero-stats { position: relative; }
.hero-stat { position: relative; padding-inline-start: var(--sp-4); }
.hero-stat:first-child { padding-inline-start: 0; }
.hero-stat + .hero-stat::before {
  content: ""; position: absolute; inset-block: 4px; inset-inline-start: 0;
  width: 1px; background: var(--line);
}

/* Section rhythm: alternate the surface but keep the edges crisp. */
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section { border-block-end: 1px solid var(--line); }
.section:last-of-type { border-block-end: 0; }

/* Consistent grid gutters. */
.grid-products { gap: var(--sp-5); }
.grid-companies { gap: var(--sp-4); }

/* Product card: keep the action buttons from crowding the title. */
.product-card .card-actions { gap: 5px; }
.product-card .card-actions .wish-btn { width: 32px; height: 32px; }

/* Reduce visual noise: the category label under the card is redundant with
   the title, so make it quieter. */
.product-cat { font-size: 10.5px; letter-spacing: .06em; }

/* Focus visibility for keyboard users across interactive cards. */
.cat-tile:focus-visible,
.company-card:focus-visible,
.product-card:focus-visible,
.hero-cat:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* Consistent hover lift for every clickable card. */
.cat-tile:hover .cat-tile-icon { transform: scale(1.06); }
.cat-tile-icon { transition: transform .2s var(--ease); }

@media (max-width: 767px) {
  .hero-stat { padding-inline-start: var(--sp-3); }
  .grid-products { gap: var(--sp-4); }
  .product-card .card-actions .wish-btn { width: 30px; height: 30px; }
}

/* Keep the old section-sub class consistent with the new section-lead. */
.section-sub {
  margin-block-start: 10px; font-size: 14.5px; line-height: 1.85;
  color: var(--muted); max-width: 62ch;
}
/* The section-link action was a bare anchor; make it a proper button. */
.section-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; transition: all .16s var(--ease);
}
.section-link:hover { border-color: var(--primary); color: var(--primary); }

/* ── Guide / article cards ────────────────────────────────────────────── */
.guide-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--surface); color: inherit; box-shadow: var(--shadow-xs);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.guide-card-media {
  position: relative; aspect-ratio: 16 / 9; background: var(--surface-3);
  overflow: hidden; border-block-end: 1px solid var(--line);
}
.guide-card-media img { width: 100%; height: 100%; object-fit: cover; }
.guide-card-media-fallback {
  width: 100%; height: 100%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary); background: var(--primary-soft);
}
.guide-card-body { display: flex; flex-direction: column; gap: 8px; padding: var(--sp-5); flex: 1; }
.guide-card-cat {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--primary);
}
.guide-card-title {
  margin: 0; font-size: 15px; font-weight: 700; line-height: 1.6; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.guide-card-excerpt {
  margin: 0; font-size: 13px; line-height: 1.85; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.guide-card-foot {
  display: flex; align-items: center; gap: 6px; margin-block-start: auto;
  padding-block-start: var(--sp-4); border-block-start: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}

/* ── Glossary term cards ──────────────────────────────────────────────── */
.glossary-item {
  display: flex; flex-direction: column; gap: 9px; padding: var(--sp-5);
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-xs);
  transition: border-color .2s, box-shadow .2s;
}
.glossary-item:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.glossary-item b { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.5; }
.glossary-item p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--text-2); }
.glossary-item .glossary-latin { font-size: 12px; color: var(--muted); font-style: italic; }

/* ── Category block (categories page) ─────────────────────────────────── */
.cat-block {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-5);
  align-items: start; padding: var(--sp-6); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-xs);
  transition: border-color .2s, box-shadow .2s;
}
.cat-block:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.cat-block .cat-icon {
  width: 52px; height: 52px; border-radius: var(--r-md); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cat, var(--primary));
  background: color-mix(in srgb, var(--cat, var(--primary)) 12%, transparent);
}
.cat-block-title { margin: 0 0 5px; font-size: 16px; font-weight: 700; color: var(--text); }
.cat-block-desc { margin: 0; font-size: 13px; line-height: 1.85; color: var(--muted); max-width: 68ch; }
.cat-block-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-3); }
.cat-block-subs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: var(--sp-4);
  grid-column: 2 / -1;
}
.cat-block-subs a {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border-radius: var(--r-full); border: 1px solid var(--line);
  background: var(--surface-2); font-size: 12.5px; font-weight: 500; color: var(--text-2);
  transition: border-color .15s, color .15s, background .15s;
}
.cat-block-subs a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.cat-block-subs .n { font-size: 11px; color: var(--muted); }

/* ── FAQ list ─────────────────────────────────────────────────────────── */
.faq-item {
  border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); overflow: hidden; transition: border-color .2s;
}
.faq-item.is-open { border-color: var(--primary); }
.faq-q {
  display: flex; align-items: center; gap: var(--sp-4); width: 100%;
  padding: var(--sp-5); background: none; border: 0; cursor: pointer;
  font-size: 14.5px; font-weight: 600; color: var(--text); text-align: start;
  font-family: inherit; line-height: 1.65;
}
.faq-q:hover { background: var(--surface-2); }
.faq-icon {
  flex-shrink: 0; display: inline-flex; color: var(--muted);
  transition: transform .22s var(--ease), color .22s;
}
.faq-item.is-open .faq-icon { transform: rotate(180deg); color: var(--primary); }
.faq-a {
  display: none; padding: 0 var(--sp-5) var(--sp-5);
  font-size: 13.5px; line-height: 2; color: var(--text-2);
  border-block-start: 1px solid var(--line); padding-block-start: var(--sp-4);
}
.faq-item.is-open .faq-a { display: block; }
.faq-a p { margin: 0; max-width: 74ch; }

@media (max-width: 767px) {
  .cat-block { grid-template-columns: auto 1fr; gap: var(--sp-4); padding: var(--sp-5); }
  .cat-block-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .cat-block-subs { grid-column: 1 / -1; }
}

/* ══ Hero — authoritative layout (last rule wins) ══════════════════════ */
.hero { padding-block: 0; }
.hero-inner {
  padding: clamp(34px, 4.4vw, 60px) 0 clamp(30px, 3.6vw, 48px);
  display: grid; grid-template-columns: 1.12fr .88fr;
  gap: clamp(32px, 4.5vw, 60px); align-items: center;
}
.hero-copy { max-width: 680px; }
.hero-panel { align-self: center; }
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-7); padding-block: var(--sp-8) var(--sp-7); }
  .hero-panel { order: 2; }
  .hero-copy { max-width: none; }
}

/* ══ PWA install toast — bottom-start, above the nav, clear of the FAB ══ */
.pwa-install {
  position: fixed;
  inset-block-end: 14px;
  inset-inline: auto;
  inset-inline-start: 14px;
  margin-inline: 0;
  width: auto; max-width: 320px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: pwa-slide-in .3s var(--ease);
  z-index: 95;
}
@keyframes pwa-slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.pwa-install b { display: block; font-size: 12.5px; font-weight: 700; }
.pwa-install small { display: none; }
.pwa-install .ico-wrap { width: 32px; height: 32px; flex-shrink: 0; }
@media (max-width: 767px) {
  .pwa-install {
    inset-block-end: 76px; inset-inline-start: 10px; inset-inline-end: auto;
    max-width: 270px;
  }
}

/* ══ Listing chrome — sort bar, active chips, result header ═══════════ */
.sort-bar {
  display: flex; align-items: center; gap: var(--sp-4);
  margin-block-end: var(--sp-4); padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-xs);
}
.sort-bar-label {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 12.5px; font-weight: 700; color: var(--text);
  padding-inline-end: var(--sp-4); border-inline-end: 1px solid var(--line);
}
.sort-bar .filter-chips { flex: 1; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.sort-bar .filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 5px 12px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  transition: background .15s, color .15s, border-color .15s;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.filter-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.active-filters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  margin-block-end: var(--sp-5);
}
.active-filters .badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 600;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid transparent; transition: background .15s;
}
.active-filters .badge:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.active-filters .badge svg { opacity: .7; }
.active-filters > .muted { font-size: 12px; font-weight: 600; }

/* Result counter aligned with the grid header */
.listing-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); margin-block-end: var(--sp-4); flex-wrap: wrap;
}

@media (max-width: 767px) {
  .sort-bar { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .sort-bar-label { border-inline-end: 0; padding-inline-end: 0; }
}

/* ══ Listing layout — authoritative (last rule wins) ═══════════════════ */
.listing {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
  padding-block-end: var(--sp-12);
}
.listing > .sort-bar,
.listing > .active-filters,
.listing > .listing-meta { grid-column: 1 / -1; }

/* The filter drawer: off-canvas on small screens, sticky sidebar on desktop. */
.listing > .filter-panel {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 100;
  width: min(360px, 92vw);
  max-height: none;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .28s var(--ease);
  background: var(--surface);
  border-inline-end: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  padding: var(--sp-5);
}
html[dir="rtl"] .listing > .filter-panel { transform: translateX(100%); }
.listing > .filter-panel.open { transform: translateX(0); }
.listing > .filter-panel .filter-panel-head { display: flex; }

@media (min-width: 901px) {
  .listing { grid-template-columns: 268px minmax(0, 1fr); }
  .listing > .filter-panel {
    position: sticky;
    inset: auto;
    inset-block-start: calc(var(--header-h, 64px) + 104px);
    inset-inline: auto;
    width: auto;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    transform: none !important;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    border-inline-end: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    padding: var(--sp-5);
  }
  html[dir="rtl"] .listing > .filter-panel { transform: none !important; }
  .listing > .filter-panel .filter-panel-head { display: none; }
}
@media (max-width: 900px) {
  .listing { grid-template-columns: minmax(0, 1fr); }
}

/* ══ Mobile header — authoritative (last rule wins) ═══════════════════ */
@media (max-width: 760px) {
  .topbar { display: none; }
  .navbar { display: none; }
  .navbar.open { display: block; }

  .header-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand search actions";
    align-items: center;
    gap: var(--sp-3);
    min-height: 58px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .header-main > .brand { grid-area: brand; min-width: 0; }
  .header-main > .searchbar { grid-area: search; min-width: 0; width: 100%; }
  .header-main > .header-actions { grid-area: actions; margin: 0; }

  .brand-text { min-width: 0; }
  .brand-text strong {
    display: block; font-size: 14px; line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .brand-text small { display: none; }

  .searchbar { max-width: none; width: 100%; }
  .searchbar input { min-width: 0; }

  .header-actions { gap: 4px; }
  .header-actions .btn { min-height: 38px; padding-inline: 10px; }
  .header-actions .btn span { display: none; }
  .header-actions .icon-btn { width: 38px; height: 38px; }
}

/* ══ Off-canvas drawers must not extend the scrollable area ════════════ */
/* A fixed element translated fully outside the viewport still widens the
   scroll area in RTL. Clip the root so the drawer stays off-canvas without
   creating a horizontal scrollbar. */
html { overflow-x: clip; }
body { overflow-x: clip; }

/* The compare tray sits above the drawer and must keep the viewport width. */
.compare-tray { width: 100vw; max-width: 100vw; }

/* ══ Touch targets — every interactive element at least 40px on mobile ══ */
@media (max-width: 767px) {
  .btn { min-height: 42px; padding-inline: var(--sp-4); }
  .btn-sm { min-height: 40px; padding-inline: var(--sp-4); }
  .btn-xs { min-height: 36px; }
  .filter-chip { min-height: 40px; padding-block: 8px; }
  .chip { min-height: 40px; display: inline-flex; align-items: center; }
  .card-actions .wish-btn { width: 40px; height: 40px; }
  .icon-btn { width: 40px; height: 40px; }
  .nav-link { min-height: 40px; display: inline-flex; align-items: center; }
  .product-card .card-actions .wish-btn { width: 38px; height: 38px; }
}

/* ══ Category glyphs — readable at a glance ═══════════════════════════ */
.hero-cat .cat-icon,
.cat-tile-icon,
.cat-block .cat-icon {
  color: var(--cat, var(--primary));
  background: color-mix(in srgb, var(--cat, var(--primary)) 16%, transparent);
}
.hero-cat .cat-icon svg,
.cat-tile-icon svg,
.cat-block .cat-icon svg { stroke-width: 2; }
.cat-tile-icon { background: color-mix(in srgb, var(--cat, var(--primary)) 15%, transparent); }

/* ══ Product artwork — tinted placeholder, not a white void ═════════════ */
.product-media {
  background:
    radial-gradient(120% 90% at 30% 20%,
      color-mix(in srgb, var(--primary) 9%, transparent) 0%, transparent 62%),
    var(--surface-3);
}
.product-media img {
  opacity: 0;
  transition: opacity .3s, transform .5s var(--ease);
}
.product-media img.loaded { opacity: 1; }
.product-card:hover .product-media img { transform: scale(1.045); }
