/* ============================================================
   eterniit.com — Product Page
   Vanilla CSS, ~production-ready
   ============================================================ */

:root {
  /* Palette */
  --bg:           #ffffff;
  --bg-soft:      #f6f7f9;
  --bg-row:      #fafbfc;
  --line:         #e3e6ea;
  --line-strong:  #cdd2d9;
  --ink:          #1a1d21;
  --ink-2:        #3a4048;
  --ink-3:        #5b626c;
  --muted:        #828a94;

  --accent:       #2c5e3f;   /* forest green */
  --accent-2:     #234c33;
  --accent-soft:  #e6ece8;

  --sale:         #c1352d;   /* red — only sale/alerts */
  --sale-soft:    #fbecea;
  --save:         #1f7a4d;   /* green — savings, best price */
  --save-soft:    #e6f3ec;
  --warn:         #c3760f;   /* orange — low stock / urgency */
  --warn-soft:    #fbf0dc;

  --star:         #d4a300;

  /* Type */
  --font-display: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;

  /* Radii */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 14px;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(20, 24, 30, 0.04), 0 1px 1px rgba(20, 24, 30, 0.03);
  --sh-2: 0 4px 14px rgba(20, 24, 30, 0.06), 0 1px 2px rgba(20, 24, 30, 0.04);
  --sh-3: 0 10px 30px rgba(20, 24, 30, 0.10);

  /* Layout */
  --max:    1240px;
  --header-h: 68px;
}
@media (max-width: 640px) {
  :root { --header-h: 56px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Container */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--s-6);
}
@media (max-width: 640px) {
  .container { padding: 0 var(--s-4); }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  min-height: var(--header-h);
}
.site-header .container {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-5);
  padding-top: var(--s-2);
  padding-bottom: var(--s-2);
}
.site-header .js-mobile-nav {
  width: 40px; height: 40px;
  border-radius: var(--r-2);
  display: none;
  align-items: center; justify-content: center;
  color: var(--ink-2);
  flex-shrink: 0;
}
.site-header .js-mobile-nav:hover { background: var(--bg-soft); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-width: 0;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 6px;
  position: relative;
  flex-shrink: 0;
}
.logo-mark::before, .logo-mark::after {
  content: ""; position: absolute; left: 5px; right: 5px; height: 2px;
  background: rgba(255,255,255,0.85); border-radius: 1px;
}
.logo-mark::before { top: 9px; }
.logo-mark::after { top: 17px; }

.nav {
  display: flex;
  gap: var(--s-5);
  justify-content: center;
  align-items: center;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}
.nav a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); text-decoration: none; border-color: var(--line-strong); }
.nav a.active { color: var(--accent); border-color: var(--accent); }

.header-right {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-shrink: 0;
}
.header-right .lang { font-size: 13px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  height: 40px;
  padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink);
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg-soft); }
.cart-btn { border-color: var(--line); }
.cart-count {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* WP custom-logo: clamp to header — uploaded logos can be any size */
.logo .custom-logo-link { display: inline-flex; align-items: center; height: auto; }
.logo .custom-logo {
  max-height: 36px;
  width: auto;
  max-width: clamp(100px, 24vw, 180px);
  object-fit: contain;
  display: block;
}

@media (max-width: 1100px) {
  /* Tighter nav gap to keep everything on one row at midsize widths. */
  .nav { gap: var(--s-4); }
  .site-header .container { gap: var(--s-4); }
}
@media (max-width: 1024px) {
  /* Hide language chip when nav menu is competing for header space. */
  .header-right .lang { display: none; }
}
@media (max-width: 960px) {
  /* Switch to hamburger drawer before nav links start eliding. */
  .nav { display: none; }
  .site-header .container { grid-template-columns: auto 1fr auto; }
  .site-header .js-mobile-nav { display: inline-flex; }
}
@media (max-width: 640px) {
  /* Compact cart button: keep icon + count, hide "Ostukorv" label. */
  .cart-btn > span:not(.cart-count) { display: none; }
  .icon-btn { padding: 0 10px; height: 36px; }
  .header-right { gap: var(--s-2); }
  .site-header .container { gap: var(--s-3); }
  .logo { font-size: 16px; }
  .logo-mark { width: 24px; height: 24px; }
  .logo-mark::before { top: 7px; }
  .logo-mark::after { top: 14px; }
  .logo .custom-logo { max-height: 30px; max-width: 140px; }
  .site-header .js-mobile-nav { width: 36px; height: 36px; }
}
@media (max-width: 380px) {
  /* Last-resort: hide ".com" suffix so tiny phones never wrap the logo. */
  .logo .logo-dot { display: none; }
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: var(--s-5) 0 var(--s-2);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--line-strong); margin: 0 2px; }
.breadcrumb li[aria-current] { color: var(--ink-2); }

/* ============================================================
   MAIN PRODUCT SECTION
   Scoped to `section.product` so it doesn't collide with WC's
   `<div class="product …">` wrapper (wc_product_class output).
   ============================================================ */
section.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--s-9);
  /* Vertical-only — horizontal padding comes from the .container class so
     the section keeps its side gutters on mobile. */
  padding-top: var(--s-5);
  padding-bottom: var(--s-9);
  align-items: start;
}

/* -- Gallery -- */
.gallery { position: sticky; top: calc(var(--header-h) + 16px); width: 100%; min-width: 0; }
.gallery-main {
  position: relative;
  display: block;
  width: 100%;
  background: var(--bg-soft);
  border-radius: var(--r-3);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-main .slot {
  position: absolute; inset: 0;
  transition: transform 0.5s ease;
}
.gallery-main:hover .slot { transform: scale(1.12); }

/* Photo placeholders — striped, monospace label */
.photo-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: rgba(20,24,30,0.55);
  letter-spacing: 0.04em;
  background-color: var(--ph-bg, #e9edf2);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0 14px,
      rgba(255,255,255,0.5) 14px 15px
    );
}
.photo-ph span {
  background: rgba(255,255,255,0.85);
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.06);
}

.gallery-badge {
  position: absolute;
  top: var(--s-5); left: -6px;
  background: var(--sale);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px 6px 14px;
  border-radius: 0 4px 4px 0;
  letter-spacing: 0.04em;
  z-index: 2;
  box-shadow: 0 4px 8px rgba(193, 53, 45, 0.25);
}
.gallery-badge::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 0;
  border-top: 6px solid #7d1a14;
  border-left: 6px solid transparent;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-soft);
  border-radius: var(--r-2);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s;
}
.thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.thumb .photo-ph { font-size: 9px; }

/* -- Purchase column -- */
.purchase { display: flex; flex-direction: column; gap: var(--s-5); }

.product-title {
  font-size: 30px;
  letter-spacing: -0.015em;
  margin: 0;
}
.sku-line {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0.02em;
}

