/* =====================================================
   RADIUS — laojääkide e-pood · STIILID
   Design tokens → komponendid → lehe sektsioonid
   ===================================================== */

:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --ink: #052846;
  --ink-2: #5c5a52;
  --line: #e4e2db;
  --accent: #A6CE00;            /* ResQ lime */
  --accent-text: #5F7D00;       /* tume lime tekstile - WCAG AA kontrast heledal taustal */
  --accent-ink: #052846;        /* lime taustal on tekst tume, nagu brändiraamatus */
  --brand-navy: #24356B;        /* ResQ sõnamärgi navi */
  --ok: #5F7D00;               /* "laos / õnnestus" tekst: lime tume toon */
  --ok-bg: #f1f6d9;            /* lime hele taust */
  --radius: 14px;
  --font-display: "Poppins", "Sora", system-ui, sans-serif; /* ResQ brändifont */
  --font-body: "Manrope", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 1px 2px rgba(22,21,15,.05), 0 8px 32px rgba(22,21,15,.07);
  --shadow-lg: 0 4px 12px rgba(22,21,15,.08), 0 24px 64px rgba(22,21,15,.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ---------- Ligipääsetavus ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  padding: .7rem 1.2rem;
  background: var(--ink); color: var(--bg);
  border-radius: 0 0 10px 10px; font-weight: 600; font-size: .9rem;
  transition: top .15s;
}
.skip-link:focus { top: 0; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.noscript-note {
  padding: 1rem 1.5rem; background: #fdecec; color: #b42318;
  font-weight: 600; text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3 { font-family: var(--font-display); letter-spacing: -.025em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Nupud ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.5rem; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; letter-spacing: .005em;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--ink); font-weight: 700; }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(166,206,0,.45); transform: translateY(-1px); }
.btn-ghost { border: 1.5px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1rem;
  transition: background .15s;
}
.icon-btn:hover { background: var(--line); }

/* ---------- Päis ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem max(1.5rem, calc(50% - 640px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: padding .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { padding-top: .55rem; padding-bottom: .55rem; box-shadow: 0 4px 24px rgba(22,21,15,.09); }
/* Kerimisel: logo väiksemaks, et päis oleks kitsam */
.site-header.is-scrolled .brand-logo { height: 34px; }
.site-header.is-scrolled .brand-tagline { display: none; }
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; }
.brand-logo { height: 54px; width: auto; display: block; transition: height .2s ease; }
.brand-tagline {
  font-family: var(--font-display); font-weight: 600;
  font-size: .55rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brand-navy); margin-top: .32rem; white-space: nowrap;
}
@media (max-width: 760px) { .brand-logo, .site-header.is-scrolled .brand-logo { height: 24px; }
  .brand-tagline { font-size: .5rem; letter-spacing: .1em; } }
@media (max-width: 380px) { .brand-tagline { display: none; } }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; color: var(--brand-navy); }
.brand-word .rq { color: var(--brand-navy); }
.footer .brand-word { color: #fff; }
.footer .brand-word .rq { color: var(--accent); }
.brand-sub { font-size: .6rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .22em; margin-top: .3rem; }

.header-nav { display: flex; gap: 1.3rem; }
.header-nav a { position: relative; font-size: .9rem; font-weight: 600; color: var(--ink-2); padding: .35rem 0; }
.header-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); transition: right .2s ease;
}
.header-nav a:hover { color: var(--ink); }
.header-nav a:hover::after { right: 0; }
@media (max-width: 760px) { .header-nav { display: none; } }
/* Tahvel: päis kahel real - logo+menüü+korv üleval, otsing täislaiuses all */
@media (min-width: 761px) and (max-width: 1023px) {
  .site-header { flex-wrap: wrap; row-gap: .6rem; }
  .search { order: 5; min-width: 100%; max-width: none; }
  .header-nav { gap: 1rem; }
  .header-nav a { font-size: .86rem; }
  .filters { top: 118px; }
}

.search {
  position: relative;
  flex: 1; max-width: 560px;
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}

/* ---------- Otsingusoovitused ---------- */
.search-suggest {
  position: absolute; top: calc(100% + 10px); left: -2px; right: -2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden auto; max-height: 430px;
  z-index: 70;
  animation: sugIn .18s ease;
}
@keyframes sugIn { from { opacity: 0; transform: translateY(-6px); } }
.sug-group {
  padding: .5rem 1rem .3rem;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-2);
}
.sug-group:not(:first-child) { border-top: 1px solid var(--line); margin-top: .2rem; }
.sug-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem 1rem; cursor: pointer;
}
.sug-item:hover, .sug-item.is-active { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.sug-item .shape { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.sug-item .shape i { width: 17px; height: 17px; }
.sug-item .shape.flat i { height: 8px; }
.sug-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sug-main strong { font-size: .87rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-main small { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-2); }
.sug-price { font-family: var(--font-mono); font-size: .8rem; white-space: nowrap; }
.sug-price small { color: var(--ink-2); }
.sug-tag {
  font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: .2rem .55rem; border-radius: 999px;
  background: var(--ink); color: var(--bg);
}
mark {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: inherit; border-radius: 3px; padding: 0 1px;
}
.search:focus-within { border-color: var(--ink); box-shadow: var(--shadow); }
.search svg { width: 17px; height: 17px; color: var(--ink-2); flex-shrink: 0; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: .92rem; }
.search kbd {
  font-family: var(--font-mono); font-size: .7rem;
  padding: .1rem .45rem; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2);
}

.header-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.lang-switch { display: flex; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-btn { padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.lang-btn.is-active { background: var(--ink); color: var(--bg); }

.cart-btn {
  position: relative;
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem 1.1rem;
  background: var(--ink); color: var(--bg); border-radius: 999px;
  font-weight: 600; font-size: .9rem;
  transition: transform .15s;
}
.cart-btn:hover { transform: translateY(-1px); }
.cart-btn svg { width: 19px; height: 19px; }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 21px; height: 21px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 999px; font-size: .72rem; font-weight: 700;
}
.cart-badge.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.45); } }

