/* ==========================================================================
   Robotid24 Modern — main stylesheet
   Mobile-first. Design tokens via CSS custom properties. Zero external deps.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette — smart-home / tech vibe */
  --c-bg:        #f6f8fc;
  --c-surface:   #ffffff;
  --c-surface-2: #f0f3fa;
  --c-ink:       #131a2b;
  --c-ink-soft:  #4a5568;
  --c-muted:     #7b8698;
  --c-line:      #e4e9f2;

  --c-brand:     #4f46e5;   /* indigo */
  --c-brand-600: #4338ca;
  --c-brand-700: #3730a3;
  --c-accent:    #06b6d4;   /* electric cyan */
  --c-accent-600:#0891b2;
  --c-cta:       #ff6a3d;   /* affiliate CTA orange */
  --c-cta-600:   #f2551f;
  --c-ok:        #16a34a;
  --c-star:      #f5a623;

  --grad-brand: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --grad-hero:  linear-gradient(140deg, #eef2ff 0%, #e0f7fb 55%, #f6f8fc 100%);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --fs-base: 1.0625rem;   /* 17px */
  --lh: 1.65;

  /* Spacing / shape */
  --wrap: 1240px;
  --wrap-narrow: 1080px;
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --gap:  clamp(16px, 3vw, 28px);

  --sh-sm: 0 1px 2px rgba(19,26,43,.06), 0 1px 3px rgba(19,26,43,.05);
  --sh:    0 4px 14px rgba(19,26,43,.07), 0 2px 4px rgba(19,26,43,.05);
  --sh-lg: 0 18px 40px -12px rgba(19,26,43,.18), 0 6px 14px rgba(19,26,43,.08);

  --ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-brand); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--c-brand-700); }
button { font: inherit; cursor: pointer; }
ul, ol { padding-left: 1.2em; }
h1,h2,h3,h4 { line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: var(--c-ink); }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 28px); }
.wrap--narrow { max-width: var(--wrap-narrow); }
.section { padding-block: clamp(40px, 7vw, 78px); }
.section--tight { padding-block: clamp(28px, 4vw, 44px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--c-brand); margin-bottom: 12px;
}
.section-head { max-width: 640px; margin-bottom: clamp(22px, 4vw, 38px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--c-ink-soft); font-size: 1.05rem; margin: .5rem 0 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--c-brand); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: .98rem; line-height: 1;
  box-shadow: var(--sh-sm); transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  text-align: center;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--sh); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn--cta { --btn-bg: var(--c-cta); box-shadow: 0 6px 18px -4px rgba(255,106,61,.55); }
.btn--cta:hover { background: var(--c-cta-600); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-brand); border: 1.5px solid var(--c-line); box-shadow: none; background: var(--c-surface); }
.btn--ghost:hover { --btn-fg: var(--c-brand-700); border-color: var(--c-brand); background: var(--c-surface); }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow .2s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--sh); }
.site-header__inner { display: flex; align-items: center; gap: 14px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.28rem; letter-spacing: -.03em; color: var(--c-ink); white-space: nowrap; flex: none; }
.brand:hover { color: var(--c-ink); }
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); }
.brand__mark { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--grad-brand); color: #fff; box-shadow: 0 6px 16px -4px rgba(79,70,229,.5); flex: none; transition: transform .25s var(--ease); overflow: hidden; }
.brand__mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 55%); }
.brand__mark svg { width: 23px; height: 23px; position: relative; z-index: 1; }
.brand__text { line-height: 1; font-weight: 800; }
.brand__text b { color: var(--c-brand); font-weight: 900; }

