/* ──────────────────────────────────────────────────────────────────
   PartStall — avaliku saidi stiilid (DESIGN.md).
   Värvid/mõõdud AINULT tokenitest (assets/tokens.css, --ps-*).
   Mobiil esikohal; murdepunktid 640 px ja 1024 px.
   ────────────────────────────────────────────────────────────────── */

/* --- alused -------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* Jalus jääb ka lühikesel lehel (404, tühi otsing) akna alaserva. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--ps-font-sans);
  font-size: var(--ps-body5-size);
  line-height: var(--ps-body5-lh);
  color: var(--ps-fg);
  background: var(--ps-bg);
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--ps-primary); }
h1, h2, h3 {
  font-family: var(--ps-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ps-navy-600);
  margin: 0 0 var(--ps-space-3);
}
h1 { font-size: 32px; line-height: 1.15; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; }
p { margin: 0 0 var(--ps-space-3); }

.container {
  width: 100%;
  max-width: var(--ps-container-xl);
  margin: 0 auto;
  padding: 0 var(--ps-space-4);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ps-bg); color: var(--ps-navy-600);
  padding: var(--ps-space-2) var(--ps-space-4);
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--ps-ring); outline-offset: 2px; }
.muted { color: var(--ps-fg-muted); font-size: var(--ps-body6-size); }
.center { text-align: center; }

/* --- päis: kompaktne B2B-riba (56 px: märk + otsing + keel + korv) ---- */
.site-header {
  background: var(--ps-navy-600);
  color: var(--ps-fg-on-inverse);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ps-space-2) var(--ps-space-3);
  min-height: 56px;
  padding: var(--ps-space-2) 0;
}
.brand {
  order: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
}
.brand-mark { display: block; width: 28px; height: 28px; align-self: center; }
.wordmark {
  font-family: var(--ps-font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ps-fg-on-inverse);
  white-space: nowrap;
}
.brand-tagline {
  display: none;
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  white-space: nowrap;
}

/* Otsing on päises igal lehel (spets §2). Mobiilis oma real. */
.search-form {
  order: 3;
  flex: 1 1 100%;
  display: flex;
  gap: 4px;
  min-width: 0;
  background: var(--ps-bg);
  border-radius: var(--ps-radius-md);
  padding: 3px;
}
.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ps-fg);
  background: transparent;
}
.search-form .btn-primary { padding: 6px 14px; font-size: 13px; border-radius: var(--ps-radius-sm); }
/* 404-lehe otsingukast: sama komponent, aga valgel taustal (vajab äärist),
   keskel ja piiratud laiusega. */
.search-form-inline {
  max-width: 460px;
  margin: 0 auto var(--ps-space-5);
  border: 1px solid var(--ps-border);
  box-shadow: var(--ps-shadow-sm);
  text-align: left;
}

.header-right {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--ps-space-3);
}
.mainsite-link {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  white-space: nowrap;
}
.mainsite-link:hover { color: #fff; text-decoration: underline; }

/* Müügiriba (Indrek 24.08): täislaiuses link partstall.ee pealehele, päise all. */
.promo-band {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 4px 16px;
  background: var(--ps-fiery-700);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  position: sticky; /* päise all kaasa (Indrek 27.08) */
  top: 56px;
  z-index: 39;
}
/* Hover AINULT hiirega seadmetel — puuteekraanil jääb :hover külge ja peataks vilkumise. */
@media (hover: hover) {
  .promo-band:hover { background: var(--ps-fiery-800); color: #fff; animation: none; }
}
/* Vilkumine intervalliga (Indrek 27.08): iga 4 s kaks kiiret sähvatust heledaks. */
.promo-band { animation: promo-blink 4s linear infinite; }
@keyframes promo-blink {
  0%, 70%, 100% { background: var(--ps-fiery-700); }
  75%, 85% { background: var(--ps-fiery-500); }
  80%, 90% { background: var(--ps-fiery-700); }
}
@media (prefers-reduced-motion: reduce) { .promo-band { animation: none; } }
@media (max-width: 640px) {
  .promo-band { font-size: 12px; }
}
.lang-switch { display: flex; gap: 6px; font-size: 12px; }
.lang-switch a {
  color: var(--ps-fg-on-inverse);
  opacity: .7;
  text-decoration: none;
  font-weight: 600;
}
.lang-switch a:hover { opacity: 1; }
.lang-switch a.is-active { opacity: 1; color: var(--ps-fiery-400); }

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--ps-radius-md);
  color: var(--ps-fg-on-inverse);
  text-decoration: none;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
}
.cart-btn:hover { background: rgba(255, 255, 255, .16); }
.cart-label { display: none; }
.cart-count {
  background: var(--ps-primary);
  color: var(--ps-primary-fg);
  border-radius: var(--ps-radius-full);
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}