/* ---------- Kangelane ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 8vw, 7rem) 1.5rem clamp(3rem, 6vw, 5.5rem);
}
.hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.hero-kicker {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: 1.2rem;
}
.hero-title { font-size: clamp(2.5rem, 6.5vw, 4.9rem); line-height: 1.03; font-weight: 800; letter-spacing: -.04em; }
.hero-title em { font-style: normal; color: var(--ink); }
.hero-title .dot, .rfq-hero .dot { color: var(--accent); }
.hero-lede { max-width: 46ch; margin-top: 1.4rem; font-size: 1.08rem; color: var(--ink-2); }
.hero-cta { display: flex; gap: .8rem; margin-top: 2rem; flex-wrap: wrap; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; margin-top: clamp(2.5rem, 5vw, 4rem);
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; max-width: 760px;
}
.hero-stats > div { background: var(--surface); padding: 1.1rem 1.3rem; }
.hero-stats dt { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; }
.hero-stats dd { font-size: .8rem; color: var(--ink-2); }

.hero-art { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-art svg {
  position: absolute; top: -70px;
  right: max(-140px, calc(50% - 730px)); /* laiekraanil püsib sisu kõrval */
  width: min(62vw, 840px); height: auto;
}
/* Tahvel ja väiksem lauaarvuti: visuaal tagasihoidlikum, ei kata pealkirja */
@media (max-width: 1024px) {
  .hero-art svg { width: 46vw; opacity: .6; }
}
.ha { transition: transform 1.1s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.ha-line { fill: none; stroke: color-mix(in srgb, var(--ink) 16%, transparent); stroke-width: 1.5; }
.ha-faint { stroke: color-mix(in srgb, var(--ink) 9%, transparent); }
.ha-needle { stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 2; stroke-linecap: round; }
.ha-dot { fill: var(--accent); opacity: .65; }
.ha-fill { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.ha-spin, .ha-spin-rev, .ha-spin-slower { transform-box: view-box; }
.ha-spin { animation: haSpin 80s linear infinite; }
.ha-spin-rev { animation: haSpin 150s linear infinite reverse; }
.ha-spin-slower { animation: haSpin 190s linear infinite; }
@keyframes haSpin { to { transform: rotate(360deg); } }

/* ---------- Kataloog ---------- */
.catalog { max-width: 1280px; margin: 0 auto; padding: 1rem 1.5rem 4rem; }
.catalog-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.catalog-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.catalog-note { color: var(--ink-2); font-size: .85rem; }

.filters {
  position: sticky; top: 62px; z-index: 40;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  padding: .7rem 0; margin-bottom: .6rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip {
  padding: .42rem .95rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: .85rem; font-weight: 500;
  transition: all .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip small { opacity: .55; margin-left: .3rem; font-family: var(--font-mono); font-size: .72rem; }
.filter-right { display: flex; gap: .5rem; margin-left: auto; }
.filter-right select {
  padding: .45rem .9rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: .85rem; outline: none; cursor: pointer;
}
.result-count { font-size: .8rem; color: var(--ink-2); margin: .4rem 0 1rem; font-family: var(--font-mono); }

/* ---------- Ristlõigete vektorvalik ---------- */
.shape-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: .6rem;
  margin: .4rem 0 1.4rem;
}
.shape-tile {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: .9rem .5rem .75rem;
  background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: all .15s ease;
  position: relative;
}
.shape-tile:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.shape-tile.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.shape-tile.is-active .shape-ico { color: var(--accent); }
.shape-tile:disabled { opacity: .32; cursor: not-allowed; }
.shape-ico { width: 42px; height: 42px; color: var(--ink); display: grid; place-items: center; }
.shape-ico svg { width: 100%; height: 100%; }
.shape-ico.all-ico { font-size: 1.9rem; line-height: 1; font-family: var(--font-display); }
.shape-label { font-size: .74rem; font-weight: 600; text-align: center; line-height: 1.15; }
.shape-count {
  position: absolute; top: 6px; right: 8px;
  font-family: var(--font-mono); font-size: .64rem; color: var(--ink-2);
}
.shape-tile.is-active .shape-count { color: var(--accent-text); font-weight: 600; }
.footer address { font-style: normal; font-size: .88rem; line-height: 1.7; }
.footer address a:hover { color: #fff; }

/* ---------- Print ---------- */
@media print {
  .site-header, .hero-art, .hero-cta, .filters, .shape-picker,
  .how, .cart-drawer, .drawer-backdrop, .modal-backdrop, .toast,
  .td-add, .row-mm, .row-pcs, .add-btn { display: none !important; }
  body { background: #fff; }
  .buy-table thead th { background: #eee !important; color: #000 !important; }
}

/* ---------- Alamtüübid + mõõdufiltrid ---------- */
.sub-picker {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  padding: .9rem 1rem; margin: -.6rem 0 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  animation: cardIn .25s ease;
}
.sub-tiles { display: flex; flex-wrap: wrap; gap: .5rem; }
.sub-tile {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .6rem .7rem .5rem; min-width: 84px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg);
  transition: all .15s ease;
  position: relative;
}
.sub-tile:hover { border-color: var(--ink); transform: translateY(-1px); }
.sub-tile.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.sub-tile.is-active .sub-ico { color: var(--accent-text); }
.sub-ico { width: 40px; height: 32px; color: var(--ink); }
.sub-ico svg { width: 100%; height: 100%; }
.sub-ico .dim { opacity: .55; }
.sub-ico .dim text { font: 600 11px var(--font-mono); fill: currentColor; }
.sub-label { font-size: .68rem; font-weight: 600; text-align: center; line-height: 1.15; max-width: 96px; }
.sub-count { position: absolute; top: 4px; right: 7px; font-family: var(--font-mono); font-size: .6rem; color: var(--ink-2); }

.dim-filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.dim-filters .df-label { font-size: .8rem; font-weight: 700; margin-right: .2rem; }
.dim-filters select {
  padding: .45rem .8rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg);
  font-size: .84rem; font-family: var(--font-mono); outline: none; cursor: pointer;
  transition: border-color .15s;
}
.dim-filters select:focus, .dim-filters select.has-value { border-color: var(--accent); }

/* ---------- Aktiivsed filtrid ---------- */
.active-filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 .8rem; }
.af-tag {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .32rem .5rem .32rem .8rem;
  background: var(--ink); color: var(--bg);
  border-radius: 999px; font-size: .78rem; font-weight: 600;
}
.af-tag button {
  width: 18px; height: 18px; border-radius: 50%; font-size: .6rem;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18); color: var(--bg);
}
.af-tag button:hover { background: var(--accent); }
.af-clear { font-size: .78rem; color: var(--ink-2); text-decoration: underline; }
.af-clear:hover { color: var(--ink); }

/* ---------- Rea/kaardi välgatus (otsingust maandumisel) ---------- */
tr.flash td, .card.flash { animation: flashBg 1.4s ease; }
@keyframes flashBg { 0%, 55% { background-color: color-mix(in srgb, var(--accent) 12%, transparent); } }

/* ---------- Vaatelüliti ---------- */
.view-switch { display: flex; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.view-btn { width: 32px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-2); }
.view-btn svg { width: 16px; height: 16px; }
.view-btn.is-active { background: var(--ink); color: var(--bg); }

/* ---------- Ostutabel ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.buy-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 980px; }
.buy-table thead th {
  text-align: left; font-size: .67rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-2); background: var(--surface);
  padding: .85rem .8rem; white-space: nowrap;
  border-bottom: 2px solid var(--ink);
  position: sticky; top: 0; z-index: 2;
}
.buy-table tbody tr { border-bottom: 1px solid var(--line); transition: background .12s; }
.buy-table tbody tr:hover { background: color-mix(in srgb, var(--tone, #999) 4%, var(--surface)); }
.buy-table tbody tr:last-child { border-bottom: 0; }
.buy-table td { padding: .7rem .8rem; vertical-align: middle; }
.td-shape { width: 46px; }
.td-shape .shape { width: 38px; height: 38px; border-radius: 9px; }
.td-shape .shape i { width: 19px; height: 19px; }
.td-shape .shape.flat i { height: 9px; }
.td-name strong { display: block; font-size: .89rem; font-weight: 500; line-height: 1.3; }
.td-name small { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-2); }
.td-grade { font-family: var(--font-mono); font-size: .76rem; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.td-dims { font-family: var(--font-mono); font-size: .8rem; white-space: nowrap; }
.td-len, .td-pcs { white-space: nowrap; }
.td-len span, .td-pcs span { font-size: .72rem; color: var(--ink-2); }
.row-mm, .row-pcs {
  width: 72px; padding: .4rem .5rem;
  border: 1.5px solid var(--line); border-radius: 8px;
  font-family: var(--font-mono); font-size: .8rem; text-align: right;
  background: var(--bg); outline: none;
  transition: border-color .15s;
}
.row-pcs { width: 56px; }
.row-mm:focus, .row-pcs:focus { border-color: var(--ink); }
.td-weight { font-family: var(--font-mono); font-size: .8rem; white-space: nowrap; color: var(--ink-2); }
.td-price { white-space: nowrap; font-family: var(--font-mono); font-size: .8rem; }
.td-price small { color: var(--ink-2); }
.td-sum { font-family: var(--font-mono); white-space: nowrap; }
.td-inc { font-weight: 700; }
tr.over-stock .td-weight::after { content: " ⚠"; color: var(--accent); }
.row-add {
  padding: .45rem .9rem; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  transition: background .15s, transform .15s;
}
.row-add:hover { background: var(--accent); transform: translateY(-1px); }
.row-add.added { background: var(--accent); color: var(--ink); }
.row-add.inq { background: var(--surface); color: var(--accent-text); border: 1.5px solid var(--accent); }
.row-add.inq:hover { background: var(--accent); color: #fff; }
.muted { color: var(--ink-2); }

/* ---------- Sorteeritavad tabelipäised ---------- */
.th-sort {
  display: inline-flex; align-items: center; gap: .3rem;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit;
  cursor: pointer; white-space: nowrap;
}
.th-sort .sort-ind { opacity: .45; font-size: .8em; transition: opacity .15s; }
.th-sort:hover .sort-ind { opacity: 1; }
.th-sort.is-active { color: var(--accent-text); }
.th-sort.is-active .sort-ind { opacity: 1; }

/* ---------- Tootenime link ---------- */
.plink { transition: color .12s; }
.plink:hover { color: var(--accent-text); }

/* ---------- Tooteleht (alamleht) ---------- */
body.detail-open .hero,
body.detail-open .usp,
body.detail-open .catalog,
body.detail-open .calcs,
body.detail-open .how { display: none; }

.detail { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; animation: cardIn .3s ease; }
.detail-crumb {
  display: flex; gap: .55rem; flex-wrap: wrap; align-items: center;
  font-size: .82rem; color: var(--ink-2); margin-bottom: 1.6rem;
}
.detail-crumb a:hover { color: var(--accent-text); }
.detail-crumb strong { color: var(--ink); font-weight: 600; }

.detail-grid { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.detail-visual {
  position: relative; aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--tone) 26%, var(--surface)), color-mix(in srgb, var(--tone) 8%, var(--surface)) 70%);
  border: 1px solid var(--line);
}
.detail-visual .shape { width: 140px; height: 140px; border-radius: 30px; background: none; }
.detail-visual .shape i { width: 84px; height: 84px; }
.detail-visual .shape.flat i { height: 34px; }
.detail-visual .shape.sheet i { height: 18px; }
.detail-visual figcaption {
  position: absolute; bottom: .9rem;
  font-family: var(--font-mono); font-size: .68rem; color: var(--ink-2);
}