.rating-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
}
.stars { display: inline-flex; gap: 1px; color: var(--star); font-size: 16px; line-height: 1; }
.stars .off { color: var(--line-strong); }
.rating-row a { color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--line-strong); }
.rating-row .stock-pill {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--save-soft);
  color: var(--save);
}
.stock-pill.low { background: var(--warn-soft); color: var(--warn); }
.stock-pill .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
}

/* Price block */
.price-block {
  display: flex; flex-direction: column; gap: 6px;
  padding: var(--s-5) 0 var(--s-4);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price-row { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.price-now {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--sale);
  line-height: 1;
  letter-spacing: -0.02em;
}
.price-was {
  font-size: 16px;
  color: var(--muted);
  text-decoration: line-through;
}
.price-unit { font-size: 14px; color: var(--ink-3); }
.savings-chip {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--save-soft);
  color: var(--save);
  font-weight: 600;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
}
/* Pallet pricing card */
.pallet-card {
  margin-top: 4px;
  background: var(--bg-soft);
  border-radius: var(--r-3);
  padding: var(--s-3) var(--s-4);
  display: flex; flex-direction: column; gap: 8px;
}
.pallet-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.pallet-ico {
  width: 26px; height: 26px;
  border-radius: var(--r-1);
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.pallet-title b { color: var(--ink); font-weight: 600; }
.pallet-sub { color: var(--muted); font-size: 12px; }
.pallet-prices {
  display: flex; flex-direction: column; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.pallet-line {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 13px;
  color: var(--ink-2);
}
.pallet-line b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.pallet-line.muted { color: var(--muted); }
.pallet-line.muted s { font-size: 13px; }
.pallet-sale { color: var(--sale) !important; }
.pallet-line.save {
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.pallet-line.save span,
.pallet-line.save b { color: var(--save); }
.pallet-line.save b { font-size: 15px; }

/* Variants */
.option-block { display: flex; flex-direction: column; gap: var(--s-3); }
.option-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  display: flex; align-items: baseline; gap: 8px;
}
.option-label .value { color: var(--ink-3); font-weight: 400; }

.swatches { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.swatch {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.swatch:hover { border-color: var(--line-strong); }
.swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  color: var(--ink);
}
.swatch .chip {
  width: 22px; height: 22px;
  border-radius: var(--r-1);
  border: 1px solid rgba(0,0,0,0.1);
  background: var(--sw, #ddd);
}

/* Qty + ATC row */
.cart-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  align-items: stretch;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  background: #fff;
  height: 52px;
  overflow: hidden;
}
.qty button {
  width: 42px; height: 100%;
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--ink-2);
  transition: background 0.15s;
}
.qty button:hover:not(:disabled) { background: var(--bg-soft); }
.qty button:disabled { color: var(--line-strong); cursor: not-allowed; }
.qty input {
  width: 48px;
  text-align: center;
  border: 0;
  background: transparent;
  font: 600 16px var(--font-body);
  color: var(--ink);
  transition: background 0.2s;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty.flash input { background: var(--accent-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px;
  border: 0;
  border-radius: var(--r-2);
  padding: 0 var(--s-5);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s, transform 0.05s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.01em;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary.pulse { animation: pulse 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }

#atcBtn { padding: 0 var(--s-4); }
.atc-label { font-weight: 600; }
.atc-divider {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.28);
  margin: 0 4px;
}
.atc-total {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
#atcBtn.flash .atc-total {
  animation: atcFlash 0.45s ease-out;
}
@keyframes atcFlash {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); color: #fff; }
  100% { transform: scale(1); }
}
@keyframes pulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(0.97); }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.btn-secondary {
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink-2);
}
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--line-strong); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  padding: 0;
  height: auto;
}
.btn-ghost:hover { color: var(--accent-2); text-decoration: underline; }

.viewers-line {
  font-size: 12px;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 6px;
}
.viewers-line .pulse-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--sale);
  position: relative;
  flex-shrink: 0;
}
.viewers-line .pulse-dot::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 999px; background: var(--sale);
  animation: ripple 1.6s ease-out infinite;
}
@keyframes ripple {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(3.2); opacity: 0;    }
}

/* Trust badges */
.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.trust {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: var(--s-3) var(--s-3);
  background: var(--bg-soft);
  border-radius: var(--r-2);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.3;
  opacity: 0;
  transform: translateY(6px);
  animation: trustIn 0.45s ease-out forwards;
}
.trust .ico {
  width: 28px; height: 28px;
  border-radius: var(--r-1);
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.trust b { font-weight: 600; color: var(--ink); display: block; }
.trust:nth-child(1) { animation-delay: 0.05s; }
.trust:nth-child(2) { animation-delay: 0.15s; }
.trust:nth-child(3) { animation-delay: 0.25s; }
.trust:nth-child(4) { animation-delay: 0.35s; }
@keyframes trustIn {
  to { opacity: 1; transform: translateY(0); }
}

.short-desc {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   PRICE COMPARISON WIDGET
   ============================================================ */
.section { padding: var(--s-9) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}
.section-head h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
}
.section-head .lede {
  color: var(--ink-3);
  font-size: 14px;
  margin-top: 4px;
}
.section-head .head-meta { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.head-meta button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  height: 32px; padding: 0 10px;
  color: var(--ink-2);
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
.head-meta button:hover { background: var(--bg-soft); }
.head-meta button .spin { transition: transform 0.3s; }
.head-meta button.loading .spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.compare-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-3);
}
.compare-card {
  position: relative;
  background: var(--bg-soft);
  border-radius: var(--r-3);
  padding: var(--s-4);
  display: flex; flex-direction: column;
  gap: 6px;
  min-height: 168px;
  transition: transform 0.15s;
}
.compare-card.you {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-soft) 40%);
}
.compare-card.you.best {
  background: linear-gradient(180deg, var(--save-soft) 0%, var(--bg-soft) 50%);
}
.compare-card .tag {
  position: absolute; top: -10px; left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-transform: uppercase;
}
.compare-card.best .tag { background: var(--save); }
.compare-card.you.best .tag { background: var(--save); }
.compare-card.you .tag { background: var(--accent); }

.compare-head {
  display: flex; align-items: center; gap: 8px;
}
.fav {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.compare-site { font-size: 13px; font-weight: 600; color: var(--ink); }
.compare-site small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }

.compare-price {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: auto;
  line-height: 1.05;
}
.compare-price small { font-size: 12px; color: var(--muted); font-weight: 400; }
.compare-price.unavail { color: var(--muted); font-size: 18px; font-weight: 500; font-family: var(--font-body); letter-spacing: 0; }

