/* ==========================================================================
   OstuGrupp theme — foundation (Step 1)
   Design tokens + reset + base typography + container + buttons + cards +
   header/footer base. Page-specific styling (shop, product, cart, checkout)
   is layered on in Step 3.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  /* The theme is designed light-only. Tell the browser so its automatic
     "dark mode for websites" (Samsung Internet, Chrome auto-dark) doesn't invert
     the page into broken dark-on-white boxes on phones set to dark mode. */
  color-scheme: light;
  --slate-dark: #1e293b;
  --slate: #334155;
  --green: #047857;
  --green-dark: #035e43;
  --bg: #f8fafc;
  --fg: #0f172a;
  --muted: #f1f5f9;
  --border: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;

  --surface: #ffffff;
  --surface-2: #f8fafc;
  --green-bright: #34d399;

  /* Semantic danger / error. var(--danger) == #ef4444 and var(--danger-dark)
     == #b91c1c, so adopting these on the error / out-of-stock / destructive
     states is a pure refactor with ZERO visual change. */
  --danger: #ef4444;
  --danger-dark: #b91c1c;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-2xl: 20px;

  /* Spacing scale (4px base) — defined for NEW components to adopt. Existing
     spacing is intentionally left untouched: the codebase mixes a few off-scale
     values, so a mass refactor would risk regressions for no visual gain. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  --shadow-card: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-card-hover: 0 14px 32px -14px rgba(15,23,42,.22), 0 6px 12px -8px rgba(15,23,42,.10);
  --shadow-nav: 0 1px 0 rgba(15,23,42,.05), 0 10px 30px -22px rgba(15,23,42,.30);
  --shadow-green: 0 10px 26px -10px rgba(5,150,105,.50);

  --font-display: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1440px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* scroll-padding-top: the header is sticky, so every in-page anchor and every
   keyboard focus jump landed UNDERNEATH it — the product page's section links,
   the skip link, and error-field focus on checkout all put their target behind
   72px of header. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (max-width: 768px) { html { scroll-padding-top: 68px; } }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  overflow-x: clip; /* contain .alignfull (100vw) full-bleed so it never triggers a horizontal scrollbar */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, svg { max-width: 100%; display: block; height: auto; }
/* Responsive embedded media. WordPress's [video] shortcode renders
   `<div class="wp-video" style="width:1280px">` with a HARDCODED pixel width that
   overflows the viewport on phones and forces the WHOLE page wider than the screen
   — the "mobile renders the desktop layout / must scroll sideways" bug on products
   whose description embeds a video. Force every embed to stay within its container. */
video, iframe { max-width: 100%; }
.wp-video, .wp-video-shortcode, .mejs-container, .mejs-overlay,
.wp-block-embed__wrapper, .wp-block-video { width: 100% !important; max-width: 100% !important; }
.wp-video video, video.wp-video-shortcode, .mejs-mediaelement video,
.mejs-container video { width: 100% !important; height: auto !important; max-width: 100% !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.15; color: var(--slate-dark); font-weight: 700; }

::selection { background: rgba(5,150,105,.22); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section-y { padding-block: 56px; }
@media (min-width: 768px) { .section-y { padding-block: 80px; } }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--slate-dark); color: #fff; padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---- Buttons ---- */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding-inline: 24px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; transition: all .2s ease; border: 1px solid transparent;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-green); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-secondary { background: #fff; color: var(--slate); border-color: var(--border); box-shadow: var(--shadow-card); }
.btn-secondary:hover { border-color: rgba(5,150,105,.5); color: var(--green); transform: translateY(-2px); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }

/* ---- Cards ---- */
.card-premium {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden; transition: all .2s ease;
}
.card-premium:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(5,150,105,.3); }
.card-premium__body { padding: 16px; }
.card-premium__title { font-size: 16px; }
.card-premium__title a:hover { color: var(--green); }