.detail-sku { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-2); letter-spacing: .05em; margin-bottom: .5rem; }
.detail-info h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 1rem; line-height: 1.15; }
.detail-info .card-meta { margin-bottom: .6rem; }
.spec-table { width: 100%; max-width: 440px; border-collapse: collapse; margin: 1.5rem 0 1.7rem; font-size: .9rem; }
.spec-table th { text-align: left; font-weight: 500; color: var(--ink-2); padding: .8rem .8rem .8rem 0; width: 46%; line-height: 1.4; vertical-align: top; }
.spec-table td { padding: .8rem 0; font-family: var(--font-mono); font-size: .86rem; line-height: 1.4; vertical-align: top; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: 0; }
.detail-price { font-family: var(--font-display); font-weight: 700; font-size: 2rem; margin: 1rem 0 1.3rem; }
.detail-price small { font-size: .85rem; font-weight: 500; color: var(--ink-2); font-family: var(--font-body); }

.detail-calc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; max-width: 480px;
  display: grid; gap: 1rem;
}
.calc-inputs { display: flex; gap: 1rem; flex-wrap: wrap; }
.calc-inputs label { display: flex; flex-direction: column; gap: .35rem; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.calc-inputs label .calc-wrap { text-transform: none; letter-spacing: 0; color: var(--ink); }
.calc-wrap { display: inline-flex; align-items: center; gap: .4rem; border: 1.5px solid var(--line); border-radius: 10px; padding: .1rem .7rem .1rem .1rem; background: var(--bg); }
.calc-wrap:focus-within { border-color: var(--ink); }
.calc-wrap input { width: 92px; border: 0; outline: 0; background: none; padding: .55rem .6rem; font-family: var(--font-mono); text-align: right; }
.calc-wrap em { font-style: normal; font-size: .74rem; color: var(--ink-2); }
.calc-out div { display: flex; justify-content: space-between; padding: .22rem 0; font-size: .9rem; }
.calc-out dd { font-family: var(--font-mono); }
.calc-out .strong { font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .55rem; }
.calc-out .strong dd { font-family: var(--font-display); }
.stock-note.warn {
  background: #fdf3ec; color: #9a3d00;
  border: 1px solid #f5d9c5; border-radius: 10px;
  padding: .7rem .9rem; font-size: .84rem;
}
.detail-actions { display: grid; gap: .5rem; }

.related { margin-top: 3.5rem; }
.related h2 { font-size: 1.4rem; margin-bottom: 1.1rem; }

/* ---------- Sisulehed (alamlehed) ---------- */
body.page-open .hero,
body.page-open .catalog,
body.page-open .how { display: none; }

.page { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; animation: cardIn .3s ease; }
.page-prose { max-width: 68ch; }
.page-prose h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .6rem; letter-spacing: -.02em; }
.page-lead { font-size: 1.1rem; color: var(--ink-2); margin-bottom: 1.8rem; max-width: 52ch; }
.page-prose h2 {
  position: relative;
  font-size: 1.15rem; margin: 1.8rem 0 .55rem;
  padding-top: 1.2rem; padding-left: .9rem; border-top: 1px solid var(--line);
}
.page-prose h2::before {
  content: ""; position: absolute; left: 0; top: calc(1.2rem + .22em);
  width: 4px; height: .95em; border-radius: 2px;
  background: var(--accent);
}
.page-prose p { margin-bottom: .8rem; line-height: 1.65; }
.page-prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.page-prose a.btn { color: var(--accent-ink); text-decoration: none; }
.page-prose ol, .page-prose ul { margin: 0 0 1rem 1.3rem; display: grid; gap: .5rem; }
.page-back { margin-top: 2.5rem; }

.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin-bottom: 1rem;
}
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem;
}
.contact-card h2 { border: 0; padding: 0; margin: 0 0 .5rem; font-size: 1rem; }
.contact-card p { margin-bottom: .4rem; font-size: .92rem; }

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-visual { aspect-ratio: auto; height: 130px; max-width: none; }
  .detail-visual .shape { width: 90px; height: 90px; border-radius: 20px; }
  .detail-visual .shape i { width: 54px; height: 54px; }
  .detail-visual .shape.flat i { height: 22px; }
  .detail-visual figcaption { bottom: .5rem; font-size: .6rem; }
}