/* --- nupud --------------------------------------------------------- */
.btn-primary, .btn-secondary {
  display: inline-block;
  border: 0;
  border-radius: var(--ps-radius-lg);
  padding: 12px 20px;
  font-family: inherit;
  font-size: var(--ps-body5-size);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--ps-primary); color: var(--ps-primary-fg); }
.btn-primary:hover { background: var(--ps-primary-hover); }
.btn-secondary { background: var(--ps-secondary); color: var(--ps-secondary-fg); }
.btn-secondary:hover { background: var(--ps-secondary-hover); }
.btn-add {
  display: inline-block;
  background: var(--ps-primary);
  color: var(--ps-primary-fg);
  border: 0;
  border-radius: var(--ps-radius-sm);
  padding: 7px 12px;
  font-family: inherit;
  font-size: var(--ps-body6-size);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn-add:hover { background: var(--ps-primary-hover); }
.btn-add[disabled], .btn-add-ask {
  background: var(--ps-gray-200);
  color: var(--ps-gray-600);
}
.btn-add-ask:hover { background: var(--ps-gray-300); }

/* --- vormiväljad (DESIGN.md: 13px, 1px ääris, raadius 4, padding 7/10) */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="search"], select, textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--ps-fg);
  background: var(--ps-bg);
  border: 1px solid var(--ps-input);
  border-radius: var(--ps-radius-sm);
  padding: 7px 10px;
}
.search-form input[type="search"] { border: 0; border-radius: 0; }
label { font-size: 13px; font-weight: 600; color: var(--ps-navy-600); }

/* --- sektsioonid (staatilised lehed, 404) --------------------------- */
.band { padding: var(--ps-space-10) 0; }
.eyebrow {
  display: inline-block;
  background: var(--ps-fiery-100);
  color: var(--ps-fiery-800);
  padding: 4px 10px;
  font-size: var(--ps-body6-size);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--ps-radius-sm);
  margin: 0 0 var(--ps-space-4);
}

/* --- laoseis ja kindlus-märgid (tabel + tooteleht) ------------------- */
.stock { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; }
.stock-in { color: var(--ps-success); }
.stock-low { color: var(--ps-warning); }
.stock-out { color: var(--ps-destructive); }

.badge {
  display: inline-block;
  background: var(--ps-gray-100);
  color: var(--ps-fg-muted);
  border-radius: var(--ps-radius-sm);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 var(--ps-space-2);
}
.badge-check { background: var(--ps-warning-bg); color: var(--ps-yellow-300); }

/* --- kaardid ja sisulehed ------------------------------------------ */
.card {
  background: var(--ps-bg);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-xl);
  box-shadow: var(--ps-shadow-lg);
  padding: var(--ps-space-6);
}
.callout { margin-top: var(--ps-space-8); }
.prose { max-width: 760px; }
.prose h2 { font-size: 20px; margin-top: var(--ps-space-8); }
.prose .lead { font-size: var(--ps-body4-size); color: var(--ps-fg-muted); }
.contact-list { margin: var(--ps-space-6) 0; }
.contact-list dt {
  font-family: var(--ps-font-small);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ps-fg-muted);
  margin-top: var(--ps-space-4);
}
.contact-list dd { margin: 2px 0 0; font-size: var(--ps-body4-size); }

/* --- jalus: üks rida ------------------------------------------------ */
.site-footer {
  background: var(--ps-navy-600);
  color: rgba(255, 255, 255, .6);
  margin-top: var(--ps-space-10);
  padding: var(--ps-space-4) 0;
  font-size: 12px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ps-space-2) var(--ps-space-4);
}
.footer-row a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.footer-row a:hover { color: var(--ps-fg-on-inverse); text-decoration: underline; }
.footer-company { color: var(--ps-fg-on-inverse); font-weight: 600; }
.footer-vat { margin-left: auto; }