.compare-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.compare-foot a { color: var(--accent); font-weight: 600; }
.compare-foot .delta {
  font-size: 11px; font-weight: 600;
  padding: 2px 6px; border-radius: var(--r-1);
}
.delta.higher { background: var(--sale-soft); color: var(--sale); }
.delta.lower  { background: var(--save-soft); color: var(--save); }
.delta.same   { background: var(--bg-soft); color: var(--muted); }

.checked-line {
  margin-top: var(--s-4);
  font-size: 12px;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.checked-line .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--save); }

/* Skeleton */
.compare-grid.loading .compare-card { border-color: var(--line); background: #fff; }
.compare-grid.loading .compare-card .fav,
.compare-grid.loading .compare-card .compare-site,
.compare-grid.loading .compare-card .compare-price,
.compare-grid.loading .compare-card .compare-foot { visibility: hidden; }
.compare-grid.loading .compare-card::after {
  content: "";
  position: absolute; inset: var(--s-4);
  background:
    linear-gradient(var(--bg-soft), var(--bg-soft)) top left / 60% 16px no-repeat,
    linear-gradient(var(--bg-soft), var(--bg-soft)) 0 28px / 40% 10px no-repeat,
    linear-gradient(var(--bg-soft), var(--bg-soft)) 0 80% / 70% 26px no-repeat,
    linear-gradient(var(--bg-soft), var(--bg-soft)) 0 100% / 50% 14px no-repeat;
  border-radius: var(--r-2);
}
.compare-grid.loading .compare-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  z-index: 1;
  border-radius: var(--r-3);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   FITTING PRODUCTS SET LIST
   ============================================================ */
.fit-wrap {
  background: var(--bg-soft);
  border-radius: var(--r-3);
  overflow: hidden;
}
.fit-row {
  display: grid;
  grid-template-columns: 36px 60px 1fr auto auto auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.fit-row:first-child { border-top: 0; }
.fit-row:nth-child(odd) { background: var(--bg-row); }
.fit-row:hover { background: var(--accent-soft); }

.fit-check {
  appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-1);
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.fit-check:hover { border-color: var(--accent); }
.fit-check:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.fit-check:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.fit-thumb {
  position: relative;
  width: 60px; height: 60px;
  background: var(--bg-soft);
  border-radius: var(--r-2);
  overflow: hidden;
  flex-shrink: 0;
}
.fit-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fit-badge {
  position: absolute;
  top: 0; left: 0;
  z-index: 2;
  background: var(--sale);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.02em;
  padding: 2px 5px;
  border-radius: 0 0 4px 0;
  line-height: 1.1;
}
.fit-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fit-name { font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.fit-name:hover { color: var(--accent); text-decoration: none; }
.fit-sku  { font-size: 11px; font-family: ui-monospace, Menlo, monospace; color: var(--muted); }

.fit-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  font-size: 13px;
  color: var(--ink-3);
  text-align: right;
  min-width: 84px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.fit-price .fit-was {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
}
.fit-price .fit-now {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}
.fit-row.is-sale .fit-price .fit-now { color: var(--sale); }
.fit-price .fit-unit { font-size: 11px; color: var(--muted); }
.fit-price b { color: var(--ink); font-weight: 600; font-size: 14px; }

.fit-qty {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  background: #fff;
  height: 36px; overflow: hidden;
}
.fit-qty button { width: 30px; height: 100%; background: transparent; border: 0; color: var(--ink-2); font-size: 14px; }
.fit-qty button:hover:not(:disabled) { background: var(--bg-soft); }
.fit-qty button:disabled { color: var(--line-strong); cursor: not-allowed; }
.fit-qty input {
  width: 38px; text-align: center; border: 0; background: transparent;
  font: 600 14px var(--font-body); color: var(--ink);
  -moz-appearance: textfield;
}
.fit-qty input::-webkit-outer-spin-button,
.fit-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fit-qty.flash input { background: var(--accent-soft); }

.fit-total {
  font-size: 14px; font-weight: 700; color: var(--ink);
  text-align: right;
  min-width: 80px;
  font-variant-numeric: tabular-nums;
}

/* unchecked rows: keep full visual weight (no fade) — JS still toggles
   the .disabled class but the totals zero out and that's enough to signal
   the row isn't being added to cart. */

.fit-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  background: var(--ink);
  color: #fff;
  gap: var(--s-4);
}
.fit-foot .summary { font-size: 14px; color: rgba(255,255,255,0.7); }
.fit-foot .summary b { color: #fff; font-weight: 600; }
.fit-foot .summary .total {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  margin-left: 6px;
}
.fit-foot .btn-add-all {
  background: #fff;
  color: var(--ink);
  height: 42px;
  padding: 0 var(--s-5);
  border-radius: var(--r-2);
  font-weight: 600;
  font-size: 14px;
  border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.15s, color 0.15s;
}
.fit-foot .btn-add-all:hover { background: var(--accent); color: #fff; }
.fit-foot .btn-add-all:disabled { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); cursor: not-allowed; }

/* ============================================================
   TABS
   ============================================================ */
.tabs-bar {
  position: relative;
  display: flex;
  gap: var(--s-6);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-6);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-bar::-webkit-scrollbar { display: none; }
.tab {
  background: transparent;
  border: 0;
  padding: var(--s-4) 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  position: relative;
  transition: color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); }
.tabs-bar .indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  transition: left 0.28s cubic-bezier(0.4, 0.0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: tabIn 0.25s ease-out; }
@keyframes tabIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);  }
}

.prose { color: var(--ink-2); max-width: 720px; line-height: 1.65; }
.prose p { margin: 0 0 var(--s-4); }
.prose h3 { font-size: 18px; margin: var(--s-5) 0 var(--s-3); color: var(--ink); }
.prose .inline-photo {
  margin: var(--s-5) 0;
  aspect-ratio: 16/9;
  background: var(--bg-soft);
  border-radius: var(--r-3);
  overflow: hidden;
}

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; max-width: 720px; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:nth-child(even) { background: var(--bg-row); }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 12px var(--s-4);
  font-size: 14px;
  vertical-align: top;
}
.spec-table th { font-weight: 500; color: var(--ink-3); width: 40%; }
.spec-table td { color: var(--ink); font-weight: 500; }

/* Prose tables — comparison/data tables inside .prose (legal pages,
   blog articles). Elementor-migrated content emits bare <table> with
   no class, so style the element directly. */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-5) 0;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.prose table thead {
  background: var(--accent-soft);
}
.prose table thead th {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.prose table th,
.prose table td {
  text-align: left;
  padding: 10px var(--s-4);
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}
.prose table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--ink-2);
}
.prose table tbody tr:nth-child(even) td {
  background: var(--bg-row);
}
.prose table tbody tr:last-child th,
.prose table tbody tr:last-child td { border-bottom: 0; }
/* Mobile: let wide comparison tables scroll horizontally inside the
   prose column instead of pushing the page wide. Block display keeps
   <thead>/<tbody> stacked-as-rows but allows overflow-x. */