.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
}

/* ---------- Tootekaart ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem; display: flex; flex-direction: column; gap: .8rem;
  transition: transform .18s ease, box-shadow .18s ease;
  animation: cardIn .35s ease backwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-top { display: flex; align-items: flex-start; gap: .85rem; }
.shape {
  width: 52px; height: 52px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone, #999) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--tone, #999) 20%, var(--line));
}
.shape i {
  display: block; width: 26px; height: 26px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--tone) 68%, #fff), var(--tone));
}
.shape.round i { border-radius: 50%; }
.shape.tube i { border-radius: 50%; -webkit-mask: radial-gradient(circle, transparent 34%, #000 36%); mask: radial-gradient(circle, transparent 34%, #000 36%); }
.shape.square i { border-radius: 4px; }
.shape.flat i { height: 12px; border-radius: 3px; }
.shape.sheet i { height: 6px; border-radius: 2px; }
.shape.profile i { border-radius: 4px; -webkit-mask: linear-gradient(#000 30%, transparent 30% 70%, #000 70%); mask: linear-gradient(#000 30%, transparent 30% 70%, #000 70%); }
.shape.sqtube i { border-radius: 4px; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; border: 5px solid currentColor; background: none; }
.shape.hex i { -webkit-clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
.shape.angle i { border-radius: 2px; -webkit-clip-path: polygon(0 0, 32% 0, 32% 68%, 100% 68%, 100% 100%, 0 100%); clip-path: polygon(0 0, 32% 0, 32% 68%, 100% 68%, 100% 100%, 0 100%); }

.card-id { flex: 1; min-width: 0; }
.card-sku { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); letter-spacing: .04em; }
.card-name { font-family: var(--font-body); font-size: .95rem; font-weight: 500; line-height: 1.35; margin-top: .2rem; letter-spacing: 0; }

.card-meta { display: flex; gap: .4rem; flex-wrap: wrap; }
.tag {
  font-size: .7rem; font-weight: 500; padding: .18rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2); background: transparent;
}
.tag.low { border-color: transparent; background: #fdecec; color: #b42318; font-weight: 600; }
.tag.stock { border-color: transparent; background: var(--ok-bg); color: var(--ok); font-family: var(--font-mono); }

.card-buy { margin-top: auto; display: flex; align-items: center; gap: .6rem; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.price small { font-size: .68rem; font-weight: 500; color: var(--ink-2); font-family: var(--font-body); }
.add-btn {
  margin-left: auto;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  transition: background .15s, transform .15s;
}
.add-btn .ico { width: 17px; height: 17px; grid-area: 1 / 1; }
.add-btn .ico-check { opacity: 0; transform: scale(.5); }
.add-btn.added .ico-plus { opacity: 0; transform: scale(.5); }
.add-btn.added .ico-check { opacity: 1; transform: scale(1); }
.add-btn .ico { transition: opacity .18s ease, transform .18s ease; }
.add-btn:hover { background: var(--accent); transform: scale(1.08); }
.add-btn.added { background: var(--accent); color: var(--ink); }

/* ---------- Kuidas töötab ---------- */
.how { max-width: 1280px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.how h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.8rem; }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; list-style: none; }
.how-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.how-steps span { font-family: var(--font-mono); color: var(--accent-text); font-weight: 600; }
.how-steps h3 { margin: .6rem 0 .35rem; font-size: 1.1rem; }
.how-steps p { color: var(--ink-2); font-size: .9rem; }

/* ---------- Jalus ---------- */
.footer {
  position: relative; overflow: hidden;
  background: var(--ink); color: #b8b5ac;
}
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; gap: .7rem; }
.btn-lg svg { width: 20px; height: 20px; transition: transform .2s; }
.btn-lg:hover svg { transform: translateX(4px); }

.footer-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  max-width: 1280px; margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.footer-kicker {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .7rem;
}
.footer-cta h2 {
  color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.footer-cta-text > p:last-child { max-width: 44ch; }

.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem;
  max-width: 1280px; margin: 0 auto;
  padding: 3rem 1.5rem 3.5rem;
}
.footer-about .brand-word { color: #fff; font-size: 1.5rem; }
.footer-about p { margin-top: .7rem; font-size: .95rem; line-height: 1.6; }
.footer h4 {
  color: #fff; font-family: var(--font-display); font-size: .95rem;
  margin-bottom: .8rem; letter-spacing: .01em;
}
.footer-col p, .footer address { font-style: normal; font-size: .88rem; line-height: 1.8; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a, .footer address a { position: relative; transition: color .15s; }
.footer-links a:hover, .footer address a:hover { color: #fff; }
.footer-links a::before {
  content: ""; display: inline-block; width: 0; height: 2px;
  background: var(--accent); vertical-align: middle;
  transition: width .18s ease, margin-right .18s ease;
}
.footer-links a:hover::before { width: 12px; margin-right: 6px; }

/* Hiiglaslik vesimärk-tüpograafia */
.footer-mega {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(5rem, 19vw, 17rem);
  line-height: .78; text-align: center; letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,.08);
  user-select: none; pointer-events: none;
  margin-bottom: -.12em;
  background: linear-gradient(180deg, rgba(166,206,0,.2), transparent 75%);
  -webkit-background-clip: text; background-clip: text;
}

.footer-bottom {
  position: relative;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  max-width: 1280px; margin: 0 auto;
  padding: 1.1rem 1.5rem 1.3rem;
  border-top: 1px solid rgba(255,255,255,.09);
  font-size: .76rem;
}
.footer-cities { font-family: var(--font-mono); letter-spacing: .04em; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-about { grid-column: 1 / -1; }
  .footer-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; padding-top: 2.2rem; }
  .footer-bottom { flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
}

/* Mobiilis jalus lühemaks: ainult CTA-riba, veerud peidus */
@media (max-width: 760px) {
  .footer-grid, .footer-mega, .footer-bottom { display: none; }
}

/* ---------- Korvi sahtel ---------- */
.drawer-backdrop, .modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(22,21,15,.45);
  backdrop-filter: blur(3px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(430px, 100vw);
  background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.32,.72,.2,1);
  box-shadow: var(--shadow-lg);
}
.cart-drawer.is-open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 1.25rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: .6rem 1.4rem; }
.drawer-empty { flex: 1; display: grid; place-items: center; color: var(--ink-2); padding: 2rem; text-align: center; }
.cart-drawer:has(.cart-row) .drawer-empty { display: none; }

