/* VoltCart base theme — plain CSS, no build step. Logical properties so RTL needs no audit. */
:root {
  --ink: #1d2433; --ink-2: #4a5468; --page: #f2f5f9; --paper: #fff; --line: #dbe2ea;
  --accent: #1f5eff; --accent-ink: #fff; --accent-soft: #e8efff;
  --ok: #138a5a; --ok-soft: #e6f5ee; --warn: #b45309; --warn-soft: #fdf3e6; --bad: #c02929; --bad-soft: #fdecec;
  --r-sm: 6px; --r: 10px; --r-lg: 16px;
  --wrap: 1180px;
  /* Theme hooks: a theme's theme.css overrides any of these and nothing else. */
  --font: Inter, 'VoltCart Sinhala', 'VoltCart Tamil', system-ui, sans-serif; --head-font: var(--font);
  --top-bg: var(--paper); --top-ink: var(--ink); --top-line: var(--line);
  --strip-bg: var(--paper); --strip-ink: var(--ink-2);
  --foot-bg: var(--paper); --foot-ink: var(--ink-2); --foot-head: var(--ink);
  --brand-size: 1.2rem; --brand-weight: 800; --head-weight: 800;
  --btn-r: var(--r); --star: #f2a516;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--page); }
h1, h2, h3, .brand { font-family: var(--head-font); }
:lang(si) body, body:lang(si) { font-family: 'VoltCart Sinhala', Inter, sans-serif; }
:lang(ta) body, body:lang(ta) { font-family: 'VoltCart Tamil', Inter, sans-serif; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { background: var(--top-bg); color: var(--top-ink); border-bottom: 1px solid var(--top-line); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { font-weight: var(--brand-weight); font-size: var(--brand-size); letter-spacing: -.01em; color: var(--top-ink); text-decoration: none; white-space: nowrap; }
.search { position: relative; flex: 1; max-width: 560px; }
.search input { width: 100%; font: inherit; padding: 10px 14px 10px 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--page); }
.search input:focus { background: var(--paper); border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.suggest { position: absolute; inset-inline: 0; top: calc(100% + 6px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(29,36,51,.12); overflow: hidden; display: none; }
.suggest.open { display: block; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a.on { background: var(--page); }
.suggest img, .suggest .ph { width: 40px; height: 40px; object-fit: contain; border-radius: var(--r-sm); background: var(--page); flex: none; }
.suggest .s-price { margin-inline-start: auto; font-weight: 700; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; }
.nav a { color: var(--top-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--accent); }
.cart-link { display: inline-flex; align-items: center; gap: 6px; }
.badge { min-width: 1.4em; height: 1.4em; padding: 0 .35em; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.lang select { font: inherit; font-size: .85rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 6px; background: var(--paper); }

/* Messages */
.flash { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--r); font-weight: 600; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--bad-soft); color: var(--bad); }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; padding: 12px 20px; border-radius: var(--btn-r); border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-wa { background: #128c4a; border-color: #128c4a; color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.err-text { color: var(--bad); font-size: .85rem; margin-top: 4px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }

/* Availability — the one honest signal on every product */
.stock { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; padding: 4px 10px 4px 8px; border-radius: 999px; }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock.in { background: var(--ok-soft); color: var(--ok); }
.warranty-note { margin: 10px 0 0; font-size: .9rem; color: var(--ink-2); }
.stock.low { background: var(--warn-soft); color: var(--warn); }
.stock.out { background: #eef1f5; color: var(--ink-2); }

/* Home */
/* Home slider: scroll-snap track, words over the calm left side of the picture */
.slider { position: relative; margin: 20px 0 8px; border-radius: var(--r-lg); overflow: hidden; background: #0d1b33; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 5 / 2; min-height: 260px; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.slide-copy { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 32px clamp(20px, 5vw, 64px); max-width: min(600px, 62%); }
@media (min-width: 701px) { .slider:has(.sl-arrow) .slide-copy { padding-inline-start: max(76px, clamp(20px, 5vw, 64px)); } }
.slide h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; }
.slide p { margin: 0 0 20px; font-size: clamp(.98rem, 1.4vw, 1.15rem); max-width: 42ch; }
.tone-light { color: #fff; } .tone-light p { color: rgba(255,255,255,.86); }
.tone-dark { color: var(--ink); } .tone-dark p { color: var(--ink-2); }
.btn-light { background: #fff; border-color: #fff; color: var(--ink); }
.btn-light:hover { border-color: #fff; filter: brightness(.95); }
.sl-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); color: var(--ink); display: grid; place-items: center; cursor: pointer; z-index: 2; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.sl-prev { inset-inline-start: 14px; } .sl-next { inset-inline-end: 14px; }
.sl-dots { position: absolute; inset-inline: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.sl-dots button { width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: rgba(255,255,255,.55); cursor: pointer; transition: width .2s; }
.sl-dots button[aria-current="true"] { width: 26px; background: #fff; }
.chips-under { margin: 16px 0 4px; }
@media (max-width: 700px) {
  /* Phones: picture on top, words below it, so a heading never sits on the product */
  .slide { aspect-ratio: auto; min-height: 0; display: flex; flex-direction: column; }
  .slide img { position: static; height: 190px; object-position: 88% 50%; }
  .slide-copy { max-width: 100%; height: auto; padding: 18px 18px 44px; }
  .tone-light .slide-copy { background: #101a2e; }
  .tone-dark .slide-copy { background: #fff; }
  .sl-arrow { display: none; }
  .sl-dots button { background: rgba(127,127,127,.5); }
  .sl-dots button[aria-current="true"] { background: var(--accent); }
}
@media (prefers-reduced-motion: reduce) { .slides { scroll-behavior: auto; } }
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 10px; font-weight: 800; max-width: 18ch; }
.hero p { margin: 0 0 22px; color: var(--ink-2); font-size: 1.1rem; max-width: 52ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.chips a { display: block; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.chips a:hover, .chips a[aria-current="true"] { border-color: var(--accent); color: var(--accent); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; }
.sec-h h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.card:hover { border-color: #b8c3d1; }
.plinth { aspect-ratio: 1; background: var(--paper); display: grid; place-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.plinth img { max-height: 100%; object-fit: contain; }
.plinth .ph { width: 46%; aspect-ratio: 9/16; border-radius: 14px; border: 2px solid var(--line); }
.card-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-brand { font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.card-name { font-weight: 700; line-height: 1.3; }
.card-price { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; margin-top: auto; }
.card-price { white-space: nowrap; }
.card-price small { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }

/* Shop listing */
.shop { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 24px 0 40px; }
.filters h2 { font-size: 1rem; margin: 0 0 8px; }
.filters ul { list-style: none; margin: 0 0 22px; padding: 0; }
.filters li a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; }
.filters li a[aria-current="true"] { color: var(--accent); font-weight: 700; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.pager { display: flex; gap: 8px; justify-content: center; margin: 28px 0 0; flex-wrap: wrap; }
.pager a, .pager span { padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--ink); }
.pager .cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { padding: 48px 20px; text-align: center; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r-lg); }

/* Product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; padding: 28px 0 48px; align-items: start; }
.gallery-main { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); aspect-ratio: 1; display: grid; place-items: center; padding: 28px; }
.gallery-main img { max-height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumbs button { flex: none; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); padding: 6px; cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.crumbs { font-size: .9rem; margin: 0 0 10px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.pdp h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px; }
.price-big { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 0 0 6px; }
.price-was { color: var(--ink-2); text-decoration: line-through; font-size: 1.05rem; margin-inline-start: 10px; font-weight: 600; letter-spacing: 0; }
.opt { margin: 22px 0 0; border: 0; padding: 0; }
.opt legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.opt-vals { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-vals label { position: relative; }
.opt-vals input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt-vals span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); font-weight: 600; }
.opt-vals input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--accent); }
.opt-vals input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt-vals .dim span { color: #9aa4b2; border-style: dashed; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.buy { display: flex; gap: 10px; margin: 26px 0 0; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.qty button { width: 42px; height: 46px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.qty input { width: 48px; text-align: center; border: 0; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy .btn { flex: 1; min-width: 150px; }
.facts { margin: 26px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .95rem; color: var(--ink-2); }
.desc { margin-top: 28px; max-width: 70ch; white-space: pre-line; }

/* Cart and checkout */
.page-h { margin: 28px 0 18px; font-size: 1.8rem; letter-spacing: -.02em; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding-bottom: 48px; }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); align-items: center; }
.line:first-child { border-top: 0; }
.line .plinth { border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.line-name { font-weight: 700; }
.line-total { font-weight: 800; text-align: end; white-space: nowrap; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.sum-row span:last-child { white-space: nowrap; }
.sum-total { font-size: 1.35rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; cursor: pointer; background: var(--paper); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.choice input { margin-top: 4px; accent-color: var(--accent); }
.choice b { display: block; }
.held { background: var(--accent-soft); color: #1640b8; border-radius: var(--r); padding: 10px 14px; font-weight: 600; font-size: .92rem; margin-bottom: 16px; }
.problem { background: var(--bad-soft); color: var(--bad); border-radius: var(--r); padding: 10px 14px; font-weight: 600; margin-bottom: 8px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--ink-2); }
.steps li::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); margin-top: 5px; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.instr { white-space: pre-line; background: var(--page); border-radius: var(--r); padding: 14px; margin: 12px 0; }
.order-ref { font-size: 1.6rem; font-weight: 800; letter-spacing: .02em; }

/* Footer and phone bar */
.foot { border-top: 1px solid var(--line); background: var(--foot-bg); margin-top: 32px; padding: 28px 0 32px; font-size: .92rem; color: var(--foot-ink); }
.foot-in { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.foot a { color: var(--foot-ink); }
.foot-name { color: var(--foot-head); }
.foot-pages { display: flex; flex-direction: column; gap: 4px; }
.bar { display: none; }

@media (max-width: 900px) {
  .shop, .pdp, .two { grid-template-columns: minmax(0, 1fr); }
  .shop { gap: 14px; padding-top: 16px; }
  .fpanel > summary.fpanel-toggle { display: inline-flex !important; }
  .fpanel[open] .fpanel-body { margin-top: 12px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .f-cats { display: none; }
  .pdp { gap: 22px; }
}
@media (max-width: 720px) {
  .top-in { flex-wrap: wrap; gap: 10px; padding-block: 10px; min-height: 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .nav .hide-sm { display: none; }
  body { padding-bottom: 68px; }
  .bar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .bar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--ink-2); text-decoration: none; position: relative; }
  .bar a[aria-current="page"] { color: var(--accent); }
  .bar .badge { position: absolute; top: -4px; inset-inline-start: 55%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-b { padding: 10px 12px 12px; }
  .card-price { font-size: 1.05rem; }
  .line { grid-template-columns: 60px minmax(0, 1fr); }
  .line-total { grid-column: 2; text-align: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Used and refurbished units (phase 9) */
.grade { display: inline-block; align-self: flex-start; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.grade-used_a { background: var(--ok-soft); color: var(--ok); }
.grade-used_c { background: var(--warn-soft); color: var(--warn); }
.used-card .plinth { position: relative; }
.used-card .plinth img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); }
.photo-count { position: absolute; inset-inline-end: 10px; bottom: 10px; background: rgba(29,36,51,.78); color: #fff; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.used-fact { font-size: .88rem; overflow-wrap: anywhere; }
.used-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.used-thumbs img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.used-card form { margin-top: 6px; }
.used-here { margin: 36px 0 12px; }
.used-here h2 { font-size: 1.3rem; margin: 0 0 4px; }
.grades-help { margin: 0 0 18px; padding: 12px 16px; }
.grades-help summary { cursor: pointer; font-weight: 600; }
.grades-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; }
.grades-help dt { font-weight: 600; }
.grades-help dd { margin: 0; color: var(--ink-2); }
@media (max-width: 520px) { .grades-help dl { grid-template-columns: 1fr; } .grades-help dd { margin-bottom: 6px; } }

/* Filters (phase 10) */
.fpanel > summary { list-style: none; }
.fpanel > summary::-webkit-details-marker { display: none; }
.fpanel-toggle { display: none !important; gap: 8px; }
.f-group { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.f-group legend { font-weight: 700; font-size: 1rem; margin-bottom: 6px; padding: 0; }
.f-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.f-check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.f-check .swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; flex: none; }
.f-range { display: flex; align-items: center; gap: 6px; }
.f-range input { width: 100%; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.f-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.f-chips a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 600; font-size: .9rem; }
.f-chips a.f-clear { background: transparent; color: var(--ink-2); text-decoration: underline; padding-inline: 4px; }
.f-chips #f-count { margin-inline-start: auto; font-size: .9rem; }

/* Specifications and compare (phase 10) */
.pdp-more { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin: 28px 0 8px; }
.spec-table h2 { font-size: 1.3rem; margin: 0 0 10px; }
.spec-table table, .c-table { border-collapse: collapse; width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.spec-table th, .spec-table td { text-align: start; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.spec-table tr:first-child th, .spec-table tr:first-child td { border-top: 0; }
.spec-table th { width: 40%; color: var(--ink-2); font-weight: 600; }
.compare-box { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.c-tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 14px; }
.c-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg); }
.c-table { min-width: calc(9rem + var(--cols) * 11rem); table-layout: fixed; }
.c-table th, .c-table td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.c-table thead td, .c-table thead th { border-top: 0; }
.c-table tbody th { width: 9rem; color: var(--ink-2); font-weight: 600; position: sticky; inset-inline-start: 0; background: var(--paper); }
.c-table tr.differs td { background: var(--accent-soft); }
.c-head { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; }
.c-head .plinth { border: 1px solid var(--line); border-radius: var(--r); padding: 8px; }
.c-remove { margin-top: 8px; font: inherit; font-size: .85rem; background: none; border: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; padding: 0; }
.c-price { font-weight: 800; }
@media (max-width: 720px) { .pdp-more { grid-template-columns: minmax(0, 1fr); } }
.f-long { max-height: 15.5rem; overflow-y: auto; padding-inline-end: 6px; border-bottom: 1px solid var(--line); }

/* Coupons and promotions (phase 12) */
.promo-row { color: var(--ok); }
.coupon { margin: 12px 0; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.coupon-on { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 12px; border-radius: var(--r); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; }

/* Stacked header, announcement line and category strip (used by themes that choose them in their layout) */
.announce { background: var(--accent); color: var(--accent-ink); font-size: .85rem; font-weight: 600; }
.announce .wrap { display: flex; justify-content: center; gap: 18px; padding-block: 6px; flex-wrap: wrap; text-align: center; }
.announce a { color: inherit; }
.top-stack { display: grid; gap: 10px; padding-block: 12px; }
.top-stack .brand { justify-self: center; }
.top-stack .top-row { display: flex; align-items: center; gap: 20px; }
.catstrip { background: var(--strip-bg); border-bottom: 1px solid var(--line); }
.catstrip .wrap { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding-block: 10px; }
.catstrip a { color: var(--strip-ink); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.catstrip a:hover, .catstrip a[aria-current="page"] { color: var(--accent); }
@media (max-width: 760px) { .top-stack .top-row { gap: 12px; } }

/* Content pages */
.content-page { max-width: 760px; margin: 24px auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px clamp(16px, 4vw, 40px); }
.content-page h1 { font-weight: var(--head-weight); margin-top: 0; }
.prose { line-height: 1.7; }
.prose h2, .prose h3 { margin: 1.4em 0 .5em; line-height: 1.3; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: start; }
.prose blockquote { margin: 1em 0; padding-inline-start: 14px; border-inline-start: 3px solid var(--line); color: var(--ink-2); }

/* Reviews */
.stars { --size: 1rem; display: inline-block; font-size: var(--size); line-height: 1; letter-spacing: 2px; }
.stars::before { content: '★★★★★'; background: linear-gradient(90deg, var(--star) calc(var(--r, 0) / 5 * 100%), var(--line) calc(var(--r, 0) / 5 * 100%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[dir="rtl"] .stars::before { background: linear-gradient(270deg, var(--star) calc(var(--r, 0) / 5 * 100%), var(--line) calc(var(--r, 0) / 5 * 100%)); -webkit-background-clip: text; background-clip: text; }
.rating-line { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; font-size: .9rem; margin: -4px 0 10px; }
.reviews { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 24px 0; }
.reviews h2 { margin-top: 0; }
.rv-summary { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; margin-bottom: 16px; }
.rv-avg { display: grid; gap: 4px; justify-items: start; }
.rv-avg strong { font-size: 2.2rem; line-height: 1; }
.rv-bars { margin: 0; display: grid; gap: 4px; min-width: min(320px, 100%); }
.rv-bars div { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; gap: 10px; font-size: .85rem; }
.rv-bars dt { color: var(--ink-2); }
.rv-bars dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.bar-track { flex: 1; height: 8px; border-radius: 999px; background: var(--page); overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--star); }
.rv-list { list-style: none; margin: 0; padding: 0; }
.rv { border-top: 1px solid var(--line); padding: 14px 0; }
.rv-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rv-body { margin: 6px 0; white-space: pre-line; }
.rv-by { font-size: .85rem; margin: 0; }
.rv-verified { color: var(--ok); font-weight: 600; }
.rv-reply { margin-top: 8px; padding: 10px 12px; background: var(--page); border-radius: var(--r); font-size: .92rem; }
.rv-write { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.rate-pick { border: 0; padding: 0; margin: 0 0 12px; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rate-pick legend { font-weight: 600; font-size: .9rem; margin-bottom: 4px; padding: 0; }
.rate-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-pick label { font-size: 1.8rem; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; }
.rate-pick input:checked ~ label, .rate-pick label:hover, .rate-pick label:hover ~ label { color: var(--star); }
.rate-pick input:focus-visible + label { outline: 3px solid var(--accent); border-radius: 4px; }
.field-err { color: var(--bad); font-size: .88rem; margin: -8px 0 12px; }