@media (max-width: 640px) {
  .prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 13px;
  }
  .prose table th,
  .prose table td { padding: 8px 12px; }
}

/* Install */
.install-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: start; }
.install-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.install-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: var(--s-4);
  min-height: 28px;
  color: var(--ink-2);
}
.install-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
}
.install-steps li b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

.pdf-card {
  border-radius: var(--r-3);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
  background: var(--bg-soft);
}
.pdf-card .ico-pdf {
  width: 42px; height: 42px;
  border-radius: var(--r-2);
  background: var(--sale-soft); color: var(--sale);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; letter-spacing: 0.05em;
}
.pdf-card h4 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0; }
.pdf-card .meta { font-size: 12px; color: var(--muted); }
.pdf-card a { font-weight: 600; }

/* Reviews */
.reviews-summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-7);
  align-items: center;
  padding: var(--s-5);
  background: var(--bg-soft);
  border-radius: var(--r-3);
  margin-bottom: var(--s-6);
}
.rating-big { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rating-big .num {
  font-family: var(--font-display);
  font-size: 48px; font-weight: 700; line-height: 1;
}
.rating-big .stars { font-size: 18px; }
.rating-big small { color: var(--muted); font-size: 12px; }

.rating-bars { display: flex; flex-direction: column; gap: 6px; }
.rating-bar { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.rating-bar .track { height: 8px; background: #fff; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.rating-bar .fill { height: 100%; background: var(--star); border-radius: 999px; transition: width 0.6s ease-out; }
.rating-bar .count { text-align: right; color: var(--muted); }

.reviews-list { display: flex; flex-direction: column; gap: var(--s-5); margin-bottom: var(--s-5); }
.review {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line);
}
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: 8px; flex-wrap: wrap; }
.avatar {
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.review .name { font-weight: 600; }
.review .date { font-size: 12px; color: var(--muted); }
.verified {
  font-size: 11px;
  background: var(--save-soft);
  color: var(--save);
  padding: 2px 8px; border-radius: 999px;
  font-weight: 600;
}
.review p { margin: 0; color: var(--ink-2); }
.review .stars { font-size: 13px; margin-bottom: 4px; }

/* Related */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
.product-card {
  background: var(--bg-soft);
  border-radius: var(--r-3);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.15s;
}
.product-card:hover { transform: translateY(-2px); }
.product-card .img {
  aspect-ratio: 1;
  background: var(--bg-soft);
  overflow: hidden;
}
.product-card .img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card .body {
  padding: var(--s-3) var(--s-4) var(--s-4);
  display: flex; flex-direction: column; gap: 4px;
}
.product-card .cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.product-card .name { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.product-card .price { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-top: 6px; }
.product-card .price small { font-size: 12px; color: var(--muted); font-weight: 400; }
.product-card .quick {
  margin-top: var(--s-3);
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px;
  background: #fff;
  border-radius: var(--r-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.product-card .quick:hover { background: var(--accent); color: #fff; }

/* ============================================================
   STICKY MOBILE BOTTOM BAR
   ============================================================ */
.mobile-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px var(--s-4);
  display: none;
  align-items: center;
  gap: var(--s-3);
  z-index: 40;
  transform: translateY(110%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.06);
}
.mobile-bar.visible { transform: translateY(0); }
.mobile-bar .mb-info { flex: 1; min-width: 0; }
.mobile-bar .mb-name { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-bar .mb-price { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--sale); }
.mobile-bar .btn { height: 44px; padding: 0 var(--s-5); font-size: 14px; }

/* Toast */
.toast {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  transform: translate(-50%, -120%);
  background: var(--ink);
  color: #fff;
  padding: 12px var(--s-4) 12px var(--s-3);
  border-radius: var(--r-3);
  font-size: 14px;
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--sh-3);
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  min-width: 280px;
  max-width: 90vw;
}
.toast.visible { transform: translate(-50%, 0); }
.toast .check {
  width: 24px; height: 24px;
  background: var(--save);
  color: #fff;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.toast a { color: #fff; text-decoration: underline; margin-left: auto; font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: var(--s-9);
  padding: var(--s-8) 0 var(--s-7);
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s-7);
  margin-bottom: var(--s-7);
}
.footer-grid h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin: 0 0 var(--s-3);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--ink-3); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
  display: flex; justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.footer-legal a { color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: var(--accent); text-decoration: underline; }

/* ============================================================
   INFO SPLIT — Kirjeldus + Omadused side-by-side
   ============================================================ */
.info-split { padding-top: var(--s-7); padding-bottom: var(--s-7); }
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  align-items: start;
}
.info-col { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.info-col-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.info-col-head h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
}
.info-col-meta {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.info-col .prose { max-width: none; }
.info-col .spec-table { max-width: none; }
.info-col .spec-table th { width: 50%; }

@media (max-width: 900px) {
  .info-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

/* ============================================================
   TWEAK-DRIVEN VARIANTS
   ============================================================ */
/* Density */
body[data-density="compact"] .section { padding: var(--s-7) 0; }
body[data-density="compact"] section.product { gap: var(--s-7); padding-bottom: var(--s-7); }
body[data-density="comfy"]   .section { padding: var(--s-10) 0; }
body[data-density="comfy"]   section.product { gap: var(--s-10); padding-bottom: var(--s-10); }

/* Hide sections via tweaks */
body[data-show-compare="0"] #priceCompare,
body[data-show-fitting="0"] #fitting,
body[data-show-related="0"] #related,
body[data-show-viewers="0"] .viewers-line,
body[data-show-urgency="0"] .gallery-badge,
body[data-show-mobilebar="0"] .mobile-bar { display: none !important; }

/* Sale badge variants */
body[data-badge="ribbon"] .gallery-badge {
  top: var(--s-5); left: -6px;
  border-radius: 0 4px 4px 0;
  padding: 6px 12px 6px 14px;
  box-shadow: 0 4px 8px rgba(193, 53, 45, 0.25);
}
body[data-badge="circle"] .gallery-badge {
  top: var(--s-4); left: auto; right: var(--s-4);
  width: 56px; height: 56px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  padding: 0;
}
@media (max-width: 1024px) {
  section.product {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-7);
  }
  .compare-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
  .install-row { grid-template-columns: 1fr; }
  /* Half-width purchase column can't fit 4 trust cards — go 2-up. */
  .trust-row  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  section.product {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding-bottom: var(--s-7);
  }
  .gallery { position: static; }
  .product-title { font-size: 24px; }
  .price-now { font-size: 32px; }
  .compare-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .reviews-summary { grid-template-columns: 1fr; gap: var(--s-4); }

  .fit-row {
    grid-template-columns: 24px 50px 1fr;
    grid-template-rows: auto auto;
    column-gap: var(--s-3);
    row-gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
  }
  .fit-thumb { width: 50px; height: 50px; }
  .fit-price { grid-column: 2 / 4; text-align: left; min-width: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px var(--s-2); align-items: baseline; }
  .fit-price .fit-was,
  .fit-price .fit-now,
  .fit-price .fit-unit { line-height: 1.2; }
  .fit-qty   { grid-column: 2 / 3; }
  .fit-total { grid-column: 3 / 4; text-align: right; align-self: center; }
  .fit-foot  { flex-direction: column; align-items: stretch; gap: var(--s-3); }
  .fit-foot .btn-add-all { width: 100%; }

  .mobile-bar { display: flex; }
  body { padding-bottom: 72px; }

  .section { padding: var(--s-7) 0; }
}
@media (max-width: 480px) {
  .compare-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

/* Print friendliness */
@media print {
  .site-header, .mobile-bar, .toast { display: none; }
}

/* ============================================================
   WordPress / WooCommerce overrides — minimum needed to make WC's
   own output drop into Design much's layout. No new tokens or
   visual rules above what's already defined.
   ============================================================ */

/* DM Sans @font-face — preloaded in <head>, declared inline so
   styles.css can stand alone if needed. */
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 500;
  font-display: swap;
  src: url("../fonts/dm-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 700;
  font-display: swap;
  src: url("../fonts/dm-sans-700.woff2") format("woff2");
}

/* ============================================================
   LEGAL PAGE TEMPLATE (page-legal.php)
   Sticky TOC ("Sisukord") on the left, prose content on the right.
   ============================================================ */
.legal-section { padding-top: 0; }

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--s-8);
  padding: var(--s-3) 0 var(--s-9);
  align-items: start;
}
.legal-layout--single { grid-template-columns: minmax(0, 1fr); }

.legal-aside {
  position: sticky;
  top: calc(var(--header-h) + var(--s-5));
  align-self: start;
  font-size: 14px;
  max-height: calc(100vh - var(--header-h) - var(--s-6));
  overflow: auto;
}
.legal-toc-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s-3);
}
.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.legal-toc li { margin: 0; padding: 0; }
.legal-toc a {
  display: block;
  color: var(--ink-3);
  padding: 6px var(--s-3);
  margin-left: -1px;
  border-left: 2px solid transparent;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.legal-toc a:hover { color: var(--accent); background: var(--accent-soft); }
.legal-toc li.level-3 a {
  padding-left: calc(var(--s-3) + 14px);
  font-size: 13px;
  color: var(--muted);
}
.legal-toc li.is-active > a {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

.legal-content { min-width: 0; }
.legal-header { margin-bottom: var(--s-6); }
.legal-content .legal-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 var(--s-3);
  letter-spacing: -0.01em;
}
.legal-updated {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.legal-content .prose { max-width: none; }
.legal-content .prose h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: var(--s-7) 0 var(--s-3);
  scroll-margin-top: calc(var(--header-h) + var(--s-4));
}
.legal-content .prose h3 {
  font-size: 17px;
  margin: var(--s-5) 0 var(--s-2);
  scroll-margin-top: calc(var(--header-h) + var(--s-4));
}
.legal-content .prose ul,
.legal-content .prose ol {
  padding-left: 1.4em;
  margin: 0 0 var(--s-4);
}
.legal-content .prose li { margin: 0 0 6px; }
.legal-content .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 1024px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .legal-aside {
    position: static;
    max-height: none;
    overflow: visible;
    padding: var(--s-4) var(--s-5);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    background: var(--bg-soft);
  }
  .legal-content .legal-title { font-size: 26px; }
}

