/* ==========================================================================
   Saif Noman Trading — website styles
   Tokens are the SAIF NOMAN TRADING design system (azure + steel, Chakra Petch,
   IBM Plex, 4px grid, square & chamfered). Light theme only for now.
   ========================================================================== */

:root {
  /* brand */
  --azure-50: #f0f7ff;
  --azure-100: #d7e9fe;
  --azure-200: #afd4fd;
  --azure-300: #69aefc;
  --azure-400: #2388fa;
  --azure-500: #0467d7;
  --azure-600: #0456b4;
  --azure-700: #034896;
  --azure-800: #02356e;
  --azure-900: #012146;
  /* steel */
  --steel-0: #ffffff;
  --steel-50: #f6f7f8;
  --steel-100: #eceef0;
  --steel-200: #dde1e4;
  --steel-300: #c3c9ce;
  --steel-400: #9aa3ab;
  --steel-500: #6e7880;
  --steel-600: #4e575e;
  --steel-700: #363d43;
  --steel-800: #22272b;
  --steel-900: #14171a;
  --steel-950: #0a0c0d;
  /* stock */
  --stock-in: #1b7f4b;
  --stock-in-soft: #e6f4ec;
  --stock-low: #b87400;
  --stock-low-soft: #fdf1dc;
  --stock-out: #b3261e;
  --stock-out-soft: #fbeaea;
  /* bridge body colours, sampled from the stock photos */
  --part-red: #d63a3f;
  --part-blue: #2f8ad8;

  /* semantic */
  --page: var(--steel-50);
  --card: var(--steel-0);
  --sunken: var(--steel-100);
  --ink: var(--steel-900);
  --body: var(--steel-700);
  --muted: var(--steel-500);
  --line: var(--steel-200);
  --line-strong: var(--steel-300);
  --brand: var(--azure-500);
  --brand-hover: var(--azure-600);
  --brand-press: var(--azure-700);
  --focus: var(--azure-500);

  /* type */
  --font-display: "Chakra Petch", "IBM Plex Sans", system-ui, sans-serif;
  --font-latin: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-text: var(--font-latin);
  --font-head: var(--font-display);

  /* space (4px grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --header-h: 72px;
  --cut: 18px;

  /* motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --ease-snap: cubic-bezier(.34, 1.4, .5, 1);
  --t-fast: 160ms;
  --t-mid: 260ms;
  --t-slow: 520ms;

  --shadow-raised: 0 4px 12px rgba(20, 23, 26, .10);
  --shadow-float: 0 18px 40px -12px rgba(20, 23, 26, .28);
}

html[lang="ar"] { --font-text: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; --font-head: var(--font-text); }
html[lang="ckb"] { --font-text: "Noto Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; --font-head: var(--font-text); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[dir="rtl"] body { line-height: 1.85; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--font-head); font-weight: 700; line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--azure-100); color: var(--ink); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; inset-inline-start: 16px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff; padding: 10px 16px; transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; color: #fff; }

/* eyebrow: small uppercase spec label */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); direction: ltr; unicode-bidi: isolate;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--brand); }
/* a localized eyebrow: Arabic script must never be letter-spaced or set in mono */
.eyebrow.loc { font-family: var(--font-text); letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 600; direction: inherit; }