.cart-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: .8rem; align-items: center;
  padding: .9rem 0; border-bottom: 1px solid var(--line);
}
.cart-row .shape { width: 44px; height: 44px; }
.cart-row .shape i { width: 22px; height: 22px; }
.cart-row .shape.flat i { height: 10px; }
.cart-name { font-size: .88rem; font-weight: 500; line-height: 1.3; }
.cart-sku { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-2); }
.cart-line-price { font-weight: 700; font-family: var(--font-display); text-align: right; }
.cart-unit-price { font-size: .7rem; color: var(--ink-2); text-align: right; }
.qty-ctrl {
  grid-column: 2 / -1;
  display: inline-flex; align-items: center; gap: .2rem;
  border: 1.5px solid var(--line); border-radius: 999px;
  width: fit-content; padding: 2px;
}
.qty-ctrl button { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.qty-ctrl button .ico { width: 13px; height: 13px; }
.qty-ctrl button:hover { background: var(--line); }
.qty-ctrl input {
  width: 62px; border: 0; outline: 0; text-align: center;
  font-family: var(--font-mono); font-size: .82rem; background: none;
}
.qty-unit { font-size: .72rem; color: var(--ink-2); padding-right: .5rem; }
.cart-remove { color: var(--ink-2); margin-left: .6rem; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.cart-remove .ico { width: 12px; height: 12px; }
.cart-remove:hover { background: #fdecec; }
.cart-remove:hover { color: #b42318; }

.drawer-foot { border-top: 1px solid var(--line); padding: 1.2rem 1.4rem; }
.totals div { display: flex; justify-content: space-between; font-size: .9rem; padding: .2rem 0; }
.totals dd { font-family: var(--font-mono); }
.totals .grand { font-size: 1.15rem; font-weight: 700; margin: .5rem 0 .9rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.totals .grand dd { font-family: var(--font-display); }

/* ---------- Checkout ---------- */
.modal-backdrop { display: grid; place-items: center; padding: 1rem; z-index: 100; }
.modal {
  width: min(560px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-radius: 20px; padding: 1.6rem;
  animation: modalIn .25s cubic-bezier(.32,.72,.2,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.modal-head h2 { font-size: 1.3rem; }

.steps { display: flex; gap: .4rem; list-style: none; margin-bottom: 1.4rem; }
.steps li {
  flex: 1; text-align: center; font-size: .78rem; font-weight: 600; color: var(--ink-2);
  padding-bottom: .55rem; border-bottom: 3px solid var(--line);
}
.steps li.is-active { color: var(--ink); border-color: var(--accent); }
.steps li.is-done { color: var(--ok); border-color: var(--ok); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.2rem; }
.field-grid label { display: flex; flex-direction: column; gap: .35rem; }
.field-grid label > span { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.field-grid input {
  padding: .65rem .85rem; border: 1.5px solid var(--line); border-radius: 10px;
  outline: none; font-size: .9rem; background: var(--bg);
  transition: border-color .15s;
}
.field-grid input:focus { border-color: var(--ink); }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }

.delivery-opts { display: grid; gap: .6rem; margin-bottom: 1.2rem; }
.opt {
  display: flex; align-items: center; gap: .9rem;
  padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: border-color .15s;
}
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.opt input { accent-color: var(--accent); }
.opt div { flex: 1; }
.opt strong { font-size: .92rem; display: block; }
.opt small { color: var(--ink-2); }
.opt b { font-family: var(--font-display); }

.co-nav { display: flex; justify-content: space-between; gap: .8rem; }
.co-note { font-size: .75rem; color: var(--ink-2); margin-top: .9rem; text-align: center; }

.co-summary { margin-bottom: 1.2rem; }
.co-summary table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.co-summary td { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.co-summary td:last-child { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.co-summary tr.total td { font-weight: 700; font-size: 1rem; border: 0; font-family: var(--font-display); }

.co-done { text-align: center; padding: 1.5rem 0; }
.done-mark {
  width: 74px; height: 74px; margin: 0 auto 1.1rem;
  display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font-size: 2.2rem;
  border-radius: 50%;
  animation: pop .5s ease;
}
.co-done h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.co-done .btn { margin-top: 1.3rem; }
#orderNo { font-family: var(--font-mono); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 120;
  transform: translate(-50%, calc(100% + 2.5rem));
  opacity: 0; visibility: hidden;
  background: var(--ink); color: var(--bg);
  padding: .7rem 1.3rem; border-radius: 999px;
  font-size: .88rem; font-weight: 500;
  transition: transform .3s cubic-bezier(.32,.72,.2,1), opacity .25s ease, visibility 0s linear .3s;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }

/* ---------- Tühi olek ---------- */
.empty { text-align: center; padding: 4rem 1rem; color: var(--ink-2); }
.empty .btn { margin-top: 1rem; }

/* ---------- Kerimise lukk (avatud dialoogide ajal) ---------- */
body.no-scroll { overflow: hidden; }

/* ---------- Mobiilne alumine navigatsioon ---------- */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(22,21,15,.08);
}
.bnav-btn {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem;
  padding: .4rem .2rem; border-radius: 12px;
  color: var(--ink-2); font-size: .66rem; font-weight: 600;
  transition: color .15s;
}
.bnav-btn svg { width: 22px; height: 22px; }
.bnav-btn.is-active { color: var(--ink); }
.bnav-btn.is-active svg { color: var(--accent-text); }
.bnav-btn:active { transform: scale(.94); }
.bnav-badge {
  position: absolute; top: 0; right: calc(50% - 20px);
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 999px; font-size: .62rem; font-weight: 700;
}

/* ---------- Mobiil: äpi-stiilis paigutus ---------- */
@media (max-width: 760px) {
  .search kbd, .brand-sub { display: none; }
  .site-header { flex-wrap: wrap; gap: .6rem; padding: .7rem 1rem; }
  .search { order: 3; min-width: 100%; }

  /* Alumine nav nähtavale; päise korvinupp peitu (korv elab all navis) */
  .bottom-nav { display: flex; }
  .cart-btn { display: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* Filtrid: horisontaalselt keritavad ribad, mitte murduvad read */
  .filters { top: 110px; flex-wrap: nowrap; overflow: visible; }
  .chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; flex: 1; padding-bottom: 2px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .filter-right { margin-left: 0; flex-shrink: 0; }

  .shape-picker {
    display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: .5rem; padding-bottom: 4px;
  }
  .shape-picker::-webkit-scrollbar { display: none; }
  .shape-tile { min-width: 86px; flex-shrink: 0; }

  /* Kangelane kompaktsemaks */
  .hero { padding-top: 2.5rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-art svg { width: 480px; right: -190px; top: -60px; opacity: .5; }

  /* Korvi sahtel: täisekraan, alt üles nagu äpi leht */
  .cart-drawer {
    width: 100vw; top: 0; border-radius: 0;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.32,.72,.2,1);
  }
  .cart-drawer.is-open { transform: translateY(0); }
  .drawer-head { padding-top: max(1.2rem, env(safe-area-inset-top)); }
  .drawer-foot { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }

  /* Checkout: täisekraani modal */
  .modal-backdrop { padding: 0; }
  .modal {
    width: 100vw; height: 100dvh; max-height: none;
    border-radius: 0;
    padding: max(1.2rem, env(safe-area-inset-top)) 1.2rem calc(1.2rem + env(safe-area-inset-bottom));
    animation: sheetIn .3s cubic-bezier(.32,.72,.2,1);
  }
  @keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }

  /* Tabelivaade mobiilis: kompaktsem, kerib horisontaalselt konteineris */
  .buy-table { min-width: 860px; font-size: .8rem; }
  .buy-table td { padding: .5rem .55rem; }
  .td-grade { max-width: 100px; }

  /* Toast alumise navi kohale */
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: 92vw; text-align: center; }
}

@media (max-width: 540px) {
  .hero-stats dt { font-size: 1.4rem; }
  .catalog-head { flex-direction: column; gap: .2rem; }
}

/* Väga kitsad ekraanid */
@media (max-width: 380px) {
  .hero-title { font-size: 2.1rem; }
  .lang-switch { padding: 2px; }
  .shape-tile { min-width: 76px; }
  .btn { padding: .72rem 1.2rem; }
}

/* ---------- Lisaväärtuste riba ---------- */
.usp { padding: 0 1.5rem 1rem; }
.usp-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem;
}
.usp-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.usp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.usp-card svg { width: 30px; height: 30px; margin-bottom: .7rem; color: var(--accent-text); }
.usp-card h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.usp-card p { font-size: .9rem; color: var(--ink-2); line-height: 1.55; }
.usp-card a { display: inline-block; margin-top: .6rem; font-size: .85rem; font-weight: 600; color: var(--accent-text); }
.usp-card a:hover { text-decoration: underline; text-underline-offset: 3px; }
.usp-hot { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.usp-hot svg { color: var(--accent-text); }
.usp-hot::after {
  content: "KIIREIM"; position: absolute; top: 1rem; right: 1rem;
  font-family: var(--font-mono); font-size: .58rem; font-weight: 600; letter-spacing: .14em;
  padding: .25rem .55rem; border-radius: 999px;
  background: var(--accent); color: var(--ink);
}

/* ---------- Päringu modal ---------- */
.inq-hint {
  display: flex; align-items: center; gap: .9rem;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border: 1.5px solid var(--accent); border-radius: 12px;
  padding: .9rem 1rem; margin-bottom: 1.2rem;
}
.inq-hint svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--accent-text); }
.inq-hint strong { font-size: .92rem; display: block; }
.inq-hint p { font-size: .8rem; color: var(--ink-2); margin: 0; }
.inq-hint div { flex: 1; }
.inq-hint .btn { flex-shrink: 0; padding: .5rem 1rem; font-size: .85rem; }
.inq-msg { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.inq-msg > span { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.inq-msg textarea {
  padding: .65rem .85rem; border: 1.5px solid var(--line); border-radius: 10px;
  outline: none; font: inherit; font-weight: 400; font-size: .9rem; background: var(--bg);
  resize: vertical; transition: border-color .15s;
}
.inq-msg textarea:focus { border-color: var(--ink); }
#inquiryForm .field-grid select {
  padding: .65rem .85rem; border: 1.5px solid var(--line); border-radius: 10px;
  outline: none; font-size: .9rem; background: var(--bg); cursor: pointer;
}
@media (max-width: 760px) { .inq-hint { flex-wrap: wrap; } }

/* ---------- Alamlehtede päis (staatilised HTML-lehed) ---------- */
.subpage-header { flex-wrap: wrap; }
.btn-sm { padding: .55rem 1.15rem; font-size: .88rem; }
.usp-note {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border: 1.5px solid var(--accent); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin: 1.2rem 0; font-weight: 600;
}

/* ---------- Viimistlus ---------- */
::selection { background: var(--ink); color: var(--accent); }

/* Peen punktimuster kangelase taustal */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 78%);
  opacity: .45;
}

/* Õhuke moodne kerimisriba */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cdcac1; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-2); }

/* Suured numbrid display-fondis ühtlaselt */
.hero-stats dt, .price, .detail-price, .cart-line-price { font-variant-numeric: tabular-nums; }

/* Päise otsing sulandub konteinerisse ka ülilaiadel ekraanidel */
@media (min-width: 1500px) {
  .search { max-width: 620px; }
}

/* ---------- Pagineerimine ---------- */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: .35rem;
  margin: 1.6rem 0 .4rem; flex-wrap: wrap;
}
.pg-btn {
  min-width: 40px; height: 40px; padding: 0 .6rem;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  font-family: var(--font-mono); font-size: .88rem; font-weight: 600;
  display: grid; place-items: center;
  transition: all .15s ease;
}
.pg-btn:hover:not(:disabled):not(.is-active) { border-color: var(--ink); transform: translateY(-1px); }
.pg-btn.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pg-btn:disabled { opacity: .35; cursor: not-allowed; }
.pg-gap { color: var(--ink-2); padding: 0 .2rem; }
.table-wrap.is-loading, #productGrid.is-loading { opacity: .45; transition: opacity .15s; }

/* ---------- Kaalukalkulaator ---------- */
.calcs { padding: 1rem 1.5rem 4.5rem; }
.calcs-inner { max-width: 1280px; margin: 0 auto; }
.calcs-kicker, .page-kicker {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: .5rem;
}
.calcs-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .4rem; }
.calcs-note { color: var(--ink-2); font-size: .92rem; max-width: 54ch; }
.calcs-grid {
  display: grid; grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 1.5rem; margin-top: 1.6rem; align-items: stretch;
}
.calc-preview {
  position: relative; display: grid; place-items: center;
  background: var(--ink); border-radius: 20px; padding: 1.5rem;
  overflow: hidden;
}
.calc-preview::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.calc-preview svg { width: min(100%, 340px); position: relative; }
.calc-preview figcaption {
  position: absolute; bottom: .9rem;
  font-family: var(--font-mono); font-size: .68rem; color: rgba(255,255,255,.45);
}
.wc-shape-fill { fill: #d9d6cd; }
.wc-shape-stroke { fill: none; stroke: #d9d6cd; }
.wc-dim-line { stroke: var(--accent); stroke-width: 1.5; }
.wc-dim-head { fill: var(--accent); }
.wc-dim-text { font: 600 12px var(--font-mono); fill: #cde36a; }

.calc-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 1.5rem; display: grid; gap: 1.1rem; align-content: start;
}
.wc-shapes { display: flex; gap: .5rem; flex-wrap: wrap; }
.wc-shape {
  width: 56px; height: 56px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--bg);
  display: grid; place-items: center; color: var(--ink);
  transition: all .15s ease;
}
.wc-shape svg { width: 30px; height: 30px; }
.wc-shape:hover { border-color: var(--ink); transform: translateY(-2px); }
.wc-shape.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--accent-text); }
.wc-fields { display: flex; gap: .9rem 1.1rem; flex-wrap: wrap; align-items: end; }
.wc-fields label { display: flex; flex-direction: column; gap: .35rem; }
.wc-fields label > span { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.wc-fields select {
  padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg); font-size: .88rem; outline: none; cursor: pointer;
}
.wc-fields .calc-wrap input { width: 84px; }
.wc-dims { display: contents; }
.wc-out div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; font-size: .92rem; border-bottom: 1px dashed var(--line); }
.wc-out dd { font-family: var(--font-mono); }
.wc-out .strong { font-weight: 800; font-size: 1.25rem; border-bottom: 0; padding-top: .55rem; }
.wc-out .strong dd { font-family: var(--font-display); color: var(--accent-text); }