/* --- ≥ 640 px ------------------------------------------------------ */
@media (min-width: 640px) {
  .container { padding: 0 var(--ps-space-6); }
  h1 { font-size: 32px; }
  .cart-label { display: inline; }
  .brand-tagline { display: inline; }
}

/* --- ≥ 768 px: päis ühel real -------------------------------------- */
@media (min-width: 768px) {
  .header-bar { flex-wrap: nowrap; }
  .search-form { order: 2; flex: 1 1 auto; max-width: 560px; margin: 0 var(--ps-space-4); }
  .header-right { order: 3; margin-left: 0; }
}

/* --- ≥ 1024 px ----------------------------------------------------- */
@media (min-width: 1024px) {
  .container { padding: 0 var(--ps-space-8); }
}

/* --- B2B tabel-hinnakiri: avaleht / otsing / kategooria / bränd ----- */
.list-page { padding-top: var(--ps-space-5); padding-bottom: var(--ps-space-10); }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ps-space-2);
  font-family: var(--ps-font-small);
  font-size: 12px;
  color: var(--ps-fg-muted);
  margin-bottom: var(--ps-space-3);
}
.breadcrumb a { color: var(--ps-fg-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ps-primary); text-decoration: underline; }

.list-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--ps-space-3);
  margin-bottom: var(--ps-space-4);
}
.list-h1 { font-size: 20px; margin: 0; overflow-wrap: anywhere; }
.list-count { margin: 0; }

.list-layout { display: grid; gap: var(--ps-space-4); align-items: start; }
.list-results { min-width: 0; }

/* Mobiil: filtripaneel „Filtrid"-nupu taga (märkeruut + CSS, ilma JS-ita). */
.filters-toggle { position: absolute; opacity: 0; pointer-events: none; }
.filters-burger {
  display: inline-block;
  justify-self: start;
  border: 1px solid var(--ps-border-strong);
  border-radius: var(--ps-radius-sm);
  background: var(--ps-bg);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-navy-600);
  cursor: pointer;
}
.filters-toggle:focus-visible + .filters-burger { outline: 2px solid var(--ps-ring); outline-offset: 2px; }
.search-filters { display: none; }
.filters-toggle:checked ~ .search-filters { display: block; }

.search-filters {
  background: var(--ps-gray-100);
  border-radius: var(--ps-radius-lg);
  padding: var(--ps-space-4);
}
.filter-section { border: 0; margin: 0 0 var(--ps-space-4); padding: 0; }
.filter-section:last-of-type { margin-bottom: var(--ps-space-3); }
.filter-title {
  display: block;
  font-family: var(--ps-font-small);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ps-navy-600);
  padding: 0;
  margin-bottom: var(--ps-space-2);
}
.filter-search { width: 100%; margin-bottom: var(--ps-space-2); }
.filter-list { max-height: 240px; overflow-y: auto; }
.filter-check {
  display: flex;
  align-items: center;
  gap: var(--ps-space-2);
  font-size: 13px;
  font-weight: 400;
  color: var(--ps-fg);
  padding: 2px 0;
  cursor: pointer;
}
.filter-check span:first-of-type { flex: 1; overflow-wrap: anywhere; }
/* JS peidab brändiotsinguga mittesobivad read `hidden`-atribuudiga — see
   peab võitma `display: flex` reegli (UA [hidden] on nõrgem). */
.filter-check[hidden] { display: none; }
.filter-n { color: var(--ps-fg-muted); font-size: 11px; }
.filter-more { margin-top: var(--ps-space-2); }
.filter-more > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ps-navy-600);
  list-style: none;
}
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more > summary:hover { text-decoration: underline; }
.filter-more .filter-list { margin-top: var(--ps-space-2); }
.filter-price { display: flex; gap: var(--ps-space-2); }
.filter-price input { width: 100%; min-width: 0; }
.filter-section select { width: 100%; }
.filter-apply { width: 100%; padding: 8px 14px; font-size: 13px; }
.filter-clear {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--ps-fg-muted);
  margin-top: var(--ps-space-2);
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ps-space-2);
  margin-bottom: var(--ps-space-2);
}
.list-total { margin: 0; }
.sort-form { display: flex; align-items: center; gap: var(--ps-space-2); }
.sort-form label { font-size: 12px; color: var(--ps-fg-muted); }
.sort-go { padding: 6px 10px; font-size: 12px; }
/* Sordikast saadab end JS-iga ise ära — siis on nupp üleliigne. */
.js-on .sort-go { display: none; }