/* ---------- buttons ---------- */
.btn {
  --btn-cut: 10px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 0;
  font-family: var(--font-text); font-size: 15px; font-weight: 600; line-height: 1;
  white-space: nowrap; text-decoration: none;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:focus-visible { outline-offset: -5px; }
.btn-primary {
  background: var(--brand); color: #fff;
  clip-path: polygon(0 0, calc(100% - var(--btn-cut)) 0, 100% var(--btn-cut), 100% 100%, 0 100%);
}
[dir="rtl"] .btn-primary { clip-path: polygon(var(--btn-cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--btn-cut)); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-primary:active { background: var(--brand-press); }
.btn-primary:focus-visible { outline-color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--steel-0); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--steel-800); color: #fff; }
.btn-light { background: #fff; color: var(--azure-700); }
.btn-light:hover { background: var(--azure-50); color: var(--azure-800); }
.btn-light:focus-visible { outline-color: var(--azure-700); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.btn-outline-light:focus-visible { outline-color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.arrow-flip { transition: transform var(--t-fast) var(--ease-out); }
[dir="rtl"] .arrow-flip { transform: scaleX(-1); }
.btn:hover .arrow-flip { transform: translateX(3px); }
[dir="rtl"] .btn:hover .arrow-flip { transform: scaleX(-1) translateX(3px); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: transparent; border: 1px solid transparent; color: var(--ink);
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.icon-btn:hover { background: var(--steel-100); }
.icon-btn svg { width: 20px; height: 20px; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--body);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.chip:hover { border-color: var(--steel-400); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .count { font-family: var(--font-mono); font-size: 12px; opacity: .7; }
.chip-mono { font-family: var(--font-mono); font-size: 13px; direction: ltr; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  font-size: 12px; font-weight: 600; line-height: 1; border-radius: 2px;
}
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.badge-in { background: var(--stock-in-soft); color: var(--stock-in); }
.badge-req { background: var(--steel-100); color: var(--steel-600); }
.badge-out { background: var(--stock-out-soft); color: var(--stock-out); }
/* colour dots: card spec line, filter chips, card chooser */
.cdots { display: inline-flex; gap: 4px; vertical-align: middle; }
.cdots i, .cdot, .pc-opts i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.cd-red { background: var(--part-red); }
.cd-blue { background: var(--part-blue); }
.chip .cdot { margin-inline-end: 6px; }

/* chamfered plate: border kept, top-end corner cut with a drawn diagonal */
.chamfer { position: relative; --under: var(--page); }
.chamfer::after {
  content: ""; position: absolute; top: -1px; inset-inline-end: -1px; width: var(--cut); height: var(--cut); pointer-events: none;
  background: linear-gradient(var(--cham-dir, to bottom left), var(--under) calc(50% - .6px), var(--line) calc(50% - .6px), var(--line) calc(50% + .6px), transparent calc(50% + .6px));
  z-index: 2;
}
[dir="rtl"] .chamfer { --cham-dir: to bottom right; }
/* drawings are always left-to-right, so their cut corner stays top-right */
[dir="rtl"] .inst.chamfer, [dir="rtl"] .drawing.chamfer { --cham-dir: to bottom left; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(246, 247, 248, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) var(--ease-out), background-color var(--t-mid) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(246, 247, 248, .94); }
.header-inner { height: 100%; display: flex; align-items: center; gap: var(--s5); }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav a {
  position: relative; display: inline-flex; align-items: center; height: 44px; padding: 0 14px;
  color: var(--steel-600); font-size: 15px; font-weight: 500;
}
.nav a::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 6px; height: 2px; background: var(--brand);
  transform: scaleX(0); transform-origin: var(--origin-start, left); transition: transform var(--t-mid) var(--ease-out);
}
[dir="rtl"] .nav a::after { --origin-start: right; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after, .nav a:hover::after { transform: scaleX(1); }
.header-tools { display: flex; align-items: center; gap: var(--s2); }
.nav + .header-tools { margin-inline-start: var(--s3); }

.lang-switch { position: relative; display: inline-block; }
.lang-cur {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 12px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .04em; cursor: pointer;
  transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
[dir="rtl"] .lang-cur { padding: 0 12px 0 10px; }
.lang-cur:hover { background: var(--steel-50); }
.lang-cur .caret { width: 14px; height: 14px; flex: none; transition: transform var(--t-fast) var(--ease-out); }
.lang-switch.open .lang-cur { border-color: var(--ink); }
.lang-switch.open .lang-cur .caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 80; min-width: 150px;
  display: none; flex-direction: column; background: var(--card); border: 1px solid var(--line-strong);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}
.lang-switch.open .lang-menu { display: flex; animation: langIn 140ms var(--ease-out) both; }
@keyframes langIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lang-menu a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px;
  color: var(--ink); font-size: 14px; white-space: nowrap;
}
.lang-menu a + a { border-top: 1px solid var(--line); }
.lang-menu a:hover { background: var(--steel-50); }
.lang-menu b { min-width: 24px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--steel-600); }

.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; background: var(--ink); color: #fff; border: 0; font-weight: 600; font-size: 14px; }
.cart-btn:hover { background: var(--steel-800); }
.cart-btn svg { width: 19px; height: 19px; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--brand); color: #fff; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
}
.cart-count.bump { animation: bump 420ms var(--ease-snap); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.menu-btn { display: none; }

/* logo lockup — always LTR */
.logo { display: inline-flex; flex-direction: column; gap: 3px; direction: ltr; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo-row { display: flex; align-items: baseline; justify-content: space-between; width: calc(var(--lf) * 6); font-family: var(--font-display); font-weight: 700; font-size: var(--lf); line-height: .82; letter-spacing: 0; }
.logo-row .sp { width: calc(var(--lf) * .26); }
.logo-row svg { width: calc(var(--lf) * .71); height: calc(var(--lf) * .71); flex: none; }
.logo-sub { font-size: 11px; color: var(--muted); font-weight: 500; line-height: 1.2; margin-top: 4px; }

/* route progress */
.route-bar { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 60; pointer-events: none; }
.route-bar i { display: block; height: 100%; background: var(--brand); transform: scaleX(0); transform-origin: var(--origin-start, left); }
[dir="rtl"] .route-bar i { --origin-start: right; }
.route-bar.run i { animation: routebar 700ms var(--ease-out) forwards; }
@keyframes routebar { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 70; background: var(--steel-950); color: #fff;
  display: flex; flex-direction: column; padding: 20px var(--gutter) 32px;
  opacity: 0; visibility: hidden; transition: opacity var(--t-mid) var(--ease-out), visibility 0s linear var(--t-mid);
}
.mobile-menu.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.mobile-menu .mm-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu .icon-btn { color: #fff; }
.mobile-menu .icon-btn:hover { background: rgba(255, 255, 255, .08); }
.mobile-menu nav { margin-top: 40px; display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 0; color: #fff;
  font-family: var(--font-head); font-size: 28px; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, .1);
  transform: translateY(12px); opacity: 0; transition: transform 420ms var(--ease-out), opacity 420ms var(--ease-out);
}
.mobile-menu.open nav a { transform: none; opacity: 1; }
.mobile-menu nav a:nth-child(2) { transition-delay: 40ms; }
.mobile-menu nav a:nth-child(3) { transition-delay: 80ms; }
.mobile-menu nav a:nth-child(4) { transition-delay: 120ms; }
.mobile-menu nav a:nth-child(5) { transition-delay: 160ms; }
.mobile-menu nav a:nth-child(6) { transition-delay: 200ms; }
.mobile-menu nav a[aria-current="page"] { color: var(--azure-300); }
.mobile-menu nav a svg { width: 22px; height: 22px; flex: none; opacity: .5; }
.mobile-menu .logo { color: #fff; }

/* ---------- main / route transitions ---------- */
main { display: block; min-height: 60vh; }
main:focus { outline: none; }
.view { animation: viewIn 520ms var(--ease-out) both; }
.view.leaving { animation: viewOut 160ms var(--ease-in) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes viewOut { to { opacity: 0; transform: translateY(-6px); } }

/* scroll reveal — animation with backwards fill so hover transforms keep working after it ends */
[data-reveal] { opacity: 0; }
[data-reveal].is-in { opacity: 1; animation: revealIn 720ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
[data-reveal="fade"].is-in { animation-name: fadeIn; }
@keyframes revealIn { from { opacity: 0; transform: translateY(18px); } }
@keyframes fadeIn { from { opacity: 0; } }

/* headline line mask */
.line-mask { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line-mask > span { display: block; transform: translateY(105%); animation: lineUp 900ms var(--ease-out) forwards; animation-delay: calc(120ms + var(--i, 0) * 90ms); }
@keyframes lineUp { to { transform: none; } }

/* ---------- section scaffolding ---------- */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 760px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 44px); }
html[lang="en"] .section-head h2, html[lang="en"] .page-head h1, html[lang="en"] .about-title { text-transform: uppercase; letter-spacing: .01em; }
.section-head p { font-size: 17px; color: var(--steel-600); max-width: 64ch; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; max-width: none; }
.section-head-row > div { display: grid; gap: 14px; max-width: 760px; }
.bg-white { background: var(--steel-0); }
.bg-white .chamfer { --under: var(--steel-0); }

.grid-bg {
  background-image:
    linear-gradient(to right, rgba(20, 23, 26, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 23, 26, .045) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(24px, 3vw, 40px) clamp(40px, 5vw, 72px); }
.hero-slab {
  position: absolute; top: 0; inset-inline-end: 0; width: 46%; height: 86%;
  background: var(--brand);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 110px 100%, 0 calc(100% - 110px));
}
[dir="rtl"] .hero-slab { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 110px), calc(100% - 110px) 100%, 0 100%); }
.hero-slab svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5.3fr) minmax(0, 6.7fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: calc(100svh - var(--header-h) - 120px); }
.hero-copy { display: grid; gap: 24px; align-content: center; padding-block: 24px; }
.hero-title { font-size: clamp(34px, 4.3vw, 64px); line-height: 1.12; letter-spacing: -.005em; }
.hero-title .line-mask { text-wrap: balance; }
html[lang="ckb"] .hero-title { font-size: clamp(30px, 3.5vw, 52px); line-height: 1.3; }
html[lang="en"] .hero-title { font-family: var(--font-display); text-transform: uppercase; line-height: .98; letter-spacing: .005em; }
.hero-title .accent { color: var(--brand); }
.hero-lead { font-size: clamp(16px, 1.3vw, 19px); color: var(--steel-600); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-meta span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); direction: ltr; }
.hero-meta b { color: var(--ink); font-weight: 600; }
.hero-inst { position: relative; }
@media (min-width: 1025px) { .hero .inst { --under: var(--brand); } }

/* ---------- instrument (select by cross-section) ---------- */
.inst {
  --under: var(--page);
  --cut: 28px;
  position: relative; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
  direction: ltr;
}
.inst.chamfer::after { z-index: 5; }
.inst-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.inst-bar .live { display: inline-flex; align-items: center; gap: 8px; color: var(--azure-700); padding-inline-end: 18px; }
.inst-bar .live::before { content: ""; width: 7px; height: 7px; background: var(--brand); box-shadow: 0 0 0 4px var(--azure-100); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px var(--azure-100); } 50% { box-shadow: 0 0 0 7px rgba(215, 233, 254, .35); } }

.inst-stage {
  --mm: 5px;
  position: relative; height: clamp(250px, 30vw, 380px); overflow: hidden;
  background-color: #fff;
  background-image:
    linear-gradient(to right, var(--steel-200) 1px, transparent 1px),
    linear-gradient(to bottom, var(--steel-200) 1px, transparent 1px),
    linear-gradient(to right, var(--steel-100) 1px, transparent 1px),
    linear-gradient(to bottom, var(--steel-100) 1px, transparent 1px);
  background-size: calc(var(--mm) * 10) calc(var(--mm) * 10), calc(var(--mm) * 10) calc(var(--mm) * 10), calc(var(--mm) * 5) calc(var(--mm) * 5), calc(var(--mm) * 5) calc(var(--mm) * 5);
  background-position: var(--gx, 0) var(--gy, 0);
}
.inst-model { position: absolute; top: 16px; left: 20px; z-index: 3; display: grid; gap: 2px; pointer-events: none; }
.inst-model .code { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 2.6vw, 38px); line-height: 1; color: var(--ink); letter-spacing: .01em; }
.inst-model .name { font-family: var(--font-text); font-size: 13px; color: var(--muted); }
.inst-scale { position: absolute; top: 20px; right: 20px; z-index: 3; display: grid; justify-items: end; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.inst-scale b { font-weight: 600; color: var(--azure-700); }
.inst-scale i { display: block; height: 8px; border: 1.5px solid var(--ink); border-top: 0; width: calc(var(--mm) * 10); transition: width var(--t-slow) var(--ease-out); }
.inst-fig { position: absolute; inset: 0; }
.inst-fig img {
  position: absolute; left: 0; top: 0; mix-blend-mode: multiply; user-select: none; -webkit-user-drag: none;
  opacity: 0; transform: translateY(-22px);
  transition: opacity 240ms var(--ease-in), transform 240ms var(--ease-in);
}
.inst-fig img.on { opacity: 1; transform: none; transition: opacity 360ms var(--ease-out) 140ms, transform 560ms var(--ease-snap) 140ms; }
.inst-datum { position: absolute; left: 0; right: 0; height: 12px; z-index: 1; border-top: 1.5px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--steel-400) 0 1px, transparent 1px 7px); opacity: .9; }
.inst-snap { position: absolute; height: 3px; background: var(--brand); z-index: 2; transform-origin: center; transform: scaleX(0); }
.inst-snap.go { animation: snapline 700ms var(--ease-out) 380ms; }
@keyframes snapline { 0% { transform: scaleX(0); opacity: 1; } 45% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.inst-dims { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: visible; }
.inst-dims .dl { stroke: var(--brand); stroke-width: 1; fill: none; }
.inst-dims .ext { stroke: var(--azure-300); stroke-width: 1; }
.inst-dims .ah { fill: var(--brand); }
.inst-dims .draw { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); animation: draw 620ms var(--ease-out) forwards; animation-delay: var(--d, 300ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.inst-dims .pop { opacity: 0; animation: pop 300ms var(--ease-out) forwards; animation-delay: var(--d, 700ms); }
@keyframes pop { to { opacity: 1; } }
.inst-dims text { font-family: var(--font-mono); font-size: 12px; font-weight: 600; fill: var(--azure-700); }
.inst-dims .tbg { fill: #fff; }

.inst-read { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.inst-read > div { padding: 14px 18px; display: grid; gap: 2px; }
.inst-read > div + div { border-left: 1px solid var(--line); }
.inst-read .v { font-family: var(--font-mono); font-size: clamp(20px, 2vw, 28px); font-weight: 600; color: var(--ink); line-height: 1.15; font-feature-settings: "tnum" 1; white-space: nowrap; }
.inst-read .v small { font-size: .5em; font-weight: 500; color: var(--muted); margin-left: 4px; }
.inst-read .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.inst-models { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--steel-50); min-height: 64px; }
.inst-models .lbl { font-family: var(--font-text); font-size: 13px; color: var(--muted); }
.inst-models .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.inst-models .chip { min-height: 36px; font-family: var(--font-mono); font-size: 13px; }
.inst-models .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; font-family: var(--font-text); min-height: 36px; }
.inst-models .go svg { width: 16px; height: 16px; }

.inst-sel { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.inst-sel button {
  position: relative; z-index: 1; height: 58px; border: 0; background: transparent; color: var(--steel-600);
  font-family: var(--font-mono); font-size: 17px; font-weight: 600; display: grid; place-items: center; line-height: 1.1;
  transition: color var(--t-mid) var(--ease-out);
}
.inst-sel button small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .1em; color: inherit; opacity: .7; }
.inst-sel button + button { border-left: 1px solid var(--line); }
.inst-sel button:hover { color: var(--ink); background: var(--steel-50); }
.inst-sel button[aria-checked="true"] { color: #fff; background: transparent; }
.inst-sel button:focus-visible { outline-offset: -4px; }
.inst-sel button[aria-checked="true"]:focus-visible { outline-color: #fff; }
.inst-sel .ind { position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% / 6); background: var(--brand); transition: transform 460ms var(--ease-snap); z-index: 0; }
.inst-sel .ind::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: var(--azure-800); }

/* ---------- features band ---------- */
.feat-band { background: var(--azure-900); color: #fff; }
.feat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feat { padding: 36px 28px 36px 0; display: grid; gap: 10px; align-content: start; }
.feat + .feat { padding-inline-start: 28px; border-inline-start: 1px solid rgba(255, 255, 255, .12); }
.feat:first-child { padding-inline-start: 0; }
.feat svg { width: 30px; height: 30px; color: var(--azure-300); }
.feat h3 { color: #fff; font-size: 17px; font-family: var(--font-text); font-weight: 700; margin-top: 6px; }
.feat p { color: var(--azure-100); font-size: 14px; line-height: 1.7; opacity: .9; }

/* ---------- line-up (true-scale, pinned horizontal) ---------- */
.lineup { position: relative; background: var(--steel-50); }
.lineup-sticky { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); overflow: hidden; display: flex; flex-direction: column; }
.lineup-head { padding-top: clamp(32px, 5vh, 64px); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.lineup-head > div { display: grid; gap: 12px; max-width: 700px; }
.lineup-head h2 { font-size: clamp(28px, 3.4vw, 44px); }
html[lang="en"] .lineup-head h2 { text-transform: uppercase; }
.lineup-head p { color: var(--steel-600); }
.lineup-meter { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .1em; direction: ltr; display: flex; align-items: center; gap: 12px; }
.lineup-meter .bar { width: 160px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.lineup-meter .bar i { position: absolute; inset: 0; background: var(--brand); transform-origin: left; transform: scaleX(var(--p, 0)); }
.lineup-viewport { position: relative; flex: 1; display: flex; align-items: flex-end; min-height: 0; direction: ltr; }
.lineup-track {
  --mm: 6px;
  position: relative; display: flex; align-items: flex-end; gap: calc(var(--mm) * 14); flex: none; width: max-content;
  padding-inline: var(--gutter) 30vw; padding-bottom: 96px; will-change: transform; direction: ltr;
}
.lineup-track::after {
  /* ruler: minor tick every 10 mm, major every 50 mm */
  content: ""; position: absolute; left: 0; right: 0; bottom: 78px; height: 18px; border-top: 1.5px solid var(--ink);
  background:
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px calc(var(--mm) * 50)) top left / 100% 12px no-repeat,
    repeating-linear-gradient(to right, var(--steel-400) 0 1px, transparent 1px calc(var(--mm) * 10)) top left / 100% 7px no-repeat;
  background-position: var(--gutter) 0, var(--gutter) 0;
}
/* multiply needs a painted backdrop inside the same stacking context */
.lu-item { position: relative; flex: none; display: block; color: var(--ink); background: var(--steel-50); }
.lu-item img { mix-blend-mode: multiply; transition: transform 420ms var(--ease-snap); user-select: none; -webkit-user-drag: none; }
.lu-item:hover img, .lu-item:focus-visible img { transform: translateY(-14px); }
.lu-item .lu-label { position: absolute; top: calc(100% + 30px); left: 0; display: grid; gap: 2px; white-space: nowrap; }
.lu-item .lu-code { font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--ink); }
.lu-item .lu-spec { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.lu-item:hover .lu-code { color: var(--brand); }
.lu-item .lu-dim {
  position: absolute; bottom: calc(100% + 4px); left: 0; right: 0; height: 18px; opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out);
  border-left: 1px solid var(--brand); border-right: 1px solid var(--brand); display: grid; place-items: center;
}
.lu-item .lu-dim::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--brand); }
.lu-item .lu-dim span { position: relative; background: var(--steel-50); padding: 0 6px; font-family: var(--font-mono); font-size: 11px; color: var(--azure-700); font-weight: 600; }
.lu-item:hover .lu-dim, .lu-item:focus-visible .lu-dim { opacity: 1; transform: translateY(-14px); }
.lineup.is-static .lineup-sticky { position: relative; top: 0; height: auto; }
.lineup.is-static .lineup-viewport { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); padding-top: 48px; }
.lineup.is-static .lineup-track { padding-inline-end: var(--gutter); }
.lineup.is-static .lu-item { scroll-snap-align: start; }
.lineup.is-static .lu-spec { display: none; }
.lineup.is-static .lineup-meter { display: none; }