/* WC breadcrumb — render inside the same .container as the rest */
.woocommerce-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: var(--s-5) 0 var(--s-2);
  margin: 0;
}
.woocommerce-breadcrumb a { color: var(--ink-3); }
.woocommerce-breadcrumb a:hover { color: var(--accent); }
.woocommerce-breadcrumb > .delimiter { color: var(--line-strong); margin: 0 4px; }

/* Gallery overrides — hero.php emits .gallery-main + .gallery-thumbs
   directly (no WC flexslider). The base Design much .gallery-main rule
   higher up handles container styling; we just need to make the actual
   <img> fill it. WC's stock gallery markup is hidden defensively in
   case any plugin re-inserts it. */
.gallery-main img,
#galleryMain {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-main:hover img { transform: scale(1.04); }
.gallery-thumbs .thumb {
  padding: 0;
  background: var(--bg-soft);
  border-radius: var(--r-2);
  overflow: hidden;
}
.gallery-thumbs .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Defensive: if a plugin re-injects WC's gallery markup, keep it hidden. */
.gallery .woocommerce-product-gallery { display: none !important; }

/* WC form.cart on PDP — match .cart-row grid (qty + ATC button) */
.purchase form.cart {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  align-items: stretch;
  margin: 0;
}
.purchase form.cart .quantity {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  background: #fff;
  height: 52px;
  overflow: hidden;
  margin: 0;
}
.purchase form.cart .quantity .qty {
  width: 56px;
  text-align: center;
  border: 0;
  background: transparent;
  font: 600 16px var(--font-body);
  color: var(--ink);
  height: 100%;
  -moz-appearance: textfield;
}
.purchase form.cart .quantity .qty::-webkit-outer-spin-button,
.purchase form.cart .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.purchase form.cart .qty-step {
  width: 42px; height: 100%;
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--ink-2);
  cursor: pointer;
}
.purchase form.cart .qty-step:hover { background: var(--bg-soft); }
.purchase form.cart .single_add_to_cart_button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px;
  border: 0;
  border-radius: var(--r-2);
  padding: 0 var(--s-4);
  background: var(--accent);
  color: #fff;
  font: 600 15px var(--font-body);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.purchase form.cart .single_add_to_cart_button:hover { background: var(--accent-2); }
.purchase form.cart .single_add_to_cart_button:active { transform: translateY(1px); }
.purchase form.cart .atc-divider { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.28); margin: 0 4px; }
.purchase form.cart .atc-total {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* Spec table — emitted from PHP, mirrors Design much .spec-table */
.spec-table th,
.spec-table td { text-align: left; padding: 12px var(--s-4); font-size: 14px; vertical-align: top; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:nth-child(even) { background: var(--bg-row); }
.spec-table th { font-weight: 500; color: var(--ink-3); width: 45%; }
.spec-table td { color: var(--ink); font-weight: 500; }

/* WC reviews — drop into the .reviews-list slot of the arvustused tab */
#reviews .commentlist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
#reviews .comment_container {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}
#reviews .comment_container img.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent-soft);
}
#reviews .comment-text { min-width: 0; }
#reviews .comment-text .star-rating { font-size: 13px; margin: 4px 0; }
#reviews #respond { margin-top: var(--s-5); }
#reviews #respond input[type="text"],
#reviews #respond textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
#reviews #respond .submit {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--r-2);
  padding: 12px 20px;
  font: 600 14px var(--font-body);
  cursor: pointer;
}
#reviews #respond .submit:hover { background: var(--accent-2); }