.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.nav > ul { flex-wrap: nowrap; }
.nav a { display: block; padding: 9px 13px; border-radius: 10px; color: var(--c-ink-soft); font-weight: 600; font-size: .95rem; white-space: nowrap; transition: color .16s var(--ease), background .16s var(--ease); }
/* filled hover — never white-on-white */
.nav a:hover, .nav a:focus-visible, .nav .current-menu-item > a, .nav .current-page-ancestor > a, .nav .current-menu-parent > a { color: #fff; background: var(--c-brand); }
.nav .menu-item-has-children > a:hover::after { border-color: #fff; opacity: .9; }
.nav li { position: relative; }
/* dropdown */
.nav .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r);
  box-shadow: var(--sh-lg); padding: 8px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s var(--ease); z-index: 20;
}
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav .sub-menu a { font-size: .93rem; }
.nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .5; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: 6px; }
/* Polylang language switcher */
.lang-switch ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.lang-switch a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px; font-size: .82rem; font-weight: 700; text-transform: uppercase; color: var(--c-ink-soft); border: 1px solid var(--c-line); }
.lang-switch .current-lang a, .lang-switch a:hover { color: var(--c-brand); border-color: var(--c-brand); background: var(--c-surface-2); }

/* Live search */
.hsearch { position: relative; }
.hsearch__form { display: flex; align-items: center; gap: 8px; background: var(--c-surface-2); border: 1px solid var(--c-line); border-radius: 999px; padding: 0 12px; height: 40px; width: 210px; transition: width .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease); }
.hsearch__form:focus-within { width: 260px; border-color: var(--c-brand); background: var(--c-surface); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.hsearch__icon { color: var(--c-muted); display: inline-flex; flex: none; }
.hsearch__input { border: 0; background: none; outline: none; font: inherit; font-size: .92rem; width: 100%; color: var(--c-ink); }
.hsearch__panel { position: absolute; top: calc(100% + 8px); right: 0; width: min(380px, 88vw); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: var(--sh-lg); padding: 6px; z-index: 60; max-height: 70vh; overflow-y: auto; }
.hsearch__item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--c-ink); }
.hsearch__item:hover { background: var(--c-surface-2); }
.hsearch__thumb { width: 44px; height: 44px; border-radius: 9px; background: var(--c-surface-2) center/cover no-repeat; flex: none; }
.hsearch__thumb--ph { background: linear-gradient(135deg,#eef2ff,#e0f7fb); }
.hsearch__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hsearch__title { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.hsearch__type { font-size: .74rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.hsearch__all { display: block; text-align: center; padding: 11px; font-weight: 700; font-size: .88rem; color: var(--c-brand); border-top: 1px solid var(--c-line); margin-top: 4px; }
.hsearch__all:hover { background: var(--c-surface-2); }
.hsearch__empty { padding: 18px; text-align: center; color: var(--c-muted); font-size: .9rem; }

.header-actions--mobile { display: none; padding: 10px 12px 14px; }
.header-actions--mobile .hsearch, .header-actions--mobile .hsearch__form { width: 100%; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-surface); align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; color: var(--c-ink); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--grad-hero); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(79,70,229,.10) 1px, transparent 0); background-size: 26px 26px; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%); }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 60px); align-items: center; padding-block: clamp(44px, 7vw, 86px); }
.hero__title { margin: 0 0 18px; }
.hero__title .accent { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--c-ink-soft); max-width: 40ch; margin: 0 0 26px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__stats { display: flex; gap: clamp(18px, 4vw, 40px); margin-top: 30px; flex-wrap: wrap; }
.hero__stat b { display: block; font-size: 1.6rem; font-weight: 900; color: var(--c-brand); line-height: 1; }
.hero__stat span { font-size: .85rem; color: var(--c-muted); }
.hero__art { position: relative; display: grid; place-items: center; }
.hero__art-visual { width: min(100%, 460px); filter: drop-shadow(0 30px 40px rgba(79,70,229,.18)); }
.hero__art-visual svg { width: 100%; height: auto; overflow: visible; }
.float-chip { position: absolute; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 999px; padding: 9px 15px; font-size: .84rem; font-weight: 700; color: var(--c-ink); box-shadow: var(--sh); display: inline-flex; align-items: center; gap: 7px; z-index: 2; }
.float-chip svg { color: var(--c-brand); }
.float-chip--tr { top: 4%; right: -2%; }
.float-chip--bl { bottom: 6%; left: -2%; }
@media (max-width: 980px) { .float-chip--tr { right: 4%; } .float-chip--bl { left: 4%; } }
@media (max-width: 480px) { .float-chip { display: none; } }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.cat-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 26px 24px; box-shadow: var(--sh-sm); overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.cat-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad-brand); opacity: 0; transition: opacity .22s var(--ease); }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: transparent; }
.cat-card:hover::before { opacity: 1; }
.cat-card__icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #eef2ff, #e0f7fb); color: var(--c-brand); }
.cat-card__icon svg { width: 30px; height: 30px; }
.cat-card h3 { margin: 0; }
.cat-card p { color: var(--c-ink-soft); font-size: .96rem; margin: 0; flex: 1; }
.cat-card__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; color: var(--c-brand); }
.cat-card__link svg { width: 16px; height: 16px; transition: transform .18s var(--ease); }
.cat-card:hover .cat-card__link svg { transform: translateX(4px); }
.cat-card--wide { grid-column: 1 / -1; }