/* ---------- category tiles ---------- */
.range-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.range-tile {
  display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--line); color: var(--ink);
  transition: border-color var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out);
}
.range-tile:hover { color: var(--ink); border-color: var(--steel-400); transform: translateY(-4px); box-shadow: var(--shadow-raised); }
.range-tile .media { aspect-ratio: 4 / 3; background: var(--sunken); overflow: hidden; }
.range-tile .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--ease-out); }
.range-tile .media.mul img { mix-blend-mode: multiply; object-fit: contain; padding: 6%; }
.range-tile:hover .media img { transform: scale(1.05); }
.range-tile .body { padding: 20px; display: grid; gap: 6px; align-content: start; }
.range-tile .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.range-tile h3 { font-size: 20px; font-family: var(--font-head); }
html[lang="en"] .range-tile h3 { font-family: var(--font-display); text-transform: uppercase; }
.range-tile .n { font-size: 13px; color: var(--muted); white-space: nowrap; font-feature-settings: "tnum" 1; }
.range-tile p { font-size: 14px; color: var(--steel-600); line-height: 1.6; }
.range-tile .more { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: 14px; }
.range-tile .more svg { width: 16px; height: 16px; }

/* ---------- product cards ---------- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.p-card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  transition: border-color var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out);
}
.p-card:hover { border-color: var(--steel-400); box-shadow: var(--shadow-raised); }
.p-card[hidden] { display: none; }
.p-link { position: absolute; inset: 0; z-index: 1; }
.p-link:focus-visible { outline-offset: -3px; }
.p-media { position: relative; aspect-ratio: 1 / 1; background: var(--sunken); overflow: hidden; perspective: 900px; }
.p-media .tilt { position: absolute; inset: 0; background: var(--sunken); transition: transform 500ms var(--ease-out); transform-style: preserve-3d; }
.p-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: opacity 420ms var(--ease-out), transform 700ms var(--ease-out); }
.p-media.photo img { object-fit: cover; mix-blend-mode: normal; }
.p-media img.alt { opacity: 0; transform: scale(1.04); }
.p-card:hover .p-media img.main { opacity: 0; transform: scale(.97); }
.p-card:hover .p-media img.alt { opacity: 1; transform: none; }
.p-media::after {
  content: ""; position: absolute; inset: -10% 0; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, transparent 44%, rgba(4, 103, 215, .10) 49%, rgba(35, 136, 250, .55) 50%, transparent 51%);
  transform: translateY(-60%);
}
.p-card:hover .p-media::after { animation: scan 900ms var(--ease-out); }
@keyframes scan { 0% { opacity: 1; transform: translateY(-60%); } 100% { opacity: 0; transform: translateY(60%); } }
.p-media .badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3; }
/* marks a picture that is an illustration, not a photo of the actual part */
.tag-illus { position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 3; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; background: rgba(20, 23, 26, .78); color: #fff; font-size: 11px; font-weight: 600; pointer-events: none; }
.g-main .tag-illus { top: 12px; bottom: auto; inset-inline-start: auto; inset-inline-end: 12px; height: 26px; font-size: 12px; }
.g-note.g-illus { color: var(--stock-low); font-weight: 600; }
.p-add {
  position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--ink); color: #fff; border: 0;
  transition: background-color var(--t-fast) var(--ease-out), transform var(--t-mid) var(--ease-snap), opacity var(--t-mid) var(--ease-out);
}
.p-add svg { width: 20px; height: 20px; }
.p-add:hover { background: var(--brand); }
.p-add.done { background: var(--stock-in); }
@media (hover: hover) {
  .p-add { opacity: 0; transform: translateY(8px); }
  .p-card:hover .p-add, .p-add:focus-visible { opacity: 1; transform: none; }
}
.p-body { padding: 16px 18px 18px; display: grid; gap: 4px; }
.p-code { font-family: var(--font-display); font-size: 21px; font-weight: 700; color: var(--ink); line-height: 1.15; direction: ltr; text-align: start; unicode-bidi: plaintext; letter-spacing: .01em; }
.p-name { font-size: 14px; color: var(--steel-600); line-height: 1.5; }
.p-spec { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12.5px; color: var(--steel-700); direction: ltr; text-align: start; unicode-bidi: plaintext; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.p-spec span { white-space: nowrap; }
[dir="rtl"] .p-spec { justify-content: flex-end; }
.p-spec b { color: var(--ink); font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); direction: ltr; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; direction: ltr; text-align: left; }
.spec-table th, .spec-table td { padding: 12px 16px; border-bottom: 1px solid #dde1e4; vertical-align: middle; }
.spec-table thead th { background: var(--brand); color: #fff; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; border-bottom: 0; }
.spec-table thead th + th { border-left: 1px solid #2e7bdd; }
.spec-table tbody tr:nth-child(even) { background: var(--steel-50); }
.spec-table tbody tr { transition: background-color var(--t-fast) var(--ease-out); }
.spec-table tbody tr:hover { background: var(--azure-50); }
.spec-table td { font-family: var(--font-mono); color: var(--ink); font-feature-settings: "tnum" 1; }
.spec-table td.k { font-family: var(--font-latin); color: var(--steel-600); font-size: 14px; }
.spec-table td.k { white-space: nowrap; }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table .models { display: flex; gap: 6px; flex-wrap: wrap; }
.spec-table .models a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; background: var(--azure-50); color: var(--azure-700); font-size: 13px; font-weight: 600; border: 1px solid var(--azure-100); transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.spec-table .models a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.spec-table.nowrap td, .spec-table.nowrap th { white-space: nowrap; }
.spec-table .hl, .matrix td.hl-cell { color: var(--stock-low); font-weight: 600; }

/* comparison matrix */
.matrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.matrix th, .matrix td { padding: 11px 16px; border-bottom: 1px solid #dde1e4; white-space: nowrap; text-align: left; }
.matrix thead th { position: sticky; top: 0; background: var(--steel-900); color: #fff; font-family: var(--font-mono); font-size: 13px; font-weight: 600; z-index: 2; }
.matrix thead th a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.matrix thead th a:hover { color: var(--azure-300); }
.matrix th.rowh { position: sticky; left: 0; z-index: 1; background: var(--card); font-family: var(--font-latin); font-weight: 500; color: var(--steel-600); font-size: 13.5px; border-right: 1px solid var(--line); }
.matrix thead th.rowh { z-index: 3; background: var(--steel-900); color: var(--steel-400); }
.matrix td { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); }
.matrix tr.grp th, .matrix tr.grp td { background: var(--steel-50); font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; padding-block: 8px; }
.matrix td.col-hl, .matrix th.col-hl { background: var(--azure-50); }
.matrix thead th.col-hl { background: var(--brand); }

/* ---------- page head (inner pages) ---------- */
.page-head { position: relative; padding-block: clamp(36px, 5vw, 64px) clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head .container { position: relative; display: grid; gap: 14px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 58px); max-width: 22ch; }
html[lang="en"] .page-head h1 { font-family: var(--font-display); }
.page-head p { font-size: 17px; color: var(--steel-600); max-width: 62ch; }
.page-head .corner { position: absolute; top: 0; inset-inline-end: 0; width: 160px; height: 100%; pointer-events: none; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs svg { width: 12px; height: 12px; opacity: .6; }
[dir="rtl"] .crumbs svg { transform: scaleX(-1); }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- products page ---------- */
.toolbar { position: sticky; top: var(--header-h); z-index: 20; background: rgba(246, 247, 248, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.toolbar .container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 14px; }
.tb-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tb-row::-webkit-scrollbar { display: none; }
.tb-row .lbl { font-size: 12px; color: var(--muted); font-weight: 600; margin-inline-end: 4px; white-space: nowrap; }
.tb-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search svg { position: absolute; top: 50%; inset-inline-start: 14px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 44px; padding-inline: 44px 14px; background: var(--card); border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 14px; }
.search input::placeholder { font-family: var(--font-text); color: var(--steel-400); }
.search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--azure-100); }
.results-n { margin-inline-start: auto; font-size: 14px; color: var(--muted); font-feature-settings: "tnum" 1; }
.tb-sub { display: flex; gap: 12px 20px; flex-wrap: wrap; }
/* each filter row scrolls on its own instead of widening the page */
.tb-sub > .tb-row { min-width: 0; max-width: 100%; }
.tb-sub[hidden] { display: none; }
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 72px 16px; border: 1px dashed var(--line-strong); background: var(--card); }
.empty[hidden] { display: none; }
.empty svg { width: 40px; height: 40px; color: var(--steel-400); }
.empty h3 { font-size: 20px; }
.empty p { color: var(--steel-600); }

/* ---------- product detail ---------- */
.pd { padding-block: clamp(24px, 3vw, 40px) clamp(48px, 6vw, 80px); }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.gallery { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 12px; }
.g-main { position: relative; aspect-ratio: 1 / 1; background: var(--sunken); border: 1px solid var(--line); overflow: hidden; cursor: zoom-in; }
.g-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: opacity 360ms var(--ease-out), transform 360ms var(--ease-out); }
.g-main.photo img { mix-blend-mode: normal; object-fit: cover; }
.g-main img.out { opacity: 0; transform: scale(.98); }
.g-main.zooming img.cur { transition: transform 120ms linear; transform: scale(2.1); }
.g-main .g-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); color: var(--ink); opacity: 0; transition: opacity var(--t-mid) var(--ease-out); }
.g-main:hover .g-nav, .g-main .g-nav:focus-visible { opacity: 1; }
.g-main .g-nav svg { width: 18px; height: 18px; }
.g-main .g-prev { inset-inline-start: 12px; }
.g-main .g-next { inset-inline-end: 12px; }
[dir="rtl"] .g-main .g-nav svg { transform: scaleX(-1); }
.g-count { position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 3; font-family: var(--font-mono); font-size: 12px; background: rgba(255, 255, 255, .92); padding: 4px 8px; color: var(--steel-700); direction: ltr; }
.g-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.g-thumbs button { position: relative; aspect-ratio: 1 / 1; padding: 0; background: var(--sunken); border: 1px solid var(--line); overflow: hidden; }
.g-thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.g-thumbs.photo img { object-fit: cover; mix-blend-mode: normal; }
.g-thumbs button::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--brand); opacity: 0; transition: opacity var(--t-fast) var(--ease-out); }
.g-thumbs button[aria-current="true"]::after { opacity: 1; }
/* which colour a photo shows */
.g-thumbs button[data-col]::before { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px; z-index: 1; background: var(--part-red); }
.g-thumbs button[data-col="blue"]::before { background: var(--part-blue); }
.g-thumbs button:hover { border-color: var(--steel-400); }
.g-note { font-size: 13px; color: var(--muted); line-height: 1.6; }