/* Lightweight skip-link + accessibility helpers */
.screen-reader-text {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  background: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 1000;
}

/* Custom logo dot color helper used in markup */
.logo-dot { color: var(--accent); }

/* compare-foot — only the "you" card carries two children (badge + status);
   priced competitor cards have a single delta badge that aligns left. */
.compare-card:not(.you) .compare-foot { justify-content: flex-start; }

/* ============================================================
   WC archive (.products grid) — mirrors .related-grid look so
   the shop / category pages render in 3 columns like Design much.
   ============================================================ */
.woocommerce-products-header,
.woocommerce-result-count,
.woocommerce-ordering {
  font-family: var(--font-body);
}
.woocommerce-products-header {
  padding: var(--s-5) 0 var(--s-3);
}
.woocommerce-products-header .woocommerce-products-header__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.015em;
  margin: 0;
}
.woocommerce-result-count {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 var(--s-3);
}
.woocommerce-ordering {
  margin: 0 0 var(--s-4);
}
.woocommerce-ordering select {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 8px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink-2);
}

.woocommerce ul.products,
ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-7);
}
.woocommerce ul.products li.product,
ul.products li.product {
  background: var(--bg-soft);
  border-radius: var(--r-3);
  overflow: hidden;
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s;
  position: relative;
  width: auto !important;
  float: none !important;
}
.woocommerce ul.products li.product:hover { transform: translateY(-2px); }
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: var(--ink);
}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link:hover {
  text-decoration: none;
  color: var(--ink);
}
.woocommerce ul.products li.product img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  padding: var(--s-3) var(--s-4) 0;
  margin: 0;
  line-height: 1.3;
}
.woocommerce ul.products li.product .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  padding: 6px var(--s-4) var(--s-4);
  display: block;
}
.woocommerce ul.products li.product .price del {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  margin-right: 6px;
}
.woocommerce ul.products li.product .price ins {
  background: transparent;
  color: var(--sale);
  text-decoration: none;
}
.woocommerce ul.products li.product .onsale {
  position: absolute;
  top: 12px; left: -6px;
  z-index: 2;
  background: var(--sale);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 10px 4px 12px;
  border-radius: 0 4px 4px 0;
  min-height: 0;
  min-width: 0;
  line-height: 1.2;
  text-transform: uppercase;
}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  border: 0;
  border-radius: var(--r-2);
  text-decoration: none;
  margin: 0 var(--s-4) var(--s-4);
  padding: 0 14px;
  transition: background 0.15s;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .added_to_cart:hover { background: var(--accent-2); color: #fff; }
.woocommerce ul.products li.product .added_to_cart { background: #fff; color: var(--ink); }

/* Pagination */
.woocommerce-pagination ul.page-numbers {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: var(--s-5) 0;
  justify-content: center;
}
.woocommerce-pagination ul.page-numbers li { margin: 0; }
.woocommerce-pagination ul.page-numbers a,
.woocommerce-pagination ul.page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
}
.woocommerce-pagination ul.page-numbers a:hover { background: var(--bg-soft); color: var(--ink); }
.woocommerce-pagination ul.page-numbers .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* WC notices (cart messages, errors) */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: 12px 16px;
  border-radius: var(--r-2);
  margin: 0 0 var(--s-4);
  font-size: 14px;
  list-style: none;
  border: 1px solid transparent;
}
.woocommerce-message { background: var(--save-soft); color: var(--save); border-color: var(--save); }
.woocommerce-info    { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.woocommerce-error   { background: var(--sale-soft); color: var(--sale); border-color: var(--sale); }

/* ============================================================
   CART + CHECKOUT — Eterniit-themed WC layout
   ============================================================ */
.woocommerce-cart .page-title,
.woocommerce-checkout .page-title,
.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: var(--s-7) 0 var(--s-5);
  color: var(--ink);
}

/* Cart 2-col layout (line items + totals sidebar) */
.woocommerce-cart .woocommerce {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}
.woocommerce-cart .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-cart .woocommerce-cart-form { grid-column: 1; min-width: 0; }
.woocommerce-cart .cart-collaterals { grid-column: 2; min-width: 0; width: 100%; }
.woocommerce-cart .cart-collaterals .cart_totals { width: 100%; float: none; }

/* Tables (cart line items + totals shop_table) */
.woocommerce-cart-form table.cart,
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  margin: 0 0 var(--s-4);
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: var(--s-4);
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.woocommerce table.shop_table th {
  background: var(--bg-soft);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.woocommerce table.shop_table tr:last-child td { border-bottom: 0; }

.woocommerce-cart-form .product-thumbnail { width: 96px; }
.woocommerce-cart-form .product-thumbnail img,
.woocommerce-cart-form img.attachment-woocommerce_thumbnail {
  width: 80px; height: 80px; object-fit: cover;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  display: block;
}
.woocommerce-cart-form .product-name a {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
}
.woocommerce-cart-form .product-name a:hover { color: var(--accent); }
.woocommerce-cart-form .product-name .variation,
.woocommerce-cart-form .wc-item-meta {
  margin: 4px 0 0; padding: 0; list-style: none;
  font-size: 12px; color: var(--ink-3);
}
.woocommerce-cart-form .product-price { font-size: 14px; color: var(--ink-2); }
.woocommerce-cart-form .product-subtotal {
  font-family: var(--font-display); font-weight: 700;
  font-size: 16px; color: var(--ink); white-space: nowrap;
}

/* Quantity stepper */
.woocommerce .quantity input.qty {
  width: 64px; height: 38px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  text-align: center;
  font: 600 14px var(--font-body);
  color: var(--ink);
  background: #fff;
  -moz-appearance: textfield;
}
.woocommerce .quantity input.qty:focus { outline: 0; border-color: var(--accent); }

/* Remove (✕) */
.woocommerce-cart-form .product-remove { width: 36px; text-align: center; }
.woocommerce-cart-form .product-remove a.remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted) !important;
  font-size: 18px;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.woocommerce-cart-form .product-remove a.remove:hover {
  background: var(--sale); color: #fff !important; border-color: var(--sale);
}

/* Coupon + Update cart row — keep td as table-cell so colspan="6" still
   spans the table width; float the children to opposite sides. */