/* ---------- Card grids (reviews / news) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.card {
  display: flex; flex-direction: column;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--sh-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.card__media { aspect-ratio: 16/10; background: var(--c-surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__tag { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c-accent-600); background: #e0f7fb; padding: 4px 10px; border-radius: 999px; }
.card__title { font-size: 1.12rem; margin: 0; }
.card__title a { color: var(--c-ink); }
.card__title a:hover { color: var(--c-brand); }
.card__excerpt { font-size: .93rem; color: var(--c-ink-soft); margin: 0; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--c-muted); margin-top: 4px; }

/* ---------- Affiliate product card (the "shop" showcase) ---------- */
.robot-card {
  display: flex; flex-direction: column;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-sm); position: relative;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.robot-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); }
.robot-card__badge { position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--grad-brand); color: #fff; font-size: .74rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; box-shadow: var(--sh-sm); }
.robot-card__media { aspect-ratio: 1/1; padding: 20px; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #fff, var(--c-surface-2)); }
.robot-card__media img { max-height: 100%; object-fit: contain; }
.robot-card__body { padding: 0 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.robot-card__title { font-size: 1.16rem; margin: 4px 0 0; }
.robot-card__rating { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--c-ink-soft); }
.robot-card__stars { color: var(--c-star); letter-spacing: 1px; }
.robot-card__specs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; font-size: .9rem; }
.robot-card__specs li { display: flex; align-items: center; gap: 9px; color: var(--c-ink-soft); }
.robot-card__specs svg { width: 17px; height: 17px; color: var(--c-ok); flex: none; }
.robot-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.robot-card__price { font-size: 1.35rem; font-weight: 900; color: var(--c-ink); }
.robot-card__price small { display: block; font-size: .72rem; font-weight: 600; color: var(--c-muted); }