.pd-info { display: grid; gap: 22px; }
.pd-cat { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-code { font-family: var(--font-display); font-size: clamp(40px, 5vw, 68px); font-weight: 700; line-height: .95; color: var(--ink); direction: ltr; text-align: start; unicode-bidi: plaintext; letter-spacing: .01em; word-break: break-word; }
.pd-name { font-size: clamp(18px, 1.6vw, 22px); color: var(--steel-700); font-weight: 500; line-height: 1.5; }
.pd-desc { color: var(--steel-600); font-size: 16px; display: grid; gap: 10px; max-width: 60ch; }
.pd-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--card); direction: ltr; }
.pd-keys > div { padding: 14px 16px; display: grid; gap: 2px; }
.pd-keys > div + div { border-left: 1px solid var(--line); }
.pd-keys .v { font-family: var(--font-mono); font-weight: 600; font-size: clamp(20px, 2vw, 26px); color: var(--ink); white-space: nowrap; }
.pd-keys .v small { font-size: .55em; color: var(--muted); margin-left: 3px; font-weight: 500; }
.pd-keys .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.pd-buy { display: grid; gap: 14px; padding: 20px; background: var(--card); border: 1px solid var(--line); }
.pd-buy .price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pd-buy .price b { font-size: 18px; color: var(--ink); }
.pd-buy .price span { font-size: 13px; color: var(--muted); }
.pd-buy .row { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-buy .row .btn-primary { flex: 1 1 200px; }
.pd-buy .note { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pd-out { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--stock-out-soft); border: 1px solid #f1c9c6; color: var(--stock-out); font-size: 14px; font-weight: 500; line-height: 1.6; }
.pd-out svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.pd-sibs { display: grid; gap: 8px; }
.pd-sibs .lbl { font-size: 14px; font-weight: 600; }
.pd-sibs .row { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-sibs a { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 44px; padding: 0 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-family: var(--font-mono); font-size: 15px; font-weight: 600; text-decoration: none; transition: border-color var(--t-fast) var(--ease-out); }
.pd-sibs a:hover { border-color: var(--ink); }
.pd-sibs a[aria-current="page"] { border-color: var(--brand); background: var(--azure-50); color: var(--azure-700); box-shadow: inset 0 0 0 1px var(--brand); }
.pd-buy .price.has b { font-family: var(--font-display); font-size: 26px; color: var(--ink); }
.pd-buy .price.has b .num { font-size: inherit; color: inherit; direction: ltr; unicode-bidi: isolate; }
.pd-buy .price.has b small { font-family: var(--font-text); font-size: 15px; font-weight: 600; color: var(--steel-600); }
.p-price { margin: 6px 0 0; font-size: 13.5px; color: var(--steel-600); }
.p-price b { font-family: var(--font-mono); font-size: 15px; color: var(--ink); }
.p-price small { font-size: 12px; color: var(--muted); }
.p-stock { margin: 4px 0 0; font-size: 13px; color: var(--steel-600); }
.p-stock b { font-weight: 600; color: var(--stock-in); }
.pd-avail { margin: -4px 0 0; font-size: 14px; color: var(--steel-600); }
.pd-avail b { font-weight: 600; color: var(--stock-in); }
/* order status as the admin sets it */
.ost { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ost-new { background: var(--azure-50); color: var(--azure-700); box-shadow: inset 0 0 0 1px var(--azure-200); }
.ost-confirmed { background: var(--azure-500); color: #fff; }
.ost-preparing { background: var(--stock-low-soft); color: var(--stock-low); }
.ost-delivering { background: var(--steel-800); color: #fff; }
.ost-delivered { background: var(--stock-in-soft); color: var(--stock-in); }
.ost-cancelled { background: var(--stock-out-soft); color: var(--stock-out); }
.iv-top .ost { margin-inline-start: 6px; }
.sent-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.send-alt .lbl { width: 100%; font-size: 13px; color: var(--muted); }
.pd-pack { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--steel-50); border: 1px solid var(--line); font-size: 14px; color: var(--steel-700); }
.pd-pack svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
.pd-pack b { color: var(--ink); }
.pd-pack .badge { margin-inline-start: auto; }
.qty-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: -6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.qty-label .pcs { font-weight: 500; color: var(--azure-700); font-feature-settings: "tnum" 1; }

.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); background: var(--card); height: 48px; direction: ltr; }
.qty button { width: 44px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; }
.qty button:hover { background: var(--steel-100); }
.qty button svg { width: 16px; height: 16px; }
.qty input { width: 64px; border: 0; border-inline: 1px solid var(--line); text-align: center; font-family: var(--font-mono); font-size: 15px; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; background: var(--azure-50); }
.qty-sm { height: 36px; }
.qty-sm button { width: 34px; }
.qty-sm input { width: 50px; font-size: 13px; }

.pd-section { padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.pd-section h2 { font-size: clamp(22px, 2.2vw, 30px); margin-bottom: 20px; }
html[lang="en"] .pd-section h2 { font-family: var(--font-display); text-transform: uppercase; }
.pd-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.pd-small { font-size: 13.5px; color: var(--muted); margin-top: 12px; line-height: 1.7; }

/* specifications page */
.specs-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 5vw, 64px); }
.specs-inst { width: 100%; max-width: 1000px; margin-inline: auto; }

/* dimension drawing (product page) */
.drawing { --cut: 22px; background: var(--card); border: 1px solid var(--line); direction: ltr; }
.drawing .inst-stage { height: clamp(260px, 26vw, 340px); }
.drawing .dims-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.drawing .dims-legend > div { padding: 12px 16px; display: grid; gap: 2px; }
.drawing .dims-legend > div + div { border-left: 1px solid var(--line); }
.drawing .dims-legend .v { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--ink); }
.drawing .dims-legend .k { font-size: 12px; color: var(--muted); font-family: var(--font-text); }

/* accessory cards */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.acc { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); transition: border-color var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out); }
a.acc:hover { color: var(--ink); border-color: var(--steel-400); transform: translateY(-2px); }
.acc .thumb { width: 76px; height: 76px; background: var(--sunken); display: grid; place-items: center; overflow: hidden; }
.acc .thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.acc .thumb.photo img { object-fit: cover; mix-blend-mode: normal; }
.acc .thumb svg { width: 40px; height: 40px; color: var(--steel-400); }
.acc .t { font-size: 12px; color: var(--muted); font-weight: 600; }
.acc .c { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ink); direction: ltr; text-align: start; unicode-bidi: plaintext; word-break: break-word; }
.acc .n { font-size: 12.5px; color: var(--steel-600); line-height: 1.5; margin-top: 2px; }
.acc .badge { margin-top: 6px; height: 20px; font-size: 11px; }