/* Tihe tabel: rea kõrgus 40 px, 13 px tekst, zebra + oranž hover. */
.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}
.list-table thead th {
  text-align: left;
  font-family: var(--ps-font-small);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ps-fg-muted);
  padding: 6px var(--ps-space-2);
  border-bottom: 1px solid var(--ps-border-strong);
}
.list-table td {
  padding: 4px var(--ps-space-2);
  border-bottom: 1px solid var(--ps-border);
  vertical-align: middle;
  overflow-wrap: break-word;
}
/* Kood ja nimetus tohivad ka SÕNA SEEST murduda (pikad koodid/nimed ei tohi
   tabelit laiemaks ajada); bränd jm veerud mitte — muidu murtakse „Lemförder". */
.list-table td.col-code, .list-table td.col-name { overflow-wrap: anywhere; }
.list-table tbody tr { height: 40px; }
.list-table tbody tr:nth-child(even) { background: var(--ps-gray-50); }
.list-table tbody tr:hover { background: var(--ps-fiery-50); }
.js-on .list-row[data-row-href] { cursor: pointer; }

.list-code {
  font-family: var(--ps-font-small);
  font-weight: 700;
  color: var(--ps-navy-600);
  text-decoration: none;
}
.list-code:hover { color: var(--ps-primary); text-decoration: underline; }
/* Osalise koodivaste selgitus: MILLISE OEM-/ristviitekoodi kaudu rida leiti. */
.list-code-match {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ps-fg-muted);
}
.list-name { color: var(--ps-fg); font-weight: 500; text-decoration: none; }
.list-name:hover { text-decoration: underline; }
.list-name-clean { display: block; font-size: 11px; color: var(--ps-fg-muted); }
.list-brand-inline { display: none; }
.col-fit { font-size: 12px; color: var(--ps-fg-muted); }
.fit-check {
  display: inline-block;
  background: var(--ps-gray-100);
  color: var(--ps-fg-muted);
  border-radius: var(--ps-radius-sm);
  padding: 0 6px;
  font-size: 11px;
  white-space: nowrap;
}
.col-price { text-align: right; }
.list-price { font-weight: 700; color: var(--ps-navy-600); white-space: nowrap; }
.list-price-net { display: block; font-size: 11px; font-weight: 400; color: var(--ps-fg-muted); white-space: nowrap; }
.list-price-ask { font-size: 12px; font-weight: 600; color: var(--ps-primary); }
.col-buy { text-align: right; }
.list-buy { display: flex; gap: 4px; justify-content: flex-end; }
.list-qty { width: 52px; padding: 4px 6px; font-size: 12px; text-align: right; }

.notfound-block { text-align: center; padding: var(--ps-space-10) var(--ps-space-6); }
.notfound-block h2 { font-size: 18px; margin-bottom: var(--ps-space-2); }
.notfound-block .btn-primary { margin-top: var(--ps-space-5); }

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--ps-space-2);
  margin-top: var(--ps-space-6);
}
.pager-num, .pager-step {
  display: inline-block;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-sm);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-navy-600);
  text-decoration: none;
  background: var(--ps-bg);
}
.pager-num:hover, .pager-step:hover { border-color: var(--ps-border-strong); background: var(--ps-gray-100); }
.pager-num.is-active {
  background: var(--ps-navy-600);
  border-color: var(--ps-navy-600);
  color: var(--ps-fg-on-inverse);
}
.pager-info { text-align: center; margin-top: var(--ps-space-3); }

/* Mobiil: tabel muutub kompaktseteks ridadeks — horisontaalset kerimist
   EI TOHI tekkida (mõõdetud 360 px, e2e/layout.spec.js). */