/* ---- Announcement bar ---- */
.announcement-bar { background: var(--slate-dark); color: #e2e8f0; font-size: 13px; }
.announcement-bar__inner { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 38px; flex-wrap: wrap; }
.announcement-bar__msg { font-weight: 600; }
.announcement-bar__ship { color: var(--green-bright); font-weight: 600; }
.announcement-bar__ship::before { content: "·"; margin-right: 12px; color: #94a3b8; }
@media (max-width: 640px) { .announcement-bar__ship { display: none; } }

/* ---- Header ---- */
.site-header { z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-nav); }
.site-header.is-sticky { position: sticky; top: 0; }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.site-logo { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
/* .site-header prefix raises specificity to (0,2,0) so it beats WooCommerce core's
   `.woocommerce-page img { height:auto }` (0,1,1), which otherwise blows the logo up
   to full size on shop / product / cart pages (body.woocommerce-page). */
.site-header .site-logo__img, .site-header .custom-logo { display: block; height: 26px; width: auto; }
@media (min-width: 768px)  { .site-header .site-logo__img, .site-header .custom-logo { height: 30px; } }
@media (min-width: 1024px) { .site-header .site-logo__img, .site-header .custom-logo { height: 30px; } }
.site-wordmark__accent { color: var(--green); } /* still used by the mobile drawer brand label */
.site-nav { display: none; }
.site-nav__menu { display: flex; gap: 18px; }
.site-nav__menu a { font-weight: 500; color: var(--slate); transition: color .2s; }
.site-nav__menu a:hover { color: var(--green); }
.site-header__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-search { display: none; align-items: center; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.header-search input { border: 0; background: transparent; padding: 10px 14px; min-width: 180px; outline: none; }
.header-search button { background: var(--green); color: #fff; border: 0; width: 44px; align-self: stretch; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; transition: background .2s ease; }
.header-search button:hover { background: var(--green-dark); }
.header-search:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.header-search input:focus-visible { outline: none; }
.header-account, .header-cart { font-weight: 600; color: var(--slate); padding: 8px 12px; border-radius: var(--radius); transition: background .2s; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.header-account:hover, .header-cart:hover { background: var(--muted); color: var(--green); }
.header-cart__count { background: var(--green); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; padding: 0 6px; }
.header-cart__count.is-empty { display: none; }
.mobile-menu-toggle { display: inline-flex; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 20px; }

@media (min-width: 1024px) {
  .site-nav { display: block; }
  .header-search { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ---- Footer ---- */
.site-footer { background: var(--slate-dark); color: #cbd5e1; margin-top: 64px; padding-block: 56px 24px; }
.site-footer a { color: #cbd5e1; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.site-footer__cols { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-widget__title { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 14px; color: #94a3b8; }
.site-footer__menu { display: flex; gap: 20px; flex-wrap: wrap; }
@media (min-width: 640px) { .site-footer__cols { grid-template-columns: repeat(2, 1fr); } }

/* ---- Post/product grid base ---- */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (min-width: 768px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   Home page (front-page.php)
   ========================================================================== */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--green); margin-bottom: 10px; }
.home-section__title { font-size: clamp(24px, 3.5vw, 36px); margin-bottom: 0; }

/* Consistent section rhythm: eyebrow + heading + optional lead */
.home-section__head { max-width: 640px; margin-bottom: 32px; }
.home-section__head .eyebrow { margin-bottom: 12px; }
.home-section__head .home-section__title { margin-bottom: 0; }
.home-section__lead { color: var(--slate-500); font-size: 16px; line-height: 1.6; margin-top: 14px; }
.home-section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; max-width: none; flex-wrap: wrap; }
.home-section__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--green); white-space: nowrap; transition: gap .2s ease, color .2s ease; padding-bottom: 4px; }
.home-section__more:hover { color: var(--green-dark); gap: 10px; }

/* Hero */
.home-hero { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); color: #fff; position: relative; overflow: hidden; }
.home-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 85% 20%, rgba(5,150,105,.18) 0%, transparent 60%); pointer-events: none; }
.home-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(80% 70% at 70% 30%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(80% 70% at 70% 30%, #000 0%, transparent 70%); pointer-events: none; }
.home-hero__inner { padding-block: 88px; position: relative; z-index: 1; }
.home-hero__content { max-width: 660px; }
.home-hero .eyebrow { color: var(--green-bright); background: rgba(52,211,153,.12); padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(52,211,153,.22); }
.home-hero__title { color: #fff; font-size: clamp(36px, 6.4vw, 64px); line-height: 1.04; margin: 18px 0; letter-spacing: -.03em; }
.home-hero__title span { color: var(--green-bright); }
.home-hero__sub { color: #cbd5e1; font-size: clamp(17px, 2vw, 19px); line-height: 1.6; max-width: 560px; }
.home-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.home-hero__cta .btn-primary,
.home-hero__cta .btn-secondary { min-height: 54px; padding-inline: 28px; }
.home-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.home-hero__chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); border-radius: 999px; color: #e2e8f0; font-size: 13.5px; font-weight: 600; }
.home-hero__chips li::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px; background: rgba(52,211,153,.16); color: var(--green-bright); font-size: 11px; font-weight: 700; }

/* Hero — two-column layout (text left, popular products right).
   Single column by default (mobile-first); becomes 2 columns at >=900px.
   When the store is empty the .home-hero__products column is absent, so the
   single grid cell simply fills the row and the hero looks identical to before. */
.home-hero__grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
.home-hero--split .home-hero__content { max-width: 620px; }
@media (min-width: 900px) {
  .home-hero--split .home-hero__grid { grid-template-columns: 1.15fr .85fr; gap: 28px; }
  .home-hero--split .home-hero__content { max-width: none; }
}

/* Popular-products rail on the dark hero */
.home-hero__products { display: flex; flex-direction: column; gap: 12px; }
.home-hero__plabel { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 7px 14px; border-radius: 999px; background: rgba(52,211,153,.10); border: 1px solid rgba(52,211,153,.24); color: var(--green-bright); font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.home-hero__plabel-star { color: var(--green-bright); font-size: 13px; line-height: 1; }

/* Compact horizontal product card — white card on the dark hero */
.home-mini-card { display: flex; align-items: center; gap: 12px; padding: 9px; background: #fff; border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); box-shadow: 0 12px 28px -16px rgba(0,0,0,.55); transition: transform .2s ease, box-shadow .2s ease; }
.home-mini-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -16px rgba(0,0,0,.6); }
.home-mini-card:focus-visible { outline: 2px solid var(--green-bright); outline-offset: 2px; }
.home-mini-card__media { flex: none; width: 52px; height: 52px; border-radius: 9px; background: var(--muted); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.home-mini-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.home-mini-card__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-mini-card__title { font-family: var(--font-body); font-size: 12.5px; font-weight: 500; color: var(--slate-dark); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-mini-card__price { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; color: var(--green); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-mini-card__price del { color: var(--slate-400); font-weight: 500; font-size: 12px; margin-right: 5px; }
.home-mini-card__price ins { text-decoration: none; color: var(--green); }
/* WCAG 2.2 AA (1.4.3): a strikethrough OLD price is meaningful content, but the
   per-component rules combined a muted token (--slate-400 #94a3b8 = 2.56:1) with
   opacity, dropping the effective contrast below 4.5:1. Enforce one readable
   de-emphasised grey (--slate-500 #64748b = 4.77:1) at full opacity site-wide; each
   component keeps its own size/weight/spacing. !important is deliberate — this is a
   cross-cutting contrast FLOOR that must beat the later-loading module sheets. */
.product-card .price del,
.single-product .price del,
.home-mini-card__price del,
.og-ls-price del,
.ostu-cs-card__price del,
.sticky-atc__price del,
.ostu-bundle__price del,
.ostu-fbt-card__price del,
.og-mega__rail-price del,
.search-result__price .price del,
.ostu-qv-product__price del,
.ostu-wl-card .price del,
.ostu-cmp-table__price del { color: var(--slate-500) !important; opacity: 1 !important; }
/* Below 900px the products drop under the hero text. On tablets (768–899px)
   lay the 3 cards out in a row; below 768px they stack as a clean full-width
   column (handled in the mobile block) so large phones never get a cramped
   3-up grid. */
@media (min-width: 768px) and (max-width: 899px) {
  .home-hero__products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
  .home-hero__plabel { grid-column: 1 / -1; }
  .home-mini-card { height: 100%; }
  /* In the 3-up row let titles take two lines so names aren't truncated mid-word. */
  .home-mini-card__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Value props / trust row */
.home-props { background: var(--surface); border-bottom: 1px solid var(--border); }
.home-props__grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding-block: 32px; }
@media (min-width: 480px) { .home-props__grid { grid-template-columns: repeat(2, 1fr); } }
/* 768px used to jump straight to four columns, and a bare `1fr` is minmax(auto,1fr)
   — it will not shrink below its content. Four cards need ~870px of min-content
   (the binding word is "Pakiautomaadi" in a heading), but a 768px screen offers
   720px, so the fourth card — "Järelmaks ja osamaksed" — was cut off the right edge
   with body{overflow-x:clip} denying any way to scroll to it. Two columns until
   there is genuinely room for four, and minmax(0,1fr) so a track may shrink. */
@media (min-width: 768px) { .home-props__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 940px) { .home-props__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .home-props__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 40px; } }
.home-props__grid > * { min-width: 0; }
.home-prop { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.home-prop:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: rgba(5,150,105,.3); }
.home-prop__icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(5,150,105,.09); color: var(--green); }
.home-prop__icon svg { width: 24px; height: 24px; }

/* Seasonal campaign band (homepage; owner-toggled, brand-token themed, fully responsive) */
.home-seasonal__inner { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%); color: #fff; border-radius: var(--radius-2xl); padding: clamp(28px, 5vw, 56px); }
.home-seasonal__inner::before { content: ""; position: absolute; right: -90px; top: -90px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(52, 211, 153, .28), transparent 70%); pointer-events: none; }
.home-seasonal__eyebrow { position: relative; display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--green-bright); margin-bottom: 14px; }
.home-seasonal__title { position: relative; font-family: var(--font-display); font-size: clamp(28px, 4.5vw, 44px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 22px; max-width: 640px; }
.home-seasonal__cta { position: relative; display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--green-dark); font-weight: 700; padding: 13px 24px; border-radius: 999px; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .45); transition: transform .2s ease; }
.home-seasonal__cta:hover { transform: translateY(-2px); color: var(--green-dark); }
.home-prop__title { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; color: var(--slate-dark); line-height: 1.25; }
.home-prop__text { color: var(--slate-500); font-size: 13.5px; line-height: 1.5; margin-top: 5px; }

/* Category grid — premium image showcase cards (image on top, name + count below) */
.home-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .home-cats { grid-template-columns: repeat(4, 1fr); } }
.home-cat { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; display: flex; flex-direction: column; overflow: hidden; }
.home-cat:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(5,150,105,.3); }

/* Image area on top — a soft muted panel that frames every product photo the
   same way, so busy imported images look clean and consistent (never edge-to-
   edge messy). The image sits on a white inner tile (object-fit:contain) with
   generous padding; a faint scrim + top sheen add depth without dirtying the
   colours (no mix-blend-mode, which greyed-out white-background photos). */
.home-cat__media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(160deg, #f6f8fb 0%, var(--muted) 100%); display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }
/* White inner tile that holds the product photo, so every card frames its
   image identically regardless of the source photo's own background. */
.home-cat__frame { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 12px; background: #fff; border: 1px solid rgba(15,23,42,.05); box-shadow: 0 1px 2px rgba(15,23,42,.05), inset 0 0 0 1px rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: box-shadow .25s ease; }
.home-cat__media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .3s ease; }
.home-cat:hover .home-cat__frame { box-shadow: 0 6px 16px -8px rgba(15,23,42,.18), inset 0 0 0 1px rgba(255,255,255,.6); }
.home-cat:hover .home-cat__media img { transform: scale(1.05); }
/* Soft bottom scrim so the frame blends into the panel and the card edge stays calm. */
.home-cat__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, transparent 55%, rgba(15,23,42,.04) 100%); }
/* Subtle on-brand placeholder when no image is available */
.home-cat__media--empty { background: linear-gradient(135deg, #f1f5f9 0%, #e2f5ee 100%); }
.home-cat__media--empty::after { display: none; }
.home-cat__placeholder { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: #fff; color: var(--green); box-shadow: var(--shadow-card); }
.home-cat__placeholder svg { width: 28px; height: 28px; }

/* Name + count + arrow below the image */
.home-cat__body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.home-cat__name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--slate-dark); line-height: 1.25; }
.home-cat__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.home-cat__meta { color: var(--slate-500); font-size: 13px; font-weight: 600; }
.home-cat__arrow { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 999px; background: var(--muted); color: var(--green); font-weight: 700; font-size: 15px; transition: transform .2s ease, background .2s ease, color .2s ease; }
.home-cat:hover .home-cat__arrow { transform: translateX(3px); background: var(--green); color: #fff; }

/* Benefits / promo band (before the CTA) */
.home-promo { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; padding: 22px 26px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%); border: 1px solid rgba(5,150,105,.18); }
.home-promo__icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: #fff; color: var(--green); box-shadow: var(--shadow-card); }
.home-promo__icon svg { width: 26px; height: 26px; }
.home-promo__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; }
.home-promo__title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--slate-dark); }
.home-promo__sub { color: var(--slate-600); font-size: 14px; line-height: 1.5; }
.home-promo__cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--green); white-space: nowrap; transition: gap .2s ease, color .2s ease; }
.home-promo__cta:hover { color: var(--green-dark); gap: 10px; }