.fits { display: flex; flex-wrap: wrap; gap: 8px; }
.fits a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-family: var(--font-mono); font-weight: 600; font-size: 14px; transition: border-color var(--t-fast) var(--ease-out); }
[dir="rtl"] .fits a { padding: 8px 8px 8px 14px; }
.fits a:hover { border-color: var(--brand); color: var(--brand); }
.fits img { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--line); }

/* ---------- about ---------- */
.about-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.about-title { font-size: clamp(32px, 4.2vw, 56px); }
html[lang="en"] .about-title { font-family: var(--font-display); }
.about-lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--steel-600); line-height: 1.8; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pillar { padding: 28px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.pillar .ix { width: 36px; height: 36px; color: var(--brand); }
.pillar h3 { font-size: 20px; }
.pillar p { color: var(--steel-600); font-size: 15px; line-height: 1.8; }
/* 1px gaps on a line-coloured ground draw the dividers, whatever the wrap */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.facts > div { padding: 24px 28px; display: grid; gap: 6px; background: var(--card); }
.teaser .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts .k { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.facts .k svg { width: 18px; height: 18px; color: var(--brand); }
.facts .v { font-size: clamp(18px, 1.8vw, 24px); color: var(--ink); font-weight: 700; font-family: var(--font-head); }
.sister { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 32px; background: var(--azure-50); border: 1px solid var(--azure-100); --under: var(--steel-0); }
.sister .chamfer-line { --line: var(--azure-100); }
.sister .mk { font-family: var(--font-mono); font-weight: 600; font-size: 13px; letter-spacing: .16em; color: var(--azure-700); direction: ltr; line-height: 1.6; }
.sister p { color: var(--steel-700); font-size: 16px; line-height: 1.8; }
.cat-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cat-dl a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out); }
.cat-dl a:hover { border-color: var(--brand); color: var(--brand); }
.cat-dl a small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .08em; margin-top: 2px; }
.cat-dl svg { width: 20px; height: 20px; flex: none; }