@media (max-width: 767px) {
  .list-table, .list-table tbody, .list-table tr, .list-table td { display: block; width: 100%; }
  .list-table thead { display: none; }
  .list-table td { border: 0; padding: 1px 0; }
  .list-table tbody tr {
    height: auto;
    padding: var(--ps-space-2) var(--ps-space-2);
    border-bottom: 1px solid var(--ps-border);
  }
  /* NB: `.list-table td` on sama spetsiifilisusega — veeru-reeglid peavad
     olema samuti kahe klassiga, muidu võidab ülalolev `display: block`. */
  .list-table td.col-brand,
  .list-table td.col-fit { display: none; }
  .list-brand-inline { display: inline; font-size: 11px; color: var(--ps-fg-muted); }
  .list-table td.col-stock,
  .list-table td.col-price { display: inline-block; width: auto; }
  .list-table td.col-stock { margin-right: var(--ps-space-3); }
  .list-table td.col-price { text-align: left; }
  .list-price-net { display: inline; margin-left: 6px; }
  .list-table td.col-buy { text-align: left; margin-top: var(--ps-space-2); }
  .list-buy { justify-content: flex-start; }
}

@media (min-width: 1024px) {
  .list-layout { grid-template-columns: 220px minmax(0, 1fr); gap: var(--ps-space-6); }
  .filters-burger { display: none; }
  /* Filter liigub kerimisel kaasa (Indrek 27.08); pikk paneel kerib ise. */
  .search-filters {
    display: block;
    position: sticky;
    top: calc(90px + var(--ps-space-3)); /* päis 56 + müügiriba 34 */
    max-height: calc(100vh - 90px - var(--ps-space-5));
    overflow-y: auto;
  }
  .list-h1 { font-size: 24px; }
}

/* --- Tooteleht /t/{kood}: tabelirida + plokid ----------------------- */
.product-page { padding-top: var(--ps-space-5); padding-bottom: var(--ps-space-10); }
.product-h1 { font-size: 20px; color: var(--ps-navy-600); margin-bottom: var(--ps-space-2); overflow-wrap: anywhere; }
.product-ident {
  font-family: var(--ps-font-small);
  font-size: 12px;
  color: var(--ps-fg-muted);
  margin-bottom: var(--ps-space-2);
  overflow-wrap: anywhere;
}
.badge-sure { background: var(--ps-success-bg); color: var(--ps-success); }
.badge-likely { background: var(--ps-gray-100); color: var(--ps-fg-muted); }
/* Muudud toode (SEO aste 1, T4). */
.badge-sold { background: var(--ps-destructive-bg); color: var(--ps-red-600); }

.product-dup { font-size: 12px; color: var(--ps-fg-muted); }
.product-dup a { color: var(--ps-primary); }

.product-row-table { margin-bottom: var(--ps-space-6); }
.product-row-table tbody tr:hover { background: transparent; }

.product-section { margin-top: var(--ps-space-6); }
.product-section h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: var(--ps-space-3);
}
.product-stockname { font-size: 13px; color: var(--ps-fg-muted); }
.product-stockname span { color: var(--ps-fg); font-weight: 600; overflow-wrap: anywhere; }
.product-description { max-width: 760px; font-size: 13px; }

/* Pildid AINULT siis, kui neid on — platsihoidjat ei ole. */
.product-images {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ps-space-3);
}
.product-images img {
  display: block;
  width: 140px;
  height: 105px;
  object-fit: cover;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-sm);
  background: var(--ps-gray-100);
}

.product-buy {
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  padding: var(--ps-space-4);
  max-width: 420px;
}
.product-price-big {
  font-family: var(--ps-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ps-navy-600);
  margin: 0;
}
.product-price-big small { font-size: 11px; font-weight: 400; color: var(--ps-fg-muted); margin-left: 6px; }
.product-price-ask { font-size: 18px; color: var(--ps-primary); }
.product-price-net { font-size: 12px; color: var(--ps-fg-muted); margin-top: 2px; }
.product-buy .stock { margin-top: var(--ps-space-2); font-size: 13px; }
.product-buy-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ps-space-2);
  margin-top: var(--ps-space-3);
}
.product-qty-label { font-size: 13px; color: var(--ps-fg-muted); }
.product-qty { width: 72px; text-align: right; }
.btn-buy { flex: 1; min-width: 150px; padding: 9px 16px; }
.product-actions { margin-top: var(--ps-space-3); margin-bottom: 0; }
.product-actions .btn-secondary { display: inline-block; padding: 9px 16px; }

.product-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ps-space-2);
  margin-top: var(--ps-space-5);
  font-size: 12px;
}
.share-label { color: var(--ps-fg-muted); }
.share-btn {
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-sm);
  background: var(--ps-bg);
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ps-navy-600);
  text-decoration: none;
  cursor: pointer;
}
.share-btn:hover { border-color: var(--ps-border-strong); background: var(--ps-gray-100); }