.wc-match h3 { font-size: .95rem; margin-bottom: .5rem; }
.wc-match-row {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: .45rem; transition: border-color .15s, transform .15s;
}
.wc-match-row:hover { border-color: var(--accent); transform: translateX(3px); }
.wc-match-row .shape { width: 32px; height: 32px; border-radius: 8px; }
.wc-match-row .shape i { width: 16px; height: 16px; }
.wc-match-row .shape.flat i { height: 7px; }
.wc-mr-name { flex: 1; min-width: 0; font-size: .84rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-mr-name small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .68rem; color: var(--ink-2); }
.wc-mr-price { font-family: var(--font-mono); font-size: .8rem; white-space: nowrap; }
.wc-more { font-size: .84rem; font-weight: 600; color: var(--accent-text); }
.wc-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.wc-none { font-size: .86rem; color: var(--ink-2); display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .calcs-grid { grid-template-columns: 1fr; }
  .calc-preview { min-height: 300px; }
}

/* ---------- Kasulikku: tööriistakaardid ---------- */
.page-wide { max-width: none; }
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem; margin: 1.6rem 0 2.2rem;
}
.tool-card {
  display: flex; flex-direction: column; gap: .8rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  text-decoration: none !important;
}
a.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.tool-ico { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); display: grid; place-items: center; color: var(--accent-text); }
.tool-ico svg { width: 24px; height: 24px; }
.tool-body strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: .25rem; }
.tool-body span { font-size: .88rem; color: var(--ink-2); line-height: 1.55; }
.tool-cta { font-size: .86rem; font-weight: 700; color: var(--accent-text); margin-top: auto; }
a.tool-card:hover .tool-cta { text-decoration: underline; text-underline-offset: 3px; }
.tool-card.is-soon { opacity: .62; }
.tool-card.is-soon .tool-ico { background: var(--bg); color: var(--ink-2); }
.tool-soon {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
}