/* home about teaser */
.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.teaser h2 { font-size: clamp(28px, 3.2vw, 44px); }
.teaser .body { display: grid; gap: 24px; }
.teaser .body p { font-size: 17px; line-height: 1.85; color: var(--steel-600); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; background: var(--brand); color: #fff; overflow: hidden; }
.cta-band .container { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 32px; align-items: center; padding-block: clamp(48px, 6vw, 80px); }
.cta-band h2 { color: #fff; font-size: clamp(24px, 2.8vw, 38px); max-width: 26ch; }
.cta-band p { color: var(--azure-100); margin-top: 12px; max-width: 56ch; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band svg.deco { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.c-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.c-card { display: grid; gap: 6px; align-content: start; padding: 20px; background: var(--card); border: 1px solid var(--line); color: var(--ink); min-height: 112px; transition: border-color var(--t-fast) var(--ease-out); }
a.c-card:hover { border-color: var(--brand); color: var(--ink); }
.c-card .k { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.c-card .k svg { width: 18px; height: 18px; color: var(--brand); }
.c-card .v { font-size: 16px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.c-card .v.ltr { font-family: var(--font-mono); font-size: 15px; }
[dir="rtl"] .c-card .v.ltr, [dir="rtl"] .c-card .sub { text-align: right; }
.c-card .sub { font-family: var(--font-mono); font-size: 12px; color: var(--muted); direction: ltr; text-align: start; unicode-bidi: plaintext; }
.c-card.wide { grid-column: 1 / -1; }

.form { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); background: var(--card); border: 1px solid var(--line); }
.form h2 { font-size: 22px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--muted); font-size: 13px; }
.field label .req { color: var(--brand); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; background: var(--steel-0); border: 1px solid var(--line-strong); border-radius: 0; font-size: 16px; color: var(--ink);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--azure-100); }
.field input[type="tel"] { direction: ltr; text-align: start; font-family: var(--font-mono); }
[dir="rtl"] .field input[type="tel"] { text-align: right; }
.field .err { font-size: 13px; color: #b3261e; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #b3261e; }
.field.invalid .err { display: block; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-note { font-size: 13px; color: var(--muted); line-height: 1.6; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.form-actions .btn-primary { flex: 1 1 220px; }

/* ---------- order ---------- */
.order-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.o-list { background: var(--card); border: 1px solid var(--line); }
.o-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.o-item:last-child { border-bottom: 0; }
.o-item .thumb { width: 72px; height: 72px; background: var(--sunken); overflow: hidden; }
.o-item .thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.o-item .thumb.photo img { object-fit: cover; mix-blend-mode: normal; }
.o-item .c { font-family: var(--font-mono); font-weight: 600; color: var(--ink); direction: ltr; text-align: start; unicode-bidi: plaintext; }
.o-item .c a { color: inherit; }
.o-item .c .vr { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-inline-start: 6px; background: var(--azure-50); color: var(--azure-700); border: 1px solid var(--azure-100); font-family: var(--font-text); font-size: 12px; font-weight: 600; vertical-align: middle; unicode-bidi: isolate; }
.o-item .c a:hover { color: var(--brand); }
.o-item .n { font-size: 13px; color: var(--steel-600); line-height: 1.5; }
.o-item .pk { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; font-feature-settings: "tnum" 1; }
.o-item .pk b { color: var(--azure-700); font-weight: 600; }
.o-item .ctrl { display: flex; align-items: center; gap: 6px; }
.o-item .rm { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.o-item .rm:hover { color: #b3261e; background: #fbe9e7; }
.o-item .rm svg { width: 17px; height: 17px; }
.o-item.leaving { animation: itemOut 240ms var(--ease-in) forwards; }
@keyframes itemOut { to { opacity: 0; transform: translateX(var(--dx, 24px)); } }
.o-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--steel-50); border-top: 1px solid var(--line); font-size: 14px; }
.o-foot b { color: var(--ink); font-feature-settings: "tnum" 1; }
.o-empty { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 56px 20px; }
.o-empty svg { width: 44px; height: 44px; color: var(--steel-400); }
.o-empty h3 { font-size: 20px; }
.o-empty p { color: var(--steel-600); max-width: 40ch; }
.link-btn { background: none; border: 0; padding: 0; color: var(--steel-600); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.link-btn:hover { color: #b3261e; }
.sent { display: grid; gap: 10px; padding: 20px; background: var(--stock-in-soft); border: 1px solid #bfe0cc; color: var(--stock-in); }
.sent[hidden] { display: none; }
.sent b { font-size: 16px; }
.sent p { color: var(--steel-700); font-size: 14px; }

/* drawer */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(10, 12, 13, .5); opacity: 0; visibility: hidden; transition: opacity var(--t-mid) var(--ease-out), visibility 0s linear var(--t-mid); }
.scrim.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 90; width: min(440px, 100vw);
  background: var(--steel-50); display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(10, 12, 13, .18);
  transform: translateX(104%); visibility: hidden;
  transition: transform 420ms var(--ease-out), visibility 0s linear 420ms;
}
[dir="rtl"] .drawer { transform: translateX(-104%); box-shadow: 20px 0 50px rgba(10, 12, 13, .18); }
.drawer.open { transform: none; visibility: visible; transition: transform 420ms var(--ease-out), visibility 0s; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.drawer-head h2 { font-size: 20px; display: flex; align-items: baseline; gap: 10px; }
.drawer-head h2 span { font-family: var(--font-text); font-size: 13px; color: var(--muted); font-weight: 500; }
.drawer-head h2 span.mono { font-family: var(--font-mono); color: var(--azure-700); font-weight: 600; }
.drawer-foot .btn-ghost svg { width: 18px; height: 18px; }
.drawer-body { flex: 1; overflow-y: auto; }
.drawer-body .o-list { border: 0; border-bottom: 1px solid var(--line); }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: var(--card); display: grid; gap: 12px; }
.drawer-foot .sum { display: flex; justify-content: space-between; font-size: 14px; color: var(--steel-600); }
.drawer-foot .sum b { color: var(--ink); font-feature-settings: "tnum" 1; }
.drawer-foot .note { font-size: 12.5px; color: var(--muted); }

/* fly-to-cart ghost */
.fly { position: fixed; z-index: 200; pointer-events: none; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-float); }
.fly img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* toast */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 150; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; background: var(--steel-950); color: #fff; box-shadow: var(--shadow-float); font-size: 14px; animation: toastIn 360ms var(--ease-snap); }
[dir="rtl"] .toast { padding: 12px 16px 12px 12px; }
.toast svg { width: 18px; height: 18px; color: #6fd39c; flex: none; }
.toast span { flex: 1; }
.toast button { background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: #fff; min-height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.toast button:hover { border-color: #fff; }
.toast.out { animation: toastOut 200ms var(--ease-in) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- footer ---------- */
.site-footer { background: var(--steel-950); color: var(--steel-400); padding-block: clamp(48px, 6vw, 80px) 28px; }
.site-footer a { color: var(--steel-300); }
.site-footer a:hover { color: #fff; }
.f-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.f-brand { display: grid; gap: 16px; align-content: start; }
.f-brand .logo { color: #fff; justify-self: start; }
.f-brand .logo svg path { fill: var(--azure-400); }
.f-brand p { font-size: 14px; line-height: 1.8; max-width: 36ch; }
.f-col h3 { color: #fff; font-size: 13px; font-family: var(--font-mono); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
html[lang="ar"] .f-col h3, html[lang="ckb"] .f-col h3 { font-family: var(--font-text); letter-spacing: 0; font-size: 15px; }
.f-col ul { display: grid; gap: 8px; font-size: 14px; }
.f-col .ltr { font-family: var(--font-mono); font-size: 13px; }
.f-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.f-bottom .mono { direction: ltr; letter-spacing: .08em; }

/* social icons (footer, mobile menu, contact card) */
.social, .f-col .social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.soc-ic {
  width: 44px; height: 44px; display: grid; place-items: center; color: var(--steel-300);
  border: 1px solid rgba(255, 255, 255, .18);
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.soc-ic svg { width: 21px; height: 21px; }
.site-footer .soc-ic:hover, .mobile-menu .soc-ic:hover { color: #fff; border-color: transparent; }
.site-footer .soc-whatsapp:hover, .mobile-menu .soc-whatsapp:hover, .soc-row .soc-whatsapp { background: #128c7e; }
.site-footer .soc-instagram:hover, .mobile-menu .soc-instagram:hover, .soc-row .soc-instagram { background: #c13584; }
.site-footer .soc-facebook:hover, .mobile-menu .soc-facebook:hover, .soc-row .soc-facebook { background: #1877f2; }

.c-social { gap: 12px; }
.c-social .soc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.soc-row { display: flex; align-items: center; gap: 14px; padding: 10px; background: var(--steel-50); border: 1px solid var(--line); color: var(--ink); transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out); }
.soc-row:hover { color: var(--ink); border-color: var(--ink); background: var(--steel-0); }
.soc-row .soc-ic { flex: none; border: 0; color: #fff; }
.soc-row .txt { display: grid; gap: 1px; min-width: 0; }
.soc-row b { font-size: 15px; font-weight: 700; }
.soc-row small { font-family: var(--font-mono); font-size: 13px; color: var(--steel-600); direction: ltr; text-align: start; unicode-bidi: plaintext; overflow-wrap: anywhere; }
[dir="rtl"] .soc-row small { text-align: right; }
.soc-row svg.go { width: 16px; height: 16px; margin-inline-start: auto; color: var(--muted); flex: none; }

/* marker numbering — product page */
.variants { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.variants legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.variants .req { color: var(--brand); }
.v-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.v-opt {
  position: relative; min-height: 56px; padding: 8px; display: grid; place-items: center; align-content: center; gap: 6px;
  background: var(--steel-0); border: 1px solid var(--line-strong); color: var(--ink);
  font-family: var(--font-mono); font-size: 15px; font-weight: 600; direction: ltr;
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.v-opt.v-blank { font-family: var(--font-text); font-size: 13px; direction: inherit; }
.v-opt.v-col { font-family: var(--font-text); font-size: 14px; direction: inherit; }
.v-opt .sw.sw-red, .v-opt .sw.sw-blue { width: 32px; height: 12px; border: 0; background-image: none; }
.v-opt .sw.sw-red { background-color: var(--part-red); }
.v-opt .sw.sw-blue { background-color: var(--part-blue); }
.v-opt .sw { display: block; width: 44px; height: 12px; background: #fff; border: 1px solid var(--steel-300); background-image: repeating-linear-gradient(to right, transparent 0 8px, var(--steel-300) 8px 9px); }
.v-opt:hover { border-color: var(--ink); }
/* a type that has run out: visible but not selectable */
.v-opt[disabled] { cursor: not-allowed; background: var(--steel-50); color: var(--muted); border-style: dashed; }
.v-opt[disabled]:hover { border-color: var(--line-strong); }
.v-opt[disabled] span { text-decoration: line-through; }
.v-opt .v-out { font-style: normal; font-family: var(--font-text); font-size: 11px; font-weight: 600; color: var(--stock-out); }
.v-opt .v-n { font-style: normal; font-family: var(--font-text); font-size: 11px; font-weight: 600; color: var(--stock-in); }
.pc-opts button[disabled] { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.pc-opts button[disabled]:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); }
.pc-opts button em { display: block; font-style: normal; font-family: var(--font-text); font-size: 10.5px; text-decoration: none; }
.v-opt[aria-checked="true"] { border-color: var(--brand); background: var(--azure-50); color: var(--azure-700); box-shadow: inset 0 0 0 1px var(--brand); }
.v-opt[aria-checked="true"]::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; width: 14px; height: 14px; background: var(--brand); clip-path: polygon(0 0, 100% 0, 100% 100%); }
[dir="rtl"] .v-opt[aria-checked="true"]::after { clip-path: polygon(0 0, 100% 0, 0 100%); }
.v-opt:focus-visible { outline-offset: 2px; }
.variants .err { font-size: 13px; color: #b3261e; }
.variants .err:empty { display: none; }
.variants.invalid .v-opt { border-color: #b3261e; }
.variants.shake .v-opts { animation: shake 380ms var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* marker numbering — quick chooser on a product card */
.p-choose {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: grid; gap: 10px; padding: 12px;
  background: rgba(20, 23, 26, .95); color: #fff; transform: translateY(102%); transition: transform 320ms var(--ease-out);
}
.p-choose.open { transform: none; }
.p-choose[hidden] { display: none; }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
.pc-x { width: 36px; height: 36px; display: grid; place-items: center; background: transparent; border: 0; color: #fff; }
.pc-x:hover { background: rgba(255, 255, 255, .1); }
.pc-x svg { width: 16px; height: 16px; }
.pc-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pc-opts button { min-height: 44px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-family: var(--font-mono); font-size: 14px; font-weight: 600; direction: ltr; transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out); }
.pc-opts button.is-blank { font-family: var(--font-text); font-size: 13px; direction: inherit; }
.pc-opts button.is-col { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-text); font-size: 14px; direction: inherit; }
.pc-opts button:hover { background: var(--brand); border-color: var(--brand); }
.pc-opts button:focus-visible, .pc-x:focus-visible { outline-color: #fff; outline-offset: -3px; }

/* ---------- 404 ---------- */
.nf { padding-block: 120px; display: grid; justify-items: start; gap: 18px; }
.nf .code { font-family: var(--font-display); font-size: clamp(80px, 12vw, 160px); line-height: .9; color: var(--azure-100); font-weight: 700; direction: ltr; }
.nf h1 { font-size: clamp(26px, 3vw, 40px); }
.nf p { color: var(--steel-600); }

/* ==========================================================================
   Invoice page
   ========================================================================== */
.inv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.inv-pick { display: inline-flex; align-items: center; gap: 10px; }
.inv-pick span { font-size: 13px; font-weight: 600; color: var(--muted); }
.inv-pick select { min-height: 42px; min-width: 280px; max-width: 100%; padding: 0 12px; background: var(--card); border: 1px solid var(--line-strong); font-size: 14px; color: var(--ink); }
.inv-pick select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--azure-100); }
.inv-status { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; font-size: 12px; font-weight: 700; }
.inv-status.draft { background: var(--stock-low-soft); color: var(--stock-low); }
.inv-status.sent { background: var(--stock-in-soft); color: var(--stock-in); }
.inv-bar .spacer { flex: 1; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 28px; background: var(--card); border: 1px solid var(--line); }
.steps li { position: relative; display: flex; align-items: center; min-height: 58px; color: var(--muted); font-weight: 600; font-size: 15px; }
.steps li + li { border-inline-start: 1px solid var(--line); }
.steps .st-in { display: flex; align-items: center; gap: 12px; padding: 12px 18px; width: 100%; height: 100%; color: inherit; }
a.st-in:hover { background: var(--steel-50); color: var(--ink); }
.steps .d { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1.5px solid currentColor; font-family: var(--font-mono); font-size: 13px; }
.steps .d svg { width: 16px; height: 16px; }
.steps li.done { color: var(--ink); }
.steps li.done .d { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps li.cur { color: var(--brand); }
.steps li.cur .d { background: var(--brand); border-color: var(--brand); color: #fff; }
.steps li.cur::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); }

.inv-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.inv-side { display: grid; gap: 16px; }
.inv-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.inv-actions .btn-primary { flex: 1 1 240px; }
.inv-locked { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--stock-in-soft); border: 1px solid #bfe0cc; color: var(--steel-700); font-size: 14px; line-height: 1.6; }
.inv-locked svg { width: 18px; height: 18px; flex: none; color: var(--stock-in); margin-top: 3px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; min-height: 40px; }
.link-more svg { width: 16px; height: 16px; }
.inv-preview { position: sticky; top: calc(var(--header-h) + 20px); padding: 20px; background: var(--steel-200); background-image: linear-gradient(to right, rgba(20, 23, 26, .05) 1px, transparent 1px), linear-gradient(to bottom, rgba(20, 23, 26, .05) 1px, transparent 1px); background-size: 20px 20px; }
.inv-preview-a5 { max-width: 560px; justify-self: center; width: 100%; }
.doc-view { position: relative; width: 100%; overflow: hidden; }
.doc-scale { position: absolute; top: 0; left: 0; display: grid; gap: 24px; transform-origin: 0 0; }
.doc-view .doc { box-shadow: 0 1px 2px rgba(20, 23, 26, .10), 0 24px 48px -24px rgba(20, 23, 26, .45); }
.doc-stage { position: fixed; top: 0; left: -14000px; pointer-events: none; }
.inv-guard { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 64px 20px; background: var(--card); border: 1px dashed var(--line-strong); }
.inv-guard svg { width: 42px; height: 42px; color: var(--steel-400); }
.inv-guard p { font-size: 16px; color: var(--steel-700); max-width: 48ch; }

/* step 3 */
.send-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.file-card { display: grid; gap: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); }
.file-card .fthumb { padding: 14px; background: var(--steel-100); }
.file-card[data-file="a5"] .fthumb { padding: 14px 28px; }
.fmeta { display: grid; gap: 4px; }
.fmeta b { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.fmeta > span { font-size: 13px; color: var(--muted); }
.fmeta .st { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 600; color: var(--azure-700); }
.fmeta .st svg { width: 16px; height: 16px; }
.fmeta .st.ok { color: var(--stock-in); }
.send-box { display: grid; gap: 14px; padding: clamp(20px, 3vw, 32px); background: var(--card); border: 1px solid var(--line); position: sticky; top: calc(var(--header-h) + 20px); }
.send-box h2 { font-size: 24px; }
html[lang="en"] .send-box h2 { font-family: var(--font-display); text-transform: uppercase; }
.send-box > p { color: var(--steel-600); }
.btn-wa { min-height: 56px; font-size: 16px; background: #128c7e; }
.btn-wa:hover { background: #0e7065; }
.btn-wa svg { width: 22px; height: 22px; }
.send-alt { display: flex; flex-wrap: wrap; gap: 8px; }
.send-alt .btn { flex: 1 1 180px; }
/* page opened from a WhatsApp invoice link */
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.doc-no { display: inline-block; font-family: var(--font-mono); font-size: .62em; font-weight: 600; color: var(--azure-700); white-space: nowrap; direction: ltr; unicode-bidi: isolate; vertical-align: middle; }
.doc-sum { margin-inline-start: auto; font-size: 14px; color: var(--steel-600); font-feature-settings: "tnum" 1; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.doc-grid .inv-preview { position: relative; top: 0; }
@media (max-width: 900px) { .doc-grid { grid-template-columns: 1fr; } }
.send-box .hint { font-size: 14px; color: var(--steel-700); line-height: 1.7; padding: 12px 14px; background: var(--azure-50); border: 1px solid var(--azure-100); }
.wa-to { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.wa-to b { color: var(--ink); font-size: 14px; }
.wa-to .link-btn { color: var(--brand); text-decoration: none; font-weight: 600; min-height: 36px; }
.send-err { color: #b3261e; font-size: 14px; }
.send-err[hidden] { display: none; }
.send-err .link-btn { color: #b3261e; min-height: auto; }
.spin { width: 14px; height: 14px; flex: none; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn .spin { width: 16px; height: 16px; }

/* ==========================================================================
   Printed documents — fixed paper sizes in CSS px at 96 dpi
   A4 = 794 × 1123, A5 = 559 × 794. Never responsive.
   ========================================================================== */
.doc { position: relative; width: 794px; height: 1123px; overflow: hidden; background: #fff; color: #14171a; font-family: var(--font-text); font-size: 12.5px; line-height: 1.55; text-align: start; }
.doc *, .doc *::before, .doc *::after { box-sizing: border-box; }
.doc.a5 { width: 559px; height: 794px; font-size: 11.5px; }
.doc .ltr { direction: ltr; unicode-bidi: isolate; }
.doc .mono { font-family: var(--font-mono); }
.doc::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: #0467d7; z-index: 1; }
.doc-in { position: absolute; top: 0; left: 0; right: 0; bottom: 64px; padding: 42px 44px 0; display: flex; flex-direction: column; }
.doc.a5 .doc-in { bottom: 46px; padding: 30px 32px 0; }

.d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1.5px solid #14171a; }
.d-brand { display: grid; gap: 14px; justify-items: start; }
.d-brand .logo { color: #14171a; }
.d-co { display: grid; gap: 1px; font-size: 11px; line-height: 1.55; color: #4e575e; }
.d-co b { font-size: 12.5px; color: #14171a; font-weight: 700; }
.d-title { display: grid; justify-items: end; gap: 2px; text-align: end; }
.d-kicker { font-family: var(--font-display); font-size: 11.5px; font-weight: 700; letter-spacing: .2em; color: #0467d7; direction: ltr; }
.d-title h1 { margin: 0; font-family: var(--font-head); font-size: 32px; line-height: 1.2; color: #14171a; }
.doc[lang="en"] .d-title h1 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.doc[lang="en"] .d-kicker { display: none; }
.d-no { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: #034896; direction: ltr; }
.d-head.compact { padding-bottom: 12px; align-items: center; }
.d-head.compact .d-title h1 { font-size: 17px; }
.d-head.compact .d-kicker { display: none; }
.doc.a5 .d-head { padding-bottom: 14px; }
.doc.a5 .d-title h1 { font-size: 21px; }
.doc.a5 .d-kicker { font-size: 9.5px; }
.doc.a5 .d-no { font-size: 11.5px; }

.d-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; background: #f6f7f8; border: 1px solid #dde1e4; }
.d-meta.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.d-meta > div { display: grid; gap: 2px; min-width: 0; padding: 10px 14px; }
.d-meta > div + div { border-inline-start: 1px solid #dde1e4; }
.d-meta span { font-size: 10.5px; font-weight: 600; color: #6e7880; }
.d-meta b { font-size: 12.5px; font-weight: 600; color: #14171a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc[dir="rtl"] .d-meta b.ltr { text-align: right; }

.d-table { width: 100%; margin-top: 20px; border-collapse: collapse; table-layout: fixed; }
.d-table .c-n { width: 36px; }
.d-table .c-pack { width: 82px; }
.d-table .c-qty { width: 82px; }
.d-table .c-pcs { width: 66px; }
.d-table .c-price { width: 74px; }
.d-table .c-amt { width: 76px; }
.d-table thead th { height: 36px; padding: 0 10px; background: #0467d7; color: #fff; font-size: 11px; font-weight: 600; text-align: start; white-space: nowrap; }
.d-table thead th + th { border-inline-start: 1px solid #2e7bdd; }
.d-table th.num, .d-table td.num { text-align: end; }
.d-table tbody tr { height: 54px; }
.d-table tbody td { padding: 6px 10px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; border-bottom: 1px solid #dde1e4; }
.d-table tbody tr:nth-child(even) td { background: #f6f7f8; }
.d-table td.n { font-family: var(--font-mono); font-size: 11px; color: #6e7880; }
.d-table td.num { font-family: var(--font-mono); }
.d-table td.q { font-weight: 600; }
.itw { display: flex; align-items: center; gap: 10px; min-width: 0; }
.itw .th { width: 40px; height: 40px; flex: none; overflow: hidden; background: #fff; border: 1px solid #dde1e4; }
.itw .th img { width: 100%; height: 100%; object-fit: cover; }
.itw .tx { display: grid; min-width: 0; gap: 1px; }
.itw .l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.itw b { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: #14171a; direction: ltr; }
.itw em { padding: 0 6px; font-style: normal; font-size: 10px; font-weight: 600; line-height: 16px; color: #034896; background: #f0f7ff; border: 1px solid #d7e9fe; }
.itw small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: #6e7880; }
.d-empty { margin-top: 40px; padding: 28px; text-align: center; color: #6e7880; border: 1px dashed #c3c9ce; }

.d-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 26px; align-items: start; margin-top: 24px; }
.d-notes h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 12.5px; color: #14171a; }
.d-notes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; font-size: 10.5px; line-height: 1.6; color: #4e575e; }
.d-notes li { position: relative; padding-inline-start: 13px; }
.d-notes li::before { content: ""; position: absolute; top: .62em; inset-inline-start: 0; width: 5px; height: 5px; background: #0467d7; }
.d-totals { border: 1px solid #dde1e4; }
.d-totals > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 12px; }
.d-totals > div + div { border-top: 1px solid #dde1e4; }
.d-totals span { color: #4e575e; }
.d-totals b { font-family: var(--font-mono); font-weight: 600; color: #14171a; }
.d-totals .grand { background: #14171a; padding: 11px 12px; }
.d-totals .grand span { color: #c3c9ce; font-weight: 600; }
.d-totals .grand b { color: #fff; font-family: var(--font-text); font-size: 12px; }
.d-totals .grand b.mono { font-family: var(--font-mono); font-size: 14px; }

.d-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 44px; overflow: hidden; background: #0467d7; color: #fff; font-size: 11px; }
.d-foot::before { content: ""; position: absolute; top: 0; left: 0; width: 64px; height: 64px; background: #034896; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.d-foot::after { content: ""; position: absolute; top: 0; right: 150px; width: 44px; height: 44px; background: #2388fa; clip-path: polygon(0 0, 100% 0, 0 100%); }
.doc[dir="rtl"] .d-foot::before { left: auto; right: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.doc[dir="rtl"] .d-foot::after { right: auto; left: 150px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.d-foot > span { position: relative; z-index: 1; }
.d-foot .mono { font-family: var(--font-mono); letter-spacing: .04em; direction: ltr; }
.doc.a5 .d-foot { height: 46px; padding: 0 32px; font-size: 9.5px; }
.doc.a5 .d-foot::before { width: 46px; height: 46px; }
.doc.a5 .d-foot::after { width: 30px; height: 30px; right: 110px; }
.doc.a5[dir="rtl"] .d-foot::after { right: auto; left: 110px; }

/* A5 customer sheet */
.i-fields { display: grid; gap: 14px; margin-top: 20px; }
.i-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.i-row { display: grid; gap: 3px; min-width: 0; }
.i-row span { font-size: 10px; font-weight: 600; color: #6e7880; }
.i-row b { min-height: 28px; padding-bottom: 6px; border-bottom: 1px solid #c3c9ce; font-size: 14px; font-weight: 600; color: #14171a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc[dir="rtl"] .i-row b .ltr { display: inline-block; }
.i-row.i-notes b { min-height: 92px; max-height: 92px; padding: 8px 10px; border: 1px solid #c3c9ce; font-size: 12px; font-weight: 400; line-height: 1.6; white-space: pre-wrap; }
.i-sum { display: grid; gap: 3px; margin-top: 18px; padding: 12px 14px; background: #f0f7ff; border: 1px solid #d7e9fe; }
.i-sum span { font-size: 10px; font-weight: 600; color: #034896; }
.i-sum b { font-size: 12.5px; color: #14171a; }
.i-sum small { font-size: 10px; color: #4e575e; }

@media (max-width: 1024px) {
  .inv-grid, .send-grid { grid-template-columns: 1fr; }
  .inv-preview, .send-box { position: relative; top: 0; }
}
@media (max-width: 720px) {
  .steps .st-in { padding: 10px; gap: 8px; flex-direction: column; text-align: center; }
  .steps .sl { font-size: 12px; line-height: 1.3; }
  .inv-pick { width: 100%; }
  .inv-pick select { min-width: 0; flex: 1; }
  .inv-preview { padding: 10px; }
  .files { grid-template-columns: 1fr 1fr; gap: 10px; }
  .file-card { padding: 10px; }
  .file-card .fthumb { padding: 8px; }
}

/* ==========================================================================
   Invoices list
   ========================================================================== */
.iv-tools { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.iv-filters { display: grid; grid-template-columns: repeat(4, minmax(104px, 1fr)); background: var(--card); border: 1px solid var(--line); }
.iv-f { position: relative; display: grid; gap: 2px; justify-items: start; padding: 12px 18px; background: transparent; border: 0; color: var(--steel-600); text-align: start; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.iv-f + .iv-f { border-inline-start: 1px solid var(--line); }
.iv-f b { font-family: var(--font-mono); font-size: 24px; font-weight: 600; line-height: 1.1; color: var(--ink); }
.iv-f span { font-size: 13px; font-weight: 600; }
.iv-f::before { content: ""; position: absolute; top: 12px; inset-inline-end: 14px; width: 8px; height: 8px; background: var(--steel-300); }
.iv-f-current::before { background: var(--brand); }
.iv-f-pending::before { background: var(--stock-low); }
.iv-f-sent::before { background: var(--stock-in); }
.iv-f:hover { background: var(--steel-50); color: var(--ink); }
.iv-f[aria-pressed="true"] { background: var(--ink); color: #fff; }
.iv-f[aria-pressed="true"] b { color: #fff; }
.iv-f[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); }
.iv-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 320px; justify-content: flex-end; }
.iv-right .search { flex: 1 1 260px; max-width: 380px; }
.iv-list { display: grid; gap: 12px; }
.iv-card { display: grid; grid-template-columns: 116px minmax(0, 1fr) 190px; gap: 22px; align-items: start; padding: 16px; background: var(--card); border: 1px solid var(--line); transition: border-color var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out); }
.iv-card:hover { border-color: var(--steel-400); box-shadow: var(--shadow-raised); }
.iv-card[hidden] { display: none; }
.iv-card[data-state="current"] { border-inline-start: 3px solid var(--brand); }
.iv-thumb { display: block; width: 116px; padding: 6px; background: var(--steel-100); border: 1px solid var(--line); transition: transform var(--t-mid) var(--ease-out), border-color var(--t-mid) var(--ease-out); }
.iv-thumb:hover { transform: translateY(-3px); border-color: var(--brand); }
.iv-thumb .doc { box-shadow: 0 1px 3px rgba(20, 23, 26, .2); }
.iv-main { display: grid; gap: 6px; min-width: 0; }
.iv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.iv-top h3 { font-family: var(--font-mono); font-size: 19px; font-weight: 600; color: var(--ink); direction: ltr; }
.iv-date { font-size: 13px; color: var(--muted); }
.iv-st { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; font-size: 12px; font-weight: 700; }
.iv-st.current { background: var(--azure-50); color: var(--azure-700); border: 1px solid var(--azure-100); }
.iv-st.pending { background: var(--stock-low-soft); color: var(--stock-low); }
.iv-st.sent { background: var(--stock-in-soft); color: var(--stock-in); }
.iv-who { font-size: 15px; font-weight: 600; color: var(--ink); }
.iv-who .muted { font-weight: 400; color: var(--muted); font-size: 14px; }
.iv-sum { font-size: 14px; color: var(--steel-600); font-feature-settings: "tnum" 1; }
.iv-prog { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
.iv-prog li { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.iv-prog i { width: 18px; height: 18px; display: grid; place-items: center; border: 1.5px solid var(--steel-300); }
.iv-prog i svg { width: 12px; height: 12px; }
.iv-prog li.ok { color: var(--ink); }
.iv-prog li.ok i { background: var(--stock-in); border-color: var(--stock-in); color: #fff; }
.iv-sub { font-size: 13px; font-weight: 600; color: var(--stock-low); }
.iv-sub.current { color: var(--azure-700); }
.iv-sub.sent { color: var(--stock-in); font-weight: 500; }
.iv-actions { display: grid; gap: 8px; }
.iv-actions .btn { justify-content: flex-start; }
.iv-actions .btn-primary { justify-content: space-between; }
.iv-lnk { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--steel-600); text-decoration: none; font-weight: 600; font-size: 13px; }
.iv-lnk svg { width: 16px; height: 16px; }
.iv-lnk:hover { color: var(--brand); }
.iv-del:hover { color: #b3261e; }
.iv-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.iv-note svg { width: 18px; height: 18px; flex: none; color: var(--steel-400); margin-top: 3px; }

/* file viewer */
.viewer { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px; }
.vw-box { display: flex; flex-direction: column; width: min(980px, 100%); max-height: calc(100vh - 48px); background: var(--steel-50); box-shadow: 0 30px 80px -20px rgba(10, 12, 13, .6); animation: vwIn 320ms var(--ease-out); }
.viewer.out .vw-box { animation: vwOut 180ms var(--ease-in) forwards; }
@keyframes vwIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes vwOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
.vw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.vw-title { display: grid; gap: 0; margin-inline-end: auto; }
.vw-kick { font-size: 12px; font-weight: 600; color: var(--muted); }
.vw-title h2 { font-family: var(--font-mono); font-size: 18px; font-weight: 600; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.vw-tabs { display: inline-flex; border: 1px solid var(--line-strong); }
.vw-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; background: var(--card); border: 0; color: var(--steel-600); font-size: 13.5px; font-weight: 600; }
.vw-tabs button + button { border-inline-start: 1px solid var(--line); }
.vw-tabs button svg { width: 17px; height: 17px; }
.vw-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.vw-actions { display: flex; align-items: center; gap: 8px; }
.vw-body { flex: 1; overflow: auto; padding: 24px; background: var(--steel-200); background-image: linear-gradient(to right, rgba(20, 23, 26, .05) 1px, transparent 1px), linear-gradient(to bottom, rgba(20, 23, 26, .05) 1px, transparent 1px); background-size: 20px 20px; }
.vw-paper { margin: 0 auto; max-width: 820px; }
.vw-paper[data-k="a5"] { max-width: 560px; }

@media (max-width: 900px) {
  .iv-card { grid-template-columns: 96px minmax(0, 1fr); }
  .iv-thumb { width: 96px; }
  .iv-actions { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; }
  .iv-actions .btn { justify-content: center; }
}
@media (max-width: 720px) {
  .iv-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .iv-f { padding: 10px; }
  .iv-f b { font-size: 20px; }
  .iv-f span { font-size: 12px; }
  .iv-f::before { top: 10px; inset-inline-end: 8px; }
  .iv-right .search { max-width: none; }
  .iv-card { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 12px; }
  .iv-thumb { width: 72px; padding: 4px; }
  .iv-top h3 { font-size: 16px; }
  .iv-actions { grid-template-columns: 1fr 1fr; }
  .iv-actions .btn-primary { grid-column: 1 / -1; }
  .viewer { padding: 0; }
  .vw-box { max-height: 100vh; height: 100%; }
  .vw-body { padding: 12px; }
  .vw-tabs { order: 3; width: 100%; }
  .vw-tabs button { flex: 1; justify-content: center; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .range-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav a { padding: 0 10px; font-size: 14px; }
  .inst-read { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inst-read > div:nth-child(3) { border-left: 0; }
  .inst-read > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 1024px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .header-tools, .nav + .header-tools { margin-inline-start: auto; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-slab { width: 100%; height: 40%; top: auto; bottom: 0; clip-path: polygon(0 80px, 80px 0, 100% 0, 100% 100%, 0 100%); }
  [dir="rtl"] .hero-slab { clip-path: polygon(0 0, calc(100% - 80px) 0, 100% 80px, 100% 100%, 0 100%); }
  .hero-inst { padding-bottom: 8px; }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .feat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .12); }
  .range-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pd-grid, .pd-two, .teaser, .about-hero, .contact-grid, .order-grid { grid-template-columns: 1fr; }
  .gallery { position: relative; top: 0; }
  .f-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-brand { grid-column: 1 / -1; }
  .cta-band .container { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .header-inner { gap: var(--s3); }
  .header-tools { gap: 6px; }
  .lang-cur { padding: 0 8px 0 10px; gap: 4px; font-size: 12px; }
  [dir="rtl"] .lang-cur { padding: 0 10px 0 8px; }
  .cart-btn { padding: 0 10px; gap: 6px; }
  .cart-btn .lbl { display: none; }
  .hero-title { font-size: clamp(34px, 10vw, 48px); }
  .inst-bar .live { display: none; }
  .inst-read .v { font-size: 20px; }
  .inst-read > div { padding: 12px 14px; }
  .inst-sel button { height: 52px; font-size: 15px; }
  .inst-models .go { margin-left: 0; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat, .feat + .feat { padding: 24px 0; border-inline-start: 0; }
  .feat + .feat { border-top: 1px solid rgba(255, 255, 255, .12); }
  .range-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .range-tile .top { flex-wrap: wrap; row-gap: 2px; }
  .range-tile .body { padding: 14px; }
  .range-tile h3 { font-size: 16px; }
  .range-tile p { display: none; }
  .p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-body { padding: 12px; }
  .p-code { font-size: 17px; }
  .p-name { font-size: 13px; }
  .p-spec { font-size: 11.5px; }
  .pillars, .facts, .cat-dl { grid-template-columns: 1fr; }
  .sister { grid-template-columns: 1fr; gap: 12px; padding: 24px; }
  .c-cards, .field-row { grid-template-columns: 1fr; }
  .c-social .soc-list { grid-template-columns: 1fr; }
  .pd-keys .v { font-size: 18px; }
  .pd-keys > div { padding: 12px; }
  .o-item { grid-template-columns: 56px minmax(0, 1fr); }
  .o-item .thumb { width: 56px; height: 56px; }
  .o-item .ctrl { grid-column: 2; }
  .f-grid { grid-template-columns: 1fr; }
  .lineup-meter { display: none; }
}
@media (hover: none) {
  .g-main .g-nav { opacity: 1; }
  .g-main { cursor: default; }
}

@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .header-tools { gap: 4px; }
  .lang-cur { padding: 0 6px 0 8px; font-size: 11px; }
  [dir="rtl"] .lang-cur { padding: 0 8px 0 6px; }
  .cart-btn { padding: 0 8px; gap: 5px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; }
  .line-mask > span { transform: none; }
  .inst-dims .draw { stroke-dashoffset: 0; }
  .inst-dims .pop { opacity: 1; }
}