.table-scroll { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 5px var(--ps-space-2);
  border-bottom: 1px solid var(--ps-border);
}
.data-table th {
  font-family: var(--ps-font-small);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ps-fg-muted);
  white-space: nowrap;
}
.data-table td.cell-code { font-family: var(--ps-font-small); font-weight: 600; }
.data-table tr:last-child td { border-bottom: 0; }

/* Sobivustabel (tooteleht 25.08, T2): tihe 2-veeruline kokkuvõte; kerib
   vajadusel omas konteineris (.table-scroll ümber, leht ise ei keri). */
.fit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.fit-table th, .fit-table td {
  text-align: left;
  vertical-align: top;
  padding: 6px var(--ps-space-2);
  border-bottom: 1px solid var(--ps-border);
}
.fit-table th {
  width: 200px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ps-gray-600);
  white-space: nowrap;
}
.fit-table tbody tr:nth-child(even) { background: var(--ps-gray-50); }
.fit-table tr:last-child th, .fit-table tr:last-child td { border-bottom: 0; }
/* 'kontrolli' andmed: nähtavad, aga diskreetselt hallid (title selgitab). */
.fit-unchecked { color: var(--ps-gray-400); }

.product-back { margin-top: var(--ps-space-6); font-size: 13px; }

/* --- kassa: korv + transport + makse (DESIGN.md Cart) ---------------- */
/* Üks leht (R6): vasakul kaardid, paremal kleepuv Order Summary.        */

.page-checkout { background: var(--ps-gray-100); }

.checkout-page { padding: var(--ps-space-6) 0 var(--ps-space-16); }
.checkout-back { font-size: 13px; margin-bottom: var(--ps-space-3); }
.checkout-h1 {
  font-family: var(--ps-font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ps-navy-600);
  margin-bottom: var(--ps-space-5);
}
.checkout-count { font-size: 15px; font-weight: 500; color: var(--ps-fg-muted); }

.notice {
  border-radius: var(--ps-radius-lg);
  padding: 10px 14px;
  margin-bottom: var(--ps-space-4);
  font-size: 13px;
}
.notice-ok { background: var(--ps-success-bg); color: var(--ps-green-600); }
.notice-error { background: var(--ps-bg); border: 1px solid var(--ps-destructive); color: var(--ps-red-600); }

.cart-empty {
  background: var(--ps-bg);
  border-radius: var(--ps-radius-xl);
  box-shadow: var(--ps-shadow-lg);
  padding: var(--ps-space-12) var(--ps-space-6);
  text-align: center;
}
.cart-empty-title { font-family: var(--ps-font-display); font-size: 20px; font-weight: 700; color: var(--ps-navy-600); }
.cart-empty-hint { font-size: 14px; color: var(--ps-fg-muted); margin: var(--ps-space-2) 0 var(--ps-space-6); }

.checkout-grid { display: grid; gap: var(--ps-space-6); align-items: start; }
.checkout-main { display: grid; gap: var(--ps-space-4); min-width: 0; }
.checkout-main .card { padding: var(--ps-space-5); }
.card-h {
  font-family: var(--ps-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ps-navy-600);
  margin-bottom: var(--ps-space-4);
}

/* Korvi read */
.cart-rows { list-style: none; margin: 0; padding: 0; }
.cart-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  grid-template-areas: "thumb info remove" "thumb qty line";
  align-items: center;
  gap: var(--ps-space-2) var(--ps-space-3);
  padding: var(--ps-space-3) 0;
  border-bottom: 1px solid var(--ps-border);
}
.cart-row:last-child { border-bottom: 0; }
.cart-thumb { grid-area: thumb; }
.cart-thumb img, .cart-thumb-empty {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-md);
  background: var(--ps-gray-100);
}
.cart-info { grid-area: info; display: block; min-width: 0; }
.cart-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-navy-600);
  text-decoration: none;
}
.cart-name:hover { text-decoration: underline; }
.cart-meta { display: block; font-size: 12px; color: var(--ps-fg-muted); }
.cart-max { display: block; font-size: 12px; font-weight: 600; color: var(--ps-red-600); }
.cart-line { grid-area: line; font-size: 16px; font-weight: 700; color: var(--ps-navy-600); text-align: right; }
.cart-remove {
  grid-area: remove;
  justify-self: end;
  border: 0;
  background: transparent;
  color: var(--ps-fg-subtle);
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
}
.cart-remove:hover { color: var(--ps-destructive); }