.woocommerce-cart-form .actions {
  padding: var(--s-3) var(--s-4) !important;
  background: var(--bg-soft);
  vertical-align: middle;
  text-align: left;
}
.woocommerce-cart-form .actions::after {
  content: "";
  display: table;
  clear: both;
}
.woocommerce-cart-form .coupon {
  float: left;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 360px;
}
.woocommerce-cart-form .actions button[name="update_cart"] { float: right; }
.woocommerce-cart-form .coupon label { display: none; }
.woocommerce-cart-form .coupon input[type="text"] {
  height: 38px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  padding: 0 12px;
  font: inherit;
  flex: 1 1 auto;
  background: #fff;
}
.woocommerce-cart-form button[name="apply_coupon"] {
  height: 38px; padding: 0 16px !important;
}
.woocommerce-cart-form button[name="update_cart"] {
  height: 38px; padding: 0 16px !important;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--line) !important;
}
.woocommerce-cart-form button[name="update_cart"]:hover { border-color: var(--ink) !important; }
.woocommerce-cart-form button[name="update_cart"]:disabled { opacity: 0.5; cursor: not-allowed; }

/* Cart totals sidebar card */
.woocommerce-cart .cart_totals {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
  box-shadow: var(--sh-1);
}
.woocommerce-cart .cart_totals h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.woocommerce-cart .cart_totals table.shop_table {
  border: 0;
  background: transparent;
  margin: 0 0 var(--s-4);
}
.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
  padding: var(--s-3) 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.woocommerce-cart .cart_totals table.shop_table th {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0;
  text-transform: none;
}
.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td {
  border-bottom: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}
.woocommerce-cart .cart_totals .order-total td .amount { color: var(--accent); }
.woocommerce-cart .shipping-calculator-button,
.woocommerce-cart .woocommerce-shipping-destination { font-size: 12.5px; color: var(--ink-3); }
.woocommerce-cart .wc-proceed-to-checkout { padding: 0; margin: var(--s-3) 0 0; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 52px;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--r-2);
  font: 700 15px var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background: var(--accent-2) !important;
}

/* Empty cart state */
.cart-empty {
  text-align: center;
  font-size: 17px;
  color: var(--ink-2);
  padding: var(--s-7) 0 var(--s-4);
}
.return-to-shop { text-align: center; margin: 0 0 var(--s-8); }
.return-to-shop a.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px;
  padding: 0 var(--s-6);
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-2);
  font-weight: 600;
}

/* ---------- CHECKOUT PAGE LAYOUT ----------
   Right column holds heading + #order_review which need to sit at the
   top together (no giant gap). col2-set is the tall billing/shipping
   stack on the left and must span both rows on its side so the right
   column can stay short. */
.woocommerce-checkout form.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: var(--s-3) var(--s-7);
  align-items: start;
}
.woocommerce-checkout form.checkout > .col2-set {
  grid-column: 1;
  grid-row: 1 / 3;
}
.woocommerce-checkout form.checkout > h3#order_review_heading {
  grid-column: 2; grid-row: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.woocommerce-checkout form.checkout > #order_review {
  grid-column: 2; grid-row: 2;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + var(--s-3));
}
.woocommerce-checkout .woocommerce-notices-wrapper { grid-column: 1 / -1; grid-row: 1; }
/* Order-notes block appears after col2-set in WC's source order; with
   col2-set spanning rows 1-2, place this under the form on the left. */
.woocommerce-checkout form.checkout > .woocommerce-additional-fields {
  grid-column: 1;
  grid-row: 3;
}

/* Stack billing + shipping inside col2-set vertically */
.woocommerce-checkout .col2-set {
  display: flex; flex-direction: column;
  gap: var(--s-5);
  width: 100%;
}
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
  width: 100%; max-width: none; float: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.woocommerce-checkout .woocommerce-additional-fields {
  margin-top: var(--s-5);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.woocommerce-checkout h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}

/* Form field grid */
.woocommerce form .form-row {
  margin: 0 0 var(--s-3);
  padding: 0;
  display: flex; flex-direction: column;
  gap: 6px;
}
.woocommerce form .form-row label {
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); letter-spacing: 0.02em;
}
.woocommerce form .form-row .required {
  color: var(--sale); text-decoration: none; margin-left: 2px;
}
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3) var(--s-4);
}
.woocommerce-billing-fields__field-wrapper .form-row.form-row-wide,
.woocommerce-shipping-fields__field-wrapper .form-row.form-row-wide,
.woocommerce-additional-fields__field-wrapper .form-row.form-row-wide,
.woocommerce-billing-fields__field-wrapper #billing_country_field,
.woocommerce-billing-fields__field-wrapper #billing_state_field,
.woocommerce-billing-fields__field-wrapper #billing_address_1_field,
.woocommerce-billing-fields__field-wrapper #billing_address_2_field,
.woocommerce-shipping-fields__field-wrapper #shipping_address_1_field,
.woocommerce-shipping-fields__field-wrapper #shipping_address_2_field {
  grid-column: 1 / -1;
}

/* Inputs */
.woocommerce-form input[type="text"],
.woocommerce-form input[type="email"],
.woocommerce-form input[type="tel"],
.woocommerce-form input[type="password"],
.woocommerce-form input[type="number"],
.woocommerce-form-coupon input[type="text"],
.woocommerce-form textarea,
.woocommerce-form select,
.woocommerce form input[type="text"],
.woocommerce form input[type="email"],
.woocommerce form input[type="tel"],
.woocommerce form input[type="password"],
.woocommerce form input[type="number"],
.woocommerce form textarea,
.woocommerce form select,
.select2-container--default .select2-selection--single {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  padding: 0 12px;
  font: 500 14px var(--font-body);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.woocommerce form textarea {
  height: auto; padding: 10px 12px;
  min-height: 100px; line-height: 1.5;
}
.woocommerce-form input:focus,
.woocommerce form input:focus,
.woocommerce form textarea:focus,
.woocommerce form select:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.select2-container--default .select2-selection--single { display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0; line-height: inherit; color: var(--ink);
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }

/* "Ship to a different address" toggle */
.woocommerce-shipping-fields h3#ship-to-different-address {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 0; padding-bottom: 0;
  margin-bottom: var(--s-3);
}
.woocommerce-shipping-fields h3#ship-to-different-address label { margin: 0; font-weight: 600; }
.woocommerce-shipping-fields h3#ship-to-different-address input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent);
}