/* ---------- Toplist (ranked) ---------- */
.toplist { display: flex; flex-direction: column; gap: 18px; }
.toprow {
  display: grid; grid-template-columns: auto 120px 1fr auto; gap: 20px; align-items: center;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 20px 24px; box-shadow: var(--sh-sm); transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.toprow:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.toprow__rank { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; font-weight: 900; color: #fff; background: var(--grad-brand); }
.toprow:nth-child(1) .toprow__rank { background: linear-gradient(135deg,#f5a623,#f7c948); color:#4a3a00; }
.toprow:nth-child(2) .toprow__rank { background: linear-gradient(135deg,#b8c0cc,#dde3ea); color:#3a424e; }
.toprow:nth-child(3) .toprow__rank { background: linear-gradient(135deg,#cd7f32,#e0a56a); color:#3a2200; }
.toprow__media { width: 120px; aspect-ratio: 1; display: grid; place-items: center; background: var(--c-surface-2); border-radius: var(--r); padding: 8px; }
.toprow__media img { max-height: 100%; object-fit: contain; }
.toprow__info h3 { margin: 0 0 4px; font-size: 1.18rem; }
.toprow__info p { margin: 0; font-size: .92rem; color: var(--c-ink-soft); }
.toprow__cta { display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: center; }
.toprow__cta .robot-card__rating { justify-content: center; }

/* ---------- Article layout: full-width container + sidebar ---------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.content-main { min-width: 0; }
.content-aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 22px; }
.aside-box { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--sh-sm); }
.aside-box h3 { font-size: 1.02rem; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.aside-box h3 svg { width: 18px; height: 18px; color: var(--c-brand); }
.aside-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.aside-list li { border-top: 1px solid var(--c-line); }
.aside-list li:first-child { border-top: 0; }
.aside-list a { display: block; padding: 10px 0; color: var(--c-ink); font-weight: 600; font-size: .93rem; line-height: 1.35; }
.aside-list a:hover { color: var(--c-brand); }
.aside-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.aside-tags a { font-size: .84rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-ink-soft); }
.aside-tags a:hover { background: var(--c-brand); color: #fff; }
.aside-cta { background: var(--grad-brand); color: #fff; border: 0; }
.aside-cta h3, .aside-cta h3 svg { color: #fff; }
.aside-cta p { color: rgba(255,255,255,.9); font-size: .9rem; margin: 0 0 14px; }

/* ---------- Content / prose ---------- */
.prose { max-width: 72ch; font-size: 1.07rem; }
.prose--wide { max-width: none; }
.prose > h2 { margin: 2.2rem 0 1rem; }
.prose > h3 { margin: 1.8rem 0 .8rem; }
.prose p { margin: 0 0 1.15rem; color: var(--c-ink); }
.prose img { border-radius: var(--r); box-shadow: var(--sh-sm); margin: 1.4rem auto; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3em; }
.prose li { margin-bottom: .5rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { border-left: 4px solid var(--c-brand); background: var(--c-surface-2); padding: 14px 20px; border-radius: 0 var(--r) var(--r) 0; margin: 1.4rem 0; color: var(--c-ink-soft); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .95rem; overflow: hidden; border-radius: var(--r); box-shadow: var(--sh-sm); }
.prose th, .prose td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-line); }
.prose thead th { background: var(--c-surface-2); font-weight: 800; }

/* ---------- Restyle LEGACY content classes (44 old pages upgrade instantly) ---------- */
.main-block { border: 1px solid var(--c-line) !important; border-radius: var(--r-lg); background: var(--c-surface); padding: 26px !important; margin-bottom: 22px; box-shadow: var(--sh-sm); display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; }
.main-block img { border-radius: var(--r); width: 100%; height: 100%; max-height: 160px; object-fit: cover; }
.main-block h2 { margin: 0 0 10px; }
.main-link { text-align: left !important; margin-top: 12px; }
.main-link a { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem !important; font-weight: 700; color: #fff !important; background: var(--c-brand) !important; padding: 12px 22px !important; border-radius: 999px !important; box-shadow: var(--sh-sm) !important; }
.main-link a:hover { background: var(--c-brand-700) !important; transform: translateY(-2px); }

.grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: var(--gap); }
.brand-card { width: auto !important; height: auto !important; aspect-ratio: 4/3; border-radius: var(--r) !important; box-shadow: var(--sh-sm); border: 1px solid var(--c-line); }
.brand-card .overlay { background: linear-gradient(180deg, transparent 40%, rgba(19,26,43,.7)); align-items: flex-end !important; justify-content: flex-start !important; padding: 16px; font-size: 1.1rem !important; }
.cardd { border: 1px solid var(--c-line); box-shadow: var(--sh-sm) !important; border-radius: var(--r) !important; }

.card1-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: var(--gap); margin: 1.4rem 0; }
.card1 { height: auto !important; margin: 0 !important; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: var(--sh-sm); padding-bottom: 16px; display: flex; flex-direction: column; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card1:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.card1 img { height: 150px !important; width: auto !important; max-width: 80%; margin: 16px auto !important; object-fit: contain; background: transparent !important; padding: 0 !important; }
.card1 .content { position: static !important; padding: 0 16px !important; text-align: center; }
.card1 button { background: var(--c-cta) !important; color: #fff !important; border: 0 !important; padding: 11px 20px !important; border-radius: 999px !important; font-weight: 700; margin-top: 10px; box-shadow: var(--sh-sm); }
.card1 button:hover { background: var(--c-cta-600) !important; }
.kirjeldus-list { padding: 0 !important; }
.kirjeldus-list-item { line-height: 1.6; margin-bottom: 16px; }

/* ---------- Brands directory ---------- */
.brand-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(22px,3vw,32px); }
.chip { border: 1.5px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-soft); font-weight: 700; font-size: .9rem; padding: 9px 18px; border-radius: 999px; transition: all .16s var(--ease); }
.chip:hover { border-color: var(--c-brand); color: var(--c-brand); }
.chip.is-active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--gap); }
.brand-card2 { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 26px 18px; box-shadow: var(--sh-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.brand-card2:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: transparent; }
.brand-card2__mono { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg,#eef2ff,#e0f7fb); color: var(--c-brand); font-weight: 900; font-size: 1.6rem; }
.brand-card2__name { font-weight: 800; font-size: 1.1rem; color: var(--c-ink); }
.brand-card2__types { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.brand-card2__tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--c-muted); background: var(--c-surface-2); padding: 3px 8px; border-radius: 999px; }
.brand-card2.is-hidden { display: none; }
.brand-empty { text-align: center; color: var(--c-muted); padding: 40px 0; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .85rem; color: var(--c-muted); padding-block: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--c-ink-soft); }
.crumbs a:hover { color: var(--c-brand); }
.crumbs .sep { opacity: .5; }

/* ---------- Newsletter / CTA band ---------- */
.cta-band { background: var(--grad-brand); border-radius: var(--r-lg); padding: clamp(30px, 5vw, 54px); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 46ch; margin-inline: auto; }
.cta-band .btn--cta { background: #fff; color: var(--c-brand-700); }
.cta-band .btn--cta:hover { background: #fff; color: var(--c-brand-700); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-ink); color: #c7cfdd; margin-top: clamp(50px, 8vw, 90px); }
.site-footer a { color: #c7cfdd; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: clamp(24px, 5vw, 48px); padding-block: clamp(40px, 6vw, 64px); }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .95rem; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer__about { font-size: .95rem; color: #97a1b4; max-width: 34ch; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,.1); padding-block: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; font-size: .85rem; color: #8a95a8; }
.site-footer__disclaimer { font-size: .8rem; color: #79839a; max-width: 70ch; }

/* affiliate disclosure box */
.affiliate-note { background: var(--c-surface-2); border: 1px dashed var(--c-line); border-radius: var(--r); padding: 12px 16px; font-size: .82rem; color: var(--c-muted); margin: 20px 0; display: flex; gap: 10px; align-items: flex-start; }
.affiliate-note svg { width: 18px; height: 18px; flex: none; color: var(--c-brand); margin-top: 1px; }

/* utilities */
.text-center { text-align: center; }
.mt-lg { margin-top: clamp(24px,4vw,40px); }
.hide { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .content-layout { grid-template-columns: 1fr; }
  .content-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .content-aside .aside-box { flex: 1; min-width: 260px; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__cta, .hero__stats { justify-content: center; }
  .hero__art { order: -1; }
  .toprow { grid-template-columns: auto 90px 1fr; }
  .toprow__cta { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: 66px 0 auto 0; margin: 0; background: var(--c-surface); border-bottom: 1px solid var(--c-line); box-shadow: var(--sh-lg); transform: translateY(-120%); transition: transform .28s var(--ease); max-height: calc(100vh - 66px); overflow-y: auto; }
  .nav.is-open { transform: translateY(0); }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px; }
  .nav a { padding: 13px 16px; border-radius: 10px; }
  .nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--c-line); border-radius: 0; margin: 2px 0 6px 14px; padding: 0 0 0 8px; min-width: 0; }
  .nav .menu-item-has-children > a::after { float: right; margin-top: 8px; }
  .header-actions--desktop { display: none; }
  .header-actions--mobile { display: block; }
}

@media (max-width: 620px) {
  :root { --fs-base: 1rem; }
  .main-block { grid-template-columns: 1fr; text-align: center; }
  .main-block img { max-height: 200px; }
  .toprow { grid-template-columns: 64px 1fr; row-gap: 14px; }
  .toprow__media { grid-row: span 2; width: 64px; }
  .toprow__cta { grid-column: 1 / -1; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 18px; }
}

@media (max-width: 400px) {
  .card-grid, .card1-container, .cat-grid { grid-template-columns: 1fr; }
  .btn { padding: 12px 18px; }
}

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