.qty-stepper {
  grid-area: qty;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ps-input);
  border-radius: var(--ps-radius-md);
  overflow: hidden;
  width: max-content;
}
.qty-btn {
  border: 0;
  background: var(--ps-bg);
  color: var(--ps-fg);
  width: 30px;
  height: 30px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: none;
}
.js-on .qty-btn { display: block; }
.qty-input {
  width: 52px;
  height: 30px;
  border: 0;
  border-left: 1px solid var(--ps-input);
  border-right: 1px solid var(--ps-input);
  text-align: center;
  font: inherit;
  font-size: 13px;
  color: var(--ps-fg);
  background: var(--ps-bg);
}
.js-on .qty-input { border-left: 0; border-right: 0; width: 40px; }
.cart-update { margin-top: var(--ps-space-4); }

/* Vormiväljad */
.field-grid { display: grid; gap: var(--ps-space-3); }
.field, .field-check { margin: 0 0 var(--ps-space-3); }
.field:last-child, .field-check:last-child { margin-bottom: 0; }
.field label, .field-check label { display: block; font-size: 13px; font-weight: 600; color: var(--ps-fg); margin-bottom: 4px; }
.field label small, .field-check label small { font-weight: 400; color: var(--ps-fg-muted); }
.field input, .field select, .field textarea {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--ps-input);
  border-radius: var(--ps-radius-sm);
  background: var(--ps-bg);
  font: inherit;
  font-size: 13px;
  color: var(--ps-fg);
}
.field textarea { resize: vertical; }
.field-country select { max-width: 220px; }
.field-hint { font-size: 12px; color: var(--ps-fg-muted); margin-top: var(--ps-space-2); }
.field-hint a { margin-right: var(--ps-space-3); }
.field-error { display: block; font-size: 12px; font-weight: 600; color: var(--ps-red-600); margin-top: 4px; }
.field-check label { display: flex; gap: var(--ps-space-2); align-items: flex-start; font-weight: 400; font-size: 13px; }
.field-check input { margin-top: 2px; }

.js-only { display: none; }
.js-on .js-only { display: block; }
.js-on input.js-only { display: block; width: 100%; }

/* Transpordi- ja makseviisi valikud */
.ship-option, .pay-option {
  display: flex;
  align-items: center;
  gap: var(--ps-space-3);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  padding: 10px 12px;
  margin-bottom: var(--ps-space-2);
  font-size: 13px;
  cursor: pointer;
}
.ship-option:hover, .pay-option:hover { border-color: var(--ps-border-strong); }
.ship-name, .pay-name { flex: 1; }
.ship-price { font-weight: 700; color: var(--ps-navy-600); }
.ship-detail { margin-top: var(--ps-space-4); }

/* Tellimuse kokkuvõte */
.checkout-aside { min-width: 0; }
.summary-card { padding: var(--ps-space-5); }
.summary-rows { margin: 0 0 var(--ps-space-3); }
.summary-row { display: flex; justify-content: space-between; gap: var(--ps-space-3); font-size: 13px; padding: 5px 0; }
.summary-row dt { color: var(--ps-fg-muted); }
.summary-row dt small { font-size: 11px; }
.summary-row dd { margin: 0; font-weight: 600; }
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: var(--ps-space-3);
  align-items: baseline;
  border-top: 1px solid var(--ps-border);
  padding-top: var(--ps-space-3);
  font-family: var(--ps-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ps-navy-600);
}
.summary-total span:first-child { font-size: 14px; }
.btn-checkout {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--ps-radius-lg);
  margin-top: var(--ps-space-4);
  white-space: normal;
}
.summary-note { font-size: 11px; color: var(--ps-fg-muted); text-align: center; margin-top: var(--ps-space-3); }

@media (min-width: 640px) {
  .cart-row {
    grid-template-columns: 80px minmax(0, 1fr) auto auto auto;
    grid-template-areas: "thumb info qty line remove";
    gap: var(--ps-space-4);
  }
  .cart-thumb img, .cart-thumb-empty { width: 80px; height: 80px; }
  .cart-line { min-width: 88px; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .checkout-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--ps-space-6); }
  .checkout-aside { position: sticky; top: var(--ps-space-4); }
  .checkout-h1 { font-size: 30px; }
}