/* CTA band */
/* Gradient darkened for CONTRAST, not taste. White text at 17px needs 4.5:1 (WCAG
   AA). Measured: white over the old light end #059669 is only 3.77:1 — and the
   paragraph was rgba(255,255,255,.9), which dropped it to 3.35:1. The new ends give
   5.48:1 (#047857) and 7.68:1 (#065f46), so the whole band passes end to end. */
.home-cta { background: linear-gradient(135deg, #047857 0%, #065f46 100%); color: #fff; margin-top: 64px; position: relative; overflow: hidden; }
.home-cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 120% at 80% 0%, rgba(255,255,255,.12) 0%, transparent 60%); pointer-events: none; }
.home-cta__inner { padding-block: 72px; text-align: center; position: relative; z-index: 1; }
.home-cta__inner h2 { color: #fff; font-size: clamp(26px, 4vw, 40px); }
.home-cta__inner p { color: #fff; max-width: 520px; margin: 12px auto 26px; font-size: 17px; }
.home-cta__inner .btn-primary { background: #fff; color: var(--green-dark); box-shadow: 0 10px 30px -10px rgba(0,0,0,.3); }
.home-cta__inner .btn-primary:hover { background: #f1f5f9; }
.home-cta__inner .btn-primary { min-height: 54px; padding-inline: 30px; }

/* --------------------------------------------------------------------------
   Home product rails — compact variant (more cards per row than the shop)
   Scoped to .home-rail so the shop archive cards keep their approved size.
   The shop's product grid is forced to 4 cols by woocommerce.css; here we
   override to 5 and trim the card chrome (padding, price, buttons) so more
   products fit per row while staying equal-height and on-brand.
   -------------------------------------------------------------------------- */
.home-rail .home-section__head--row { margin-bottom: 24px; }

/* 5 across on wide screens, gracefully stepping down on smaller viewports.
   The [products] shortcode wraps its list in `.woocommerce`, so we beat
   woocommerce.css's `.woocommerce ul.products` grid rule with the extra
   `.home-rail` ancestor (descendant form covers both nestings). */
@media (min-width: 1100px) {
  .home-rail ul.products,
  .home-rail .woocommerce ul.products { grid-template-columns: repeat(5, 1fr); gap: 14px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .home-rail ul.products,
  .home-rail .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}

/* Compact card chrome — only inside the home rails. */
.home-rail ul.products li.product .product-card__body { padding: 12px; gap: 5px; }
.home-rail ul.products li.product .product-card__media img { padding: 11px; }
.home-rail ul.products li.product .product-card__title,
.home-rail ul.products li.product .woocommerce-loop-product__title { font-size: 14px; line-height: 1.35; }
.home-rail ul.products li.product .price { font-size: 18px; }
.home-rail ul.products li.product .price del { font-size: 12px; }
.home-rail ul.products li.product .star-rating { font-size: 12px; }
.home-rail ul.products li.product .product-card__actions { gap: 6px; margin-top: 6px; }
.home-rail ul.products li.product .product-card__actions .button,
.home-rail ul.products li.product .product-card__actions a.add_to_cart_button { min-height: 40px; font-size: 13.5px; padding-inline: 14px; }
.home-rail ul.products li.product .product-card__tools { gap: 6px; }

/* --------------------------------------------------------------------------
   Premium rhythm polish — fuller, more intentional sections.
   -------------------------------------------------------------------------- */
/* A touch more breathing room between the eyebrow heading and its content. */
.home-section__head { margin-bottom: 36px; }
/* Centre the category section intro so the grid below feels deliberate. */
#kategooriad .home-section__head { max-width: 720px; }
/* Slightly roomier category cards on wide screens for a fuller, premium feel. */
@media (min-width: 768px) {
  .home-cat__body { padding: 18px 20px 20px; gap: 12px; }
  .home-cat__name { font-size: 17px; }
}
/* Keep generous vertical rhythm on the rails so the page reads full, not sparse. */
.home-rail { padding-block: 56px; }
@media (min-width: 768px) { .home-rail { padding-block: 72px; } }

/* ==========================================================================
   MOBILE BEAUTY — the homepage on phones & small tablets (top priority).
   Everything below 768px is tuned so the page feels premium on a ~375px
   phone: the hero stacks cleanly (text, then a tidy product column), the
   category showcase reads as a neat 2-up grid, rails stay 2 across, and the
   trust/promo/CTA bands centre with balanced spacing. No horizontal scroll,
   44px+ touch targets. Desktop (>=768px) is untouched.
   ========================================================================== */
@media (max-width: 767px) {
  /* Slightly tighter page gutters so cards get more usable width on a phone. */
  .container { padding-inline: 18px; }

  /* ---- HERO ---- */
  .home-hero__inner { padding-block: 48px 44px; }
  /* Stack: text first, then the product rail — never side by side on a phone. */
  .home-hero__grid { grid-template-columns: 1fr; gap: 28px; align-items: stretch; }
  .home-hero--split .home-hero__content { max-width: none; }
  .home-hero__title { font-size: clamp(30px, 9vw, 40px); margin: 14px 0; line-height: 1.08; }
  .home-hero__sub { font-size: 16px; max-width: none; }
  .home-hero__cta { gap: 12px; margin: 24px 0 22px; }
  /* Full-width, comfortably tappable CTAs that never overflow the viewport. */
  .home-hero__cta .btn-primary,
  .home-hero__cta .btn-secondary { flex: 1 1 100%; width: 100%; justify-content: center; min-height: 54px; }
  .home-hero__chips { gap: 8px; }
  .home-hero__chips li { font-size: 12.5px; padding: 7px 12px 7px 10px; }

  /* Hero products: a tidy full-width column under the text, generous cards. */
  .home-hero__products { gap: 10px; }
  .home-mini-card { padding: 10px; gap: 12px; min-height: 64px; }
  .home-mini-card__media { width: 56px; height: 56px; }
  .home-mini-card__title { font-size: 13px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .home-mini-card__price { font-size: 15px; }

  /* ---- SECTION HEADINGS ---- */
  .home-section__head { margin-bottom: 22px; }
  .home-section__title { font-size: clamp(22px, 6.4vw, 28px); }
  .home-section__lead { font-size: 15px; margin-top: 10px; }
  /* Keep the "heading + view all" rows aligned and on two tidy lines. */
  .home-section__head--row { align-items: center; gap: 10px 16px; }
  /* Give the "Vaata kõiki" link a comfortable 44px tap height on phones. */
  .home-section__more { font-size: 14px; min-height: 44px; padding-block: 8px; padding-bottom: 8px; }

  /* ---- VALUE PROPS / TRUST ROW ---- */
  .home-props__grid { gap: 12px; padding-block: 26px; }
  .home-prop { padding: 16px; gap: 13px; align-items: center; }
  .home-prop__icon { width: 42px; height: 42px; }
  .home-prop__title { font-size: 15px; }
  .home-prop__text { font-size: 13px; margin-top: 3px; }

  /* ---- CATEGORY SHOWCASE ---- 2 across, images sized nicely, tappable. */
  .home-cats { gap: 12px; }
  .home-cat__media { aspect-ratio: 1 / 1; padding: 11px; }
  .home-cat__frame { border-radius: 10px; }
  .home-cat__media img { padding: 10px; }
  .home-cat__body { padding: 12px 13px 14px; gap: 8px; }
  .home-cat__name { font-size: 14.5px; line-height: 1.3; }
  .home-cat__meta { font-size: 12.5px; }
  /* Arrow stays a comfortable tap target. */
  .home-cat__arrow { width: 28px; height: 28px; }

  /* ---- PRODUCT RAILS ---- 2 across, readable, good heading spacing. */
  .home-rail { padding-block: 40px; }
  .home-rail .home-section__head--row { margin-bottom: 18px; }
  .home-rail ul.products,
  .home-rail .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }

  /* ---- PROMO BAND ---- centred, no overflow, full-width CTA. */
  .home-promo { flex-direction: column; align-items: flex-start; text-align: left; gap: 14px; padding: 20px; }
  .home-promo__text { flex: 1 1 auto; }
  .home-promo__title { font-size: 16px; }
  .home-promo__cta { align-self: stretch; justify-content: center; min-height: 48px; border-radius: var(--radius); background: var(--green); color: #fff; padding-inline: 18px; }
  .home-promo__cta:hover { background: var(--green-dark); color: #fff; }

  /* ---- CTA BAND ---- tidy, centred, tappable button. */
  .home-cta { margin-top: 48px; }
  .home-cta__inner { padding-block: 52px; }
  .home-cta__inner h2 { font-size: clamp(24px, 7vw, 30px); }
  .home-cta__inner p { font-size: 16px; margin: 12px auto 22px; }
  .home-cta__inner .btn-primary { width: 100%; max-width: 360px; justify-content: center; min-height: 54px; }
}

/* Very small phones (~360px and under): keep everything breathing and tappable. */
@media (max-width: 380px) {
  .home-cats { gap: 10px; }
  .home-cat__media { padding: 9px; }
  .home-cat__media img { padding: 8px; }
  .home-cat__body { padding: 11px 12px 13px; }
  .home-cat__name { font-size: 14px; }
  .home-rail ul.products,
  .home-rail .woocommerce ul.products { gap: 10px; }
}

/* ==========================================================================
   Empty state — a reusable "there is nothing here yet, here is the way on"
   block. Lives in main.css, not blog.css: the blog archive that needed it does
   NOT receive blog.css (verified live — none of its rules reach /blog-3/), and
   an empty state that renders unstyled is worse than the problem it fixes.
   ========================================================================== */
.ostu-emptystate { max-width: 46rem; margin: 0 auto; padding: 48px 0 24px; text-align: center; }
.ostu-emptystate__title {
  font-family: var(--font-display, 'Space Grotesk'), sans-serif;
  font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; line-height: 1.2;
  color: var(--slate-dark); margin: 0 0 10px; text-wrap: balance;
}
.ostu-emptystate__text { color: var(--slate-600); font-size: 16px; line-height: 1.65; margin: 0 0 24px; }
.ostu-emptystate__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0; }
@media (max-width: 560px) {
  .ostu-emptystate { padding-top: 32px; }
  .ostu-emptystate__actions .btn-primary,
  .ostu-emptystate__actions .btn-secondary { flex: 1 1 100%; justify-content: center; }
}

/* ==========================================================================
   Shared busy / disabled button states
   Three modules each invented their own name for "this button is working"
   (.is-busy, .is-loading, aria-disabled) and two of them changed nothing at
   all — the shopper pressed, and the button looked exactly the same. One rule,
   loaded on every page, so every module can stop inventing its own.
   ========================================================================== */
.is-busy { opacity: .8; pointer-events: none; }
.btn-primary:disabled, .btn-secondary:disabled,
.btn-primary[aria-disabled="true"], .btn-secondary[aria-disabled="true"] {
  opacity: .6; box-shadow: none; transform: none; pointer-events: none;
}