/* ---------- Kontaktileht ---------- */
.kontakt-page { max-width: 880px; }
.k-hero { padding: 1rem 0 2.2rem; border-bottom: 1px solid var(--line); }
.k-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); letter-spacing: -.035em; margin-bottom: .7rem; }
.k-direct { display: flex; flex-direction: column; gap: .2rem; margin: 1.6rem 0 1.1rem; }
.k-big {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 3.6vw, 2.3rem); letter-spacing: -.02em;
  width: fit-content; position: relative; line-height: 1.35;
}
.k-big::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: .12em; height: 3px;
  background: var(--accent); transition: right .25s ease;
}
.k-big:hover { color: var(--accent-text); }
.k-big:hover::after { right: 0; }
.k-hours { display: flex; align-items: center; gap: .55rem; font-family: var(--font-mono); font-size: .82rem; color: var(--ink-2); }
.k-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }

.k-promise {
  margin: 2rem 0; padding: 1.4rem 1.6rem;
  background: var(--ink); color: #d8d5cc; border-radius: var(--radius);
}
.k-promise h2 { color: #fff; font-size: 1.15rem; margin-bottom: .45rem; }
.k-promise strong { color: #fff; }
.k-promise p { line-height: 1.65; }

.k-sec { font-size: 1.25rem; margin: 2.4rem 0 1rem; }
.k-points { list-style: none; }
.k-points li {
  display: flex; align-items: flex-start; gap: 1.2rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line);
}
.k-num { font-family: var(--font-mono); font-weight: 600; color: var(--accent-text); padding-top: .15rem; }
.k-point-body { flex: 1; }
.k-points h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.k-points p { color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.k-map { font-size: .86rem; font-weight: 600; color: var(--accent-text); white-space: nowrap; padding-top: .2rem; }
.k-map:hover { text-decoration: underline; text-underline-offset: 3px; }
.k-soon { opacity: .65; }

.k-req div { display: flex; gap: 1rem; padding: .65rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.k-req dt { width: 130px; color: var(--ink-2); flex-shrink: 0; }
.k-req dd { font-family: var(--font-mono); }

.k-cta {
  margin: 2.6rem 0 0; padding: 1.4rem 1.6rem;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
}
.k-cta p { max-width: 52ch; }
.k-cta a:not(.btn) { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Korvi-lend ja tagasiside ---------- */
.fly-dot {
  position: fixed; z-index: 130; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 4px 14px rgba(166,206,0,.6);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cart-btn.bump, .bnav-btn.bump { animation: cartBump .45s cubic-bezier(.32,.72,.2,1); }
@keyframes cartBump { 35% { transform: scale(1.12); } 70% { transform: scale(.96); } }

.toast { display: flex; align-items: center; gap: .55rem; }
.toast svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

.drawer-empty { display: grid; place-content: center; justify-items: center; gap: 1rem; }
.empty-cart-art {
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 1.5px dashed var(--line);
  color: var(--ink-2);
}
.empty-cart-art svg { width: 34px; height: 34px; }

.card:hover .shape i { transform: scale(1.07) rotate(-3deg); }
.shape i { transition: transform .25s ease; }

/* ---------- E-posti kopeerimise teavitus (alamlehed) ---------- */
.copy-toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 120;
  transform: translate(-50%, calc(100% + 2.5rem));
  opacity: 0;
  background: var(--ink); color: var(--bg);
  padding: .7rem 1.3rem; border-radius: 999px;
  font-size: .88rem; font-weight: 500;
  transition: transform .3s cubic-bezier(.32,.72,.2,1);
  box-shadow: var(--shadow-lg); pointer-events: none;
}
.copy-toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Vanem sülearvuti: säästlikum vertikaalruum ---------- */
@media (min-width: 1024px) and (max-height: 820px) {
  .hero { padding-top: 2.6rem; padding-bottom: 2.2rem; }
  .hero-stats { margin-top: 1.8rem; }
  .hero-stats > div { padding: .85rem 1.1rem; }
  .hero-stats dt { font-size: 1.45rem; }
  .usp-card { padding: 1.1rem 1.3rem; }
}

/* ---------- Tahvel: kaardivaade ja modalid mugavamaks ---------- */
@media (min-width: 761px) and (max-width: 1023px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .buy-table { min-width: 900px; }
  .modal { width: min(600px, 94vw); }
  .cart-drawer { width: min(420px, 92vw); }
  .hero-stats { max-width: none; }
}

/* ---------- Puuteseadmed: suuremad sihtalad (WCAG 44px) ---------- */
@media (hover: none) and (pointer: coarse) {
  .qty-ctrl button { width: 34px; height: 34px; }
  .icon-btn { width: 42px; height: 42px; }
  .pg-btn { min-width: 44px; height: 44px; }
  .row-add { padding: .6rem 1rem; }
  .chip { padding: .55rem 1rem; }
  .header-nav a, .footer-links a { padding: .45rem 0; display: inline-block; }
}

/* ---------- Ultralai (2560+): tüpograafia ei paisu lõputult ---------- */
@media (min-width: 2000px) {
  .hero-title { font-size: 4.9rem; }
  .footer-mega { font-size: 16rem; }
}

/* ---------- Projektipäringu koostaja ---------- */
.rfq-page { max-width: 880px; }
.rfq-hero { padding-bottom: 1.6rem; }
.rfq-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.035em; line-height: 1.05; margin-bottom: .8rem; }
.rfq-hero em { font-style: normal; color: var(--ink); }

.rfq-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.1rem;
}
.rfq-panel h2 { font-size: 1.15rem; }
.rfq-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.rfq-example { font-size: .82rem; font-weight: 600; color: var(--accent-text); }
.rfq-example:hover { text-decoration: underline; text-underline-offset: 3px; }
.rfq-hint { font-size: .82rem; color: var(--ink-2); margin: .35rem 0 1.1rem; }

.rfq-line { margin-bottom: .7rem; }
.rfq-line-top { display: flex; align-items: center; gap: .7rem; }
.rfq-idx { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-2); width: 22px; flex-shrink: 0; }
.rfq-input-wrap { position: relative; flex: 1; }
.rfq-input {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); font-size: .95rem; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.rfq-input:focus { border-color: var(--ink); box-shadow: var(--shadow); background: var(--surface); }
.rfq-line.has-stock .rfq-input { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.rfq-del {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: var(--ink-2);
}
.rfq-del svg { width: 13px; height: 13px; }
.rfq-del:hover { background: #fdecec; color: #b42318; }

.rfq-sugg {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: sugIn .15s ease;
}
.rfq-sugg-item {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .55rem .9rem; text-align: left; font-size: .88rem;
}
.rfq-sugg-item:hover, .rfq-sugg-item.is-active { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.rfq-sugg-kind {
  font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-2); width: 52px; flex-shrink: 0;
}

.rfq-chips { display: flex; flex-wrap: wrap; gap: .35rem; padding: .45rem 0 0 calc(22px + .7rem); }
.rfq-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .74rem; font-weight: 500;
  padding: .22rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
}
.rfq-chip em { font-style: normal; font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.rfq-ghost { border-style: dashed; color: var(--ink-2); cursor: pointer; }
.rfq-ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.rfq-stock { border-color: transparent; background: var(--ok-bg); color: var(--ok); font-family: var(--font-mono); }
.rfq-summary { margin-top: 1rem; font-size: .9rem; color: var(--ink-2); }
.rfq-sum-stock { color: var(--ok); font-weight: 600; }

.rfq-adv {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  margin-bottom: 1.1rem; background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.rfq-adv summary {
  display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap;
  padding: 1.1rem 1.5rem; cursor: pointer; list-style: none;
}
.rfq-adv summary::-webkit-details-marker { display: none; }
.rfq-adv summary span { font-family: var(--font-display); font-weight: 600; }
.rfq-adv summary small { color: var(--ink-2); font-size: .82rem; }
.rfq-adv summary::before { content: "+"; font-family: var(--font-mono); color: var(--accent-text); font-weight: 600; }
.rfq-adv[open] summary::before { content: "−"; }
.rfq-adv[open] { border-style: solid; background: var(--surface); }
.rfq-adv-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem;
  padding: .3rem 1.5rem 1.5rem;
}
.rfq-adv-grid label { display: flex; flex-direction: column; gap: .35rem; }
.rfq-adv-grid label > span { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.rfq-adv-grid select, .rfq-adv-grid input[type="text"], .rfq-adv-grid input[type="date"], .rfq-adv-grid textarea {
  padding: .65rem .85rem; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg); font: inherit; font-size: .9rem; outline: none;
}
.rfq-adv-grid select:focus, .rfq-adv-grid input:focus, .rfq-adv-grid textarea:focus { border-color: var(--ink); }
.rfq-check { flex-direction: row !important; align-items: center; gap: .6rem !important; }
.rfq-check span { text-transform: none !important; letter-spacing: 0 !important; font-size: .9rem !important; font-weight: 500 !important; color: var(--ink) !important; }
.rfq-check input { accent-color: var(--accent); width: 17px; height: 17px; }
.rfq-notes { grid-column: 1 / -1; }
.rfq-notes textarea { resize: vertical; }

.rfq-done { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.5rem; }
.rfq-done-list { list-style: none; margin: 1rem auto 0; max-width: 420px; text-align: left; }
.rfq-done-list li { padding: .4rem 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.rfq-stock-mini { font-family: var(--font-mono); font-size: .66rem; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: .1rem .45rem; }

@media (max-width: 640px) {
  .rfq-adv-grid { grid-template-columns: 1fr; }
  .rfq-chips { padding-left: 0; }
}

/* ---------- Tasuta lõikamine detailideks (kuni 3 m positsiooni kohta) ---------- */
.cut-viz { border-radius: 12px; padding: .85rem 1rem; }
.cut-viz.ok { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cut-viz.over { background: var(--bg); border: 1px dashed var(--line); }
.cut-head { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; font-size: .84rem; }
.cut-head svg { width: 17px; height: 17px; color: var(--accent-text); flex-shrink: 0; }
.cut-head strong { font-size: .86rem; }
.cut-head span { color: var(--ink-2); font-family: var(--font-mono); font-size: .74rem; }
.cut-bar {
  display: flex; gap: 2px; height: 12px; margin-top: .6rem;
  border-radius: 6px; overflow: hidden;
}
.cut-bar i { background: var(--accent); border-radius: 2px; min-width: 3px; }
.cut-bar b { background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 2px; }
.cut-note { font-size: .78rem; color: var(--ink-2); margin-top: .45rem; }

.footer-subbrand { font-size: .78rem; color: #8a877e; margin-top: .8rem; max-width: 32ch; }

/* ---------- Täiuslikkuse pass ---------- */
.empty-sub { font-size: .88rem; color: var(--ink-2); max-width: 46ch; margin: .4rem auto 0; }
.empty-sub em { font-style: normal; font-family: var(--font-mono); color: var(--ink); }
.empty-sub a { color: var(--brand-navy); text-decoration: underline; text-underline-offset: 2px; }

.detail-share {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600; color: var(--ink-2);
  padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); transition: all .15s;
}
.detail-share svg { width: 14px; height: 14px; }
.detail-share:hover { border-color: var(--ink); color: var(--ink); }

#toTop {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
#toTop svg { width: 20px; height: 20px; }
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }
#toTop:hover { background: var(--brand-navy); }
@media (max-width: 760px) { #toTop { display: none; } }

/* Fookusrõngas ainult klaviatuuril */
.add-btn:focus:not(:focus-visible), .row-add:focus:not(:focus-visible), .btn:focus:not(:focus-visible) { outline: none; }

/* ---------- Päringuvorm (request.php) ---------- */
.rq-form { margin: 2rem 0 1rem; max-width: 720px; }
.rq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.rq-field { margin: 0 0 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.rq-field label { font-size: .82rem; font-weight: 600; color: var(--ink); }
.rq-field label small { font-weight: 400; color: var(--ink-2); }
.rq-field input, .rq-field textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: .7rem .85rem; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.rq-field textarea { resize: vertical; min-height: 8rem; line-height: 1.55; }
.rq-field input:focus, .rq-field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.rq-field input:user-invalid, .rq-field textarea:user-invalid { border-color: #c2453b; }
.rq-err { font-size: .8rem; color: #c2453b; font-weight: 500; }
.rq-check { margin: 0 0 1.4rem; font-size: .9rem; }
.rq-check label { display: flex; align-items: center; gap: .55rem; cursor: pointer; }
.rq-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.rq-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.rq-or { font-size: .9rem; color: var(--ink-2); }
.rq-or a { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--accent); }
.rq-note { margin-top: 1.1rem; font-size: .82rem; color: var(--ink-2); }
.rq-note a { text-decoration: underline; }
/* Meepott: peidus inimestele, aga mitte display:none (osa botte kontrollib seda) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .rq-grid { grid-template-columns: 1fr; } }