/* Peibutusväli (honeypot) päringuvormidel: inimene ei näe ega jõua sinna
   tabulaatoriga, robot täidab — täidetud väli => päringut ei looda. */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* --- ligipääsetavus: kontrastid (WCAG 2.1 AA, Task 12) --------------
   Brändi-oranž --ps-fiery-600 (#E35619) annab valge tekstiga ja valgel
   taustal ainult 3,74:1 — alla nõutud 4,5:1 tavatekstile. Kuna nupu- ja
   lingitekst on 13–14 px (mitte „suur tekst"), tõstame semantilised
   tokenid ühe astme tumedamaks; brändi paletti (--ps-fiery-*) ei muudeta
   ja tokens.css jääb design-allika koopiaks.

     --ps-primary   #B0410F  valge peal 5,82:1 · valgel 5,82:1
     --ps-fg-muted  #525252  valgel 7,81:1 · gray-100 peal 7,04:1  (oli 4,27:1)
     --ps-fg-subtle #737373  valgel 4,74:1                          (oli 2,52:1)
     --ps-success   #006D24  green-50 peal 6,19:1                   (oli 4,26:1)
     --ps-warning   #70250B  yellow-50 peal 10,4:1                  (oli 3,08:1)

   Heledat --ps-fiery-400/500 tohib edasi kasutada TAUSTANA või tumedal
   taustal (keelevaheti navy peal) — seal kontrast ei ole probleem. */
:root {
  --ps-primary: var(--ps-fiery-700);
  --ps-primary-hover: var(--ps-fiery-800);
  --ps-primary-pressed: var(--ps-fiery-900);
  --ps-fg-muted: var(--ps-gray-600);
  --ps-fg-subtle: var(--ps-gray-500);
  --ps-success: var(--ps-green-600);
  --ps-warning: var(--ps-fiery-800);
}

/* --- mobiil (< 640 px): eraldiseisvad CTA-d üle laiuse -------------- */
/* Ainult <p>-s seisvad nupud: otsinguvormide nupud peavad jääma sisendiga
   samale reale (.search-form / .sort-form on flex-read). */
@media (max-width: 639px) {
  p > .btn-primary,
  p > .btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* partstall.ee suunamislingid (Indrek 25.08): disaini tokenid, mitte hoiatus. */
.partstall-box {
  display: block;
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--ps-fiery-50);
  border: 1px solid var(--ps-fiery-100);
  border-radius: 8px;
  color: var(--ps-fiery-800);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.partstall-box:hover { border-color: var(--ps-fiery-300); text-decoration: underline; }
.partstall-more { margin-top: 10px; font-size: 13px; }
.partstall-more a { color: var(--ps-fiery-700); text-decoration: none; }
.partstall-more a:hover { text-decoration: underline; }
.partstall-code-link { margin-top: 8px; font-size: 13px; }
.partstall-code-link a { color: var(--ps-fiery-700); text-decoration: none; }
.partstall-code-link a:hover { text-decoration: underline; }


/* Asendustooted (tooteleht 25.08, T3): kaardirivi „Kui see toode on otsas
   või ei sobi, vaata neid". Tokenid tokens.css-ist. */
.product-substitutes { margin-top: var(--ps-space-6); }
.sub-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--ps-space-3);
}
.sub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--ps-bg);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-md);
  padding: var(--ps-space-2);
}
.sub-card-link { display: block; color: var(--ps-fg); text-decoration: none; }
.sub-card-link:hover .sub-card-name { text-decoration: underline; }
.sub-card-img,
.sub-card-ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--ps-radius-sm);
}
.sub-card-img { display: block; object-fit: cover; }
.sub-card-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ps-gray-100);
  color: var(--ps-fg-subtle);
  font-size: 12px;
}
.sub-card-name { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; }
.sub-card-ident { display: block; font-size: 12px; color: var(--ps-fg-muted); }
.sub-card-price { margin: 0; font-size: 14px; font-weight: 700; }
.sub-card-price small { font-size: 11px; font-weight: 400; color: var(--ps-fg-muted); }
.sub-card-price-ask { font-size: 13px; font-weight: 400; color: var(--ps-fg-muted); }
.sub-card-buy { margin-top: auto; }
.sub-card-buy .btn-add { width: 100%; }