/* Order review sidebar */
.woocommerce-checkout #order_review {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
  box-shadow: var(--sh-1);
}
.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 var(--s-4);
  background: transparent;
  border: 0;
}
.woocommerce-checkout-review-order-table thead th {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 var(--s-3);
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-weight: 600;
}
.woocommerce-checkout-review-order-table tbody td {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
  background: transparent;
}
.woocommerce-checkout-review-order-table .product-name {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
}
.woocommerce-checkout-review-order-table .product-quantity {
  color: var(--ink-3); margin-left: 4px; font-weight: 500;
}
.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout-review-order-table tfoot td {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
}
.woocommerce-checkout-review-order-table tfoot th {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink-3);
}
.woocommerce-checkout-review-order-table tfoot tr:last-child th,
.woocommerce-checkout-review-order-table tfoot tr:last-child td { border-bottom: 0; }
.woocommerce-checkout-review-order-table tfoot tr.order-total th,
.woocommerce-checkout-review-order-table tfoot tr.order-total td {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  padding-top: var(--s-4);
}
.woocommerce-checkout-review-order-table tfoot tr.order-total .amount { color: var(--accent); }

/* Payment methods */
#payment.woocommerce-checkout-payment {
  background: transparent !important;
  border-radius: 0;
}
#payment ul.payment_methods {
  margin: 0 0 var(--s-4);
  padding: 0;
  list-style: none;
  border: 0;
  background: transparent;
  display: flex; flex-direction: column;
  gap: 8px;
}
#payment ul.payment_methods li.wc_payment_method {
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: var(--r-2);
  padding: 12px 14px;
  transition: border-color 0.15s, background 0.15s;
}
#payment ul.payment_methods li.wc_payment_method:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
#payment ul.payment_methods li.wc_payment_method input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  margin-right: 8px;
}
#payment ul.payment_methods li.wc_payment_method label {
  font-weight: 600;
  color: var(--ink);
  display: inline-flex; align-items: center;
  cursor: pointer;
}
#payment ul.payment_methods li.wc_payment_method .payment_box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.45;
}
#payment ul.payment_methods li.wc_payment_method .payment_box::before { display: none; }

/* Terms checkbox + place-order button */
.woocommerce-terms-and-conditions-wrapper {
  margin: var(--s-3) 0 var(--s-4);
  font-size: 13px;
  color: var(--ink-3);
}
.woocommerce-form__label-for-checkbox {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer;
}
.woocommerce-form__input-checkbox {
  margin: 3px 0 0;
  accent-color: var(--accent);
  width: 16px; height: 16px;
}
#place_order {
  width: 100%;
  height: 56px;
  background: var(--accent) !important;
  color: #fff !important;
  border: 0;
  border-radius: var(--r-2);
  font: 700 15px var(--font-body);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s;
}
#place_order:hover { background: var(--accent-2) !important; }

/* Generic WC button (used in misc places) */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce-page button[type="submit"],
.wc-block-components-button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--r-2);
  padding: 10px 18px;
  font: 600 14px var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  line-height: 1;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover { background: var(--accent-2); color: #fff; }
.woocommerce a.button.alt,
.woocommerce button.button.alt { background: var(--accent); }

/* Cart / checkout responsive */
@media (max-width: 980px) {
  .woocommerce-cart .woocommerce,
  .woocommerce-checkout form.checkout {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: var(--s-5);
  }
  /* Reset every explicit grid placement so source order takes over. */
  .woocommerce-checkout form.checkout > .col2-set,
  .woocommerce-checkout form.checkout > h3#order_review_heading,
  .woocommerce-checkout form.checkout > #order_review,
  .woocommerce-checkout form.checkout > .woocommerce-additional-fields,
  .woocommerce-checkout .woocommerce-notices-wrapper {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper,
  .woocommerce-additional-fields__field-wrapper {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .woocommerce-cart-form table.cart thead { display: none; }
  .woocommerce-cart-form table.cart tr.cart_item {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    grid-template-areas:
      "img name remove"
      "img price subtotal"
      "img qty   qty";
    gap: 4px 12px;
    padding: var(--s-4);
    border-bottom: 1px solid var(--line);
  }
  .woocommerce-cart-form table.cart tr.cart_item td { padding: 0; border: 0; }
  .woocommerce-cart-form .product-thumbnail   { grid-area: img; width: auto; }
  .woocommerce-cart-form .product-name        { grid-area: name; }
  .woocommerce-cart-form .product-price       { grid-area: price; }
  .woocommerce-cart-form .product-subtotal    { grid-area: subtotal; text-align: right; }
  .woocommerce-cart-form .product-quantity    { grid-area: qty; }
  .woocommerce-cart-form .product-remove      { grid-area: remove; text-align: right; }
  .woocommerce-cart-form .coupon,
  .woocommerce-cart-form .actions button[name="update_cart"] {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .woocommerce-cart-form .actions button[name="update_cart"] { margin-top: 8px; }
}

@media (max-width: 1024px) {
  .woocommerce ul.products,
  ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  /* Stay on 2 columns down to the smallest phones — the cards are
     designed to look right paired, not solo. */
  .woocommerce ul.products,
  ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
  }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 13px; }
  .woocommerce ul.products li.product .price { font-size: 16px; padding: 4px var(--s-3) var(--s-3); }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { padding-left: var(--s-3); padding-right: var(--s-3); }
  .woocommerce ul.products li.product .button,
  .woocommerce ul.products li.product .added_to_cart {
    margin: 0 var(--s-3) var(--s-3);
    font-size: 12px;
    padding: 0 8px;
    height: 34px;
  }
}

/* ============================================================
 * FiboSearch (ajax-search-for-woocommerce) inside the header
 * search overlay (#et-search-overlay). Styled to look like a
 * clean white input with an icon — no FiboSearch chrome.
 * ============================================================ */
.et-search-fibo .dgwt-wcas-search-wrapp {
  width: 100% !important;
  max-width: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.et-search-fibo .dgwt-wcas-search-form {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: var(--bg-soft) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-3) !important;
  padding: 4px 12px !important;
  margin: 0 !important;
  opacity: 1 !important;
  width: 100% !important;
}
.et-search-fibo .dgwt-wcas-sf-wrapp {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.et-search-fibo .dgwt-wcas-search-input,
.et-search-fibo input.dgwt-wcas-search-input[type="search"] {
  flex: 1 !important;
  border: 0 !important;
  background: transparent !important;
  height: 40px !important;
  padding: 0 !important;
  font: 500 15px var(--font-body) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.et-search-fibo .dgwt-wcas-search-input:focus {
  outline: 0 !important;
  box-shadow: none !important;
}
.et-search-fibo .dgwt-wcas-search-input::placeholder { color: var(--muted) !important; }
.et-search-fibo .dgwt-wcas-preloader,
.et-search-fibo .dgwt-wcas-voice-search,
.et-search-fibo .dgwt-wcas-close,
.et-search-fibo .dgwt-wcas-search-submit { display: none !important; }
.et-search-fibo .dgwt-wcas-suggestions-wrapp {
  border-radius: var(--r-3) !important;
  box-shadow: 0 12px 32px rgba(20,24,30,0.14) !important;
  margin-top: 6px !important;
}
