/* ==========================================================================
   Components (DESIGN_SPEC §2)
   Step 1: glass, logo pill, core buttons, header, menu sheet, footer, mobile sticky bar.
   Step 2 adds the remaining components below the marked line.
   ========================================================================== */

/* ---- Glass ---- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.glass--strong {
  background: var(--glass-strong-bg);
  border-color: var(--glass-strong-border);
  box-shadow: var(--glass-strong-highlight), var(--sh-float);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .glass--strong,
  .site-header__bar,
  .sticky-bar,
  .menu-sheet { background: var(--glass-fallback); }
}

/* ---- Icons ---- */
.icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--20 { width: 20px; height: 20px; }
.icon--solar { color: var(--c-solar-text); }

/* ---- Logo pill (logo has dark text, so it always sits on a light pill) ---- */
.logo-pill {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 15px;
  border-radius: var(--r-pill);
  background: var(--logo-pill-bg);
  border: 1px solid var(--logo-pill-border);
  box-shadow: var(--sh-logo);
}
.logo-pill img { width: auto; height: 27px; }

.logo-pill--lg { height: 52px; padding: 0 17px; }
.logo-pill--lg img { height: 34px; }

@media (min-width: 1280px) {
  .logo-pill--header { height: 52px; padding: 0 17px; }
  .logo-pill--header img { height: 34px; }
  .logo-pill--footer { height: 56px; padding: 0 19px; }
  .logo-pill--footer img { height: 38px; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: 700 15px/1 var(--f-head);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast), border-color var(--t-fast), filter var(--t-fast);
}

.btn--primary {
  background: var(--g-solar);
  color: var(--c-on-solar);
  box-shadow: var(--sh-btn-primary);
}
.btn--primary:hover {
  color: var(--c-on-solar);
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--c-ink);
  box-shadow: var(--glass-highlight);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.btn--secondary:hover {
  color: var(--c-ink);
  background: var(--glass-bg-hover);
}

.btn--sm { min-height: 40px; padding: 12px 14px; font-size: 13px; }

/* Round glass icon button (46–52px) */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--c-ink);
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { color: var(--c-ink); background: var(--glass-bg-hover); }
@media (min-width: 1280px) { .icon-btn { width: 46px; height: 46px; } }

/* Count badge on the quote-list button */
.count-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--g-solar);
  color: var(--c-on-solar);
  font: 800 11px/20px var(--f-head);
  text-align: center;
}

/* ==========================================================================
   Header
   Floating glass pill. Fixed on scroll; overlays the hero like the design.
   ========================================================================== */
.site-header {
  position: fixed;
  z-index: 50;
  top: var(--header-top);
  left: 0;
  right: 0;
  padding-inline: var(--header-inset);
  pointer-events: none;
}

.site-header__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1360px;
  height: var(--header-h);
  margin-inline: auto;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--glass-bg-nav-m);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: background-color var(--t-med), box-shadow var(--t-med);
}

/* Once the page scrolls, the bar gets more body so it reads over any content. */
.site-header[data-scrolled] .site-header__bar {
  background: var(--glass-fallback);
  box-shadow: var(--glass-highlight), var(--sh-nav);
}

.site-header__brand { display: inline-flex; border-radius: var(--r-pill); }

.site-header__nav { display: none; }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-header__phone { display: none; }
/* Phones/tablets: "Оферта" sits in the header next to the menu (no floating button in the thumb zone) */
.site-header__quote { gap: 6px; width: auto; padding: 0 14px 0 11px; border-radius: var(--r-pill); }
.site-header__quote-text { font: 700 14px/1 var(--f-head); }
@media (min-width: 960px) {
  .site-header__quote { width: 44px; padding: 0; border-radius: 50%; }
  .site-header__quote-text { display: none; }
}
@media (min-width: 1280px) { .site-header__quote { width: 46px; } }
.site-header__cta { padding: 12px 14px; font-size: 13px; min-height: 44px; box-shadow: none; }

@media (min-width: 640px) {
  .site-header__actions { gap: 10px; }
  .site-header__cta { padding: 14px 20px; font-size: 14px; }
}

@media (min-width: 1280px) {
  .site-header__bar {
    padding: 0 12px 0 10px;
    box-shadow: var(--glass-highlight), var(--sh-nav);
    background: var(--glass-bg);
  }

  .site-header__nav { display: block; }
  .site-header__menu-btn { display: none; }

  .nav-list {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    font: 500 15px/1 var(--f-body);
  }
  .nav-list a {
    display: inline-block;
    padding: 6px 0;
    color: var(--c-ink-muted);
    white-space: nowrap;
  }
  .nav-list a:hover,
  .nav-list a[aria-current="page"] { color: var(--c-ink); }

  .site-header__actions { gap: 14px; }

  .site-header__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--c-ink);
    font: 600 15px/1 var(--f-body);
    white-space: nowrap;
  }
  .site-header__phone:hover { color: var(--c-ink); }
  .site-header__phone-text { display: none; }

  /* 1280–1399px: number hidden, phone shown as a round glass button */
  .site-header__phone {
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
  }

  .site-header__cta {
    padding: 14px 24px;
    font-size: 15px;
    box-shadow: var(--sh-btn-nav);
  }
}

@media (min-width: 1400px) {
  .nav-list { gap: 26px; }
  .site-header__phone-text { display: inline; }
  .site-header__phone {
    width: auto;
    height: auto;
    border: 0;
    border-radius: var(--r-sm);
    background: none;
  }
}

/* ==========================================================================
   Mobile menu sheet (not in the design: full-screen glass sheet, same links)
   Built on <dialog>: native focus trap + Esc; nav.js restores focus.
   ========================================================================== */
.menu-sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: calc(var(--header-top) + env(safe-area-inset-top)) var(--header-inset) calc(24px + env(safe-area-inset-bottom));
  border: 0;
  background: var(--sheet-bg);
  color: var(--c-ink);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  overflow-y: auto;
}
.menu-sheet::backdrop { background: var(--backdrop); }

.menu-sheet[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-in 0.25s ease both;
}
/* On a short screen (browser address bar showing) the sheet scrolls; its parts must not shrink,
   or the top bar gets squeezed and no longer lines up with the page header */
.menu-sheet[open] > * { flex-shrink: 0; }

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.menu-sheet__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--glass-bg-nav-m);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
}

.menu-sheet__list {
  display: flex;
  flex-direction: column;
  margin: 28px 0 0;
  padding: 0 4px;
  list-style: none;
}
.menu-sheet__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px;
  border-bottom: 1px solid var(--hairline);
  color: var(--c-ink);
  font: 700 22px/1.2 var(--f-head);
  letter-spacing: -0.01em;
}
.menu-sheet__list a[aria-current="page"] { color: var(--c-solar-text); }
.menu-sheet__list a:hover { color: var(--c-solar-text); }

.menu-sheet__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding: 28px 4px 0;
}
.menu-sheet__contact .btn { width: 100%; }
.menu-sheet__email {
  align-self: center;
  padding: 8px;
  font: 500 15px/1 var(--f-body);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: 56px;
  padding: 40px 0 28px;
  background: var(--footer-bg);
  border-top: 1px solid var(--hairline);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 16px;
}

.site-footer__brand {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.site-footer__about {
  max-width: 300px;
  font: 400 14px/1.6 var(--f-body);
  color: var(--c-ink-subtle);
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font: 400 14px/1.3 var(--f-body);
}
.site-footer__col--wide { grid-column: 1 / -1; }

.site-footer__title {
  margin-bottom: 4px;
  font: 700 14px/1 var(--f-head);
  color: var(--c-ink);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__list a { color: var(--c-ink-soft); }
.site-footer__list a:hover { color: var(--c-ink); }

.site-footer__tel { color: var(--c-ink); font-weight: 600; }
.site-footer__tel:hover { color: var(--c-solar-text); }
.site-footer__text { color: var(--c-ink-soft); line-height: 1.6; }

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.social a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  border: 1px solid var(--pill-border);
  color: var(--c-ink);
  font: 600 13px/1 var(--f-body);
}
.social a:hover { background: var(--glass-bg-hover); color: var(--c-ink); }

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-soft);
  font: 400 13px/1.4 var(--f-body);
  color: var(--c-ink-subtle);
}

.site-footer__legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer__legal a { display: inline-block; padding-block: 4px; color: var(--c-ink-subtle); }
.site-footer__legal a:hover { color: var(--c-ink); text-decoration: underline; }

/* Mobile footer: compact single column like the design */
@media (max-width: 639.98px) {
  .site-footer { padding-inline: 4px; }
  .site-footer__grid { display: flex; flex-direction: column; gap: 24px; }
  .site-footer__brand { display: contents; }
  .site-footer__brand > a { order: 1; align-self: flex-start; }
  .site-footer__about { order: 2; max-width: none; }
  .site-footer__col--menu { order: 3; }
  .site-footer__col--catalog { display: none; }
  .site-footer__col--contacts { order: 4; gap: 8px; }
  .site-footer__brand > .social { order: 6; }
  .site-footer__col--menu .site-footer__title,
  .site-footer__col--contacts .site-footer__title { display: none; }
  .site-footer__col--menu .site-footer__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .site-footer__col--menu .site-footer__list a { color: var(--c-ink-body); }
  .site-footer__col--contacts { font-weight: 500; }
  .site-footer__col--contacts .site-footer__tel { font-weight: 500; }
  .site-footer__bottom { margin-top: 24px; padding-top: 0; border-top: 0; font-size: 12px; }
}

@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer__col--wide { grid-column: auto; }
  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 960px) {
  .site-footer {
    margin-top: 120px;
    padding: 72px 0 40px;
  }
  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 40px;
  }
  .site-footer__brand { grid-column: auto; }
  .site-footer__about { font-size: 15px; }
  .site-footer__col { font-size: 15px; }
  .site-footer__list a { line-height: 1; }
  .site-footer__bottom {
    margin-top: 56px;
    padding-top: 28px;
    font-size: 14px;
  }
}

/* ==========================================================================
   Mobile sticky action bar (< 960px)
   ========================================================================== */
.sticky-bar {
  position: fixed;
  z-index: 40;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 480px;
  margin-inline: auto;
  padding: 8px;
  border-radius: var(--r-pill);
  background: var(--sticky-bar-bg);
  border: 1px solid var(--sticky-bar-border);
  box-shadow: var(--sh-sticky);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

.sticky-bar .btn {
  height: 48px;
  min-height: 48px;
  padding: 0 12px;
}
.sticky-bar .btn--primary { box-shadow: none; }
.sticky-bar .btn--secondary {
  background: var(--sticky-btn-bg);
  border-color: var(--sticky-btn-border);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.sticky-bar .icon { stroke-width: 1.6; }

@media (min-width: 960px) {
  .sticky-bar { display: none; }
}

/* ==========================================================================
   Step 2 components follow below.
   ========================================================================== */

/* ---- Button variants ---- */
.btn--lg {
  min-height: 52px;
  padding: 18px 30px;
  font-size: 16px;
}
.btn--primary.btn--lg { box-shadow: var(--sh-btn-lg); }
.btn--block { width: 100%; }

/* Tertiary: amber tint ("+ Добави за оферта") → savings tint when added ("✓ В офертата") */
.btn--tertiary {
  padding: 13px;
  background: var(--c-solar-tint);
  border-color: var(--c-solar-border);
  color: var(--c-solar-text);
  font-size: 14px;
}
.btn--tertiary:hover {
  color: var(--c-solar-text);
  background: var(--c-solar-tint-on);
}
.btn--tertiary[aria-pressed="true"] {
  background: var(--c-savings-tint-2);
  border-color: var(--c-savings-border-on);
  color: var(--c-savings);
}

/* Ghost: faint glass ("← Назад", "Нова сметка") */
.btn--ghost {
  background: var(--surface-2);
  border-color: var(--glass-border);
  color: var(--c-ink);
}
.btn--ghost:hover { color: var(--c-ink); background: var(--surface-4); }

/* Dark: submit button on the amber CTA panel */
.btn--dark {
  background: var(--c-night);
  color: var(--c-ink);
}
.btn--dark:hover { color: var(--c-ink); background: var(--c-navy); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* Large round icon button (carousel prev/next, 52px) */
.icon-btn--lg { width: 52px; height: 52px; border-color: var(--glass-strong-border); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }

/* Plain text button (e.g. "Изчисти", "Ново запитване") */
.text-btn {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--c-sky);
  font: 600 14px/1 var(--f-body);
}
.text-btn:hover { color: var(--c-sky-hover); }

/* Sky text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 15px/1 var(--f-body);
  color: var(--c-sky);
}
.link-arrow .icon { width: 16px; height: 16px; stroke-width: 1.8; transition: transform var(--t-fast); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---- Glass cards ---- */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--r-card);
}
@media (min-width: 960px) {
  .card { gap: 20px; padding: 32px; }
}

/* Service card: hover highlight */
.card--service {
  box-shadow: var(--glass-highlight), var(--sh-card);
  transition: background-color var(--t-med), border-color var(--t-med);
}
.card--service:hover,
.card--service:focus-within {
  background: var(--glass-bg-hover);
  border-color: var(--c-solar-border-hover);
}

.card__title { font: 700 19px/1.25 var(--f-head); }
.card__text { font: 400 15px/1.55 var(--f-body); color: var(--c-ink-body); }
@media (min-width: 960px) {
  .card__title { font-size: 23px; }
  .card__text { font-size: 16px; line-height: 1.6; }
}

/* Amber icon tile */
.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: var(--r-input);
  background: var(--c-solar-tint-2);
  border: 1px solid var(--c-solar-border-soft);
  color: var(--c-solar-text);
}
.icon-tile .icon { width: 22px; height: 22px; }
.icon-tile--sky { background: var(--c-sky-tint); border-color: var(--c-sky-border); color: var(--c-sky); }
.icon-tile--solid { background: var(--g-solar); border: 0; color: var(--c-on-solar); }

@media (min-width: 960px) {
  .icon-tile {
    flex-basis: 56px;
    width: 56px;
    height: 56px;
    border-radius: var(--r-tile);
    background: var(--c-solar-icon-grad);
  }
  .icon-tile .icon { width: 26px; height: 26px; }
  .icon-tile--sky { background: var(--c-sky-tint); }
  .icon-tile--solid { background: var(--g-solar); }
}

/* Inset "well" box inside a card */
.well {
  padding: 14px 16px;
  border-radius: var(--r-well);
  background: var(--well-bg-2);
  border: 1px solid var(--hairline);
}
.well--lg { padding: 22px; border-radius: 20px; border-color: var(--well-border-2); }

/* ---- Status pill (green dot) ---- */
.status-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font: 500 12px/1.2 var(--f-body);
  color: var(--c-ink);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
@media (min-width: 960px) {
  .status-pill { gap: 10px; padding: 9px 16px; font-size: 14px; }
}

.dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-savings);
}
.dot--glow { box-shadow: var(--sh-dot-savings); }
.dot--solar { background: var(--g-solar); }

/* ---- Check list (green ticks) ---- */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 15px/1.4 var(--f-body);
}
.check-list li { display: flex; align-items: center; gap: 10px; }
.check-list .icon { color: var(--c-savings); stroke-width: 2; }

.check-list--inline {
  flex-flow: row wrap;
  gap: 10px 28px;
  color: var(--c-ink-muted);
}
.check-list--inline .icon { stroke-width: 1.8; }

/* Ticks inside a soft green circle (segment bullets, desktop) */
@media (min-width: 960px) {
  .check-list--badged { gap: 14px; font-size: 16px; }
  .check-list--badged .check-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--c-savings-tint-2);
    border: 1px solid var(--c-savings-border-soft);
  }
  .check-list--badged .check-badge .icon { width: 14px; height: 14px; }
}

/* ---- Segmented control ---- */
.segmented {
  display: inline-grid;
  align-self: flex-start;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.segmented--block { display: grid; width: 100%; align-self: stretch; }

.segmented__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--c-ink);
  font: 700 14px/1 var(--f-head);
  white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.segmented__btn:hover { background: var(--surface-3); }
.segmented__btn[aria-pressed="true"],
.segmented__btn[aria-selected="true"] {
  background: var(--g-solar);
  color: var(--c-on-solar);
}
.segmented__btn .icon { stroke-width: 1.6; }

@media (min-width: 960px) {
  .segmented { padding: 5px; }
  .segmented__btn { padding: 12px 24px; font-size: 15px; }
}

/* Small inset variant (catalog "Фази") */
.segmented--sm {
  padding: 4px;
  background: var(--input-bg);
  border-color: var(--border-1);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.segmented--sm .segmented__btn {
  min-height: 34px;
  padding: 9px 0;
  font: 600 13px/1 var(--f-body);
}

/* ---- Slider (styled native range; JS sets --pct) ---- */
.range {
  --pct: 50%;
  --range-fill: var(--g-solar-text);
  --range-halo: var(--halo-solar);
  --thumb: 20px;
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.range--sky { --range-fill: linear-gradient(var(--c-sky), var(--c-sky)); --range-halo: var(--halo-sky); }
.range--lg { --thumb: 24px; }
@media (min-width: 960px) { .range--lg { --thumb: 20px; } }

.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: var(--range-fill) 0 / var(--pct) 100% no-repeat, var(--range-track);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb);
  height: var(--thumb);
  margin-top: calc((4px - var(--thumb)) / 2);
  border: 0;
  border-radius: 50%;
  background: var(--c-white);
  box-shadow: 0 0 0 5px var(--range-halo), var(--sh-thumb);
  transition: box-shadow var(--t-fast);
}
.range::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: var(--range-track);
}
.range::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--range-fill);
}
.range::-moz-range-thumb {
  width: var(--thumb);
  height: var(--thumb);
  border: 0;
  border-radius: 50%;
  background: var(--c-white);
  box-shadow: 0 0 0 5px var(--range-halo), var(--sh-thumb);
}
.range:focus-visible { outline: none; box-shadow: none; }
.range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--c-night), 0 0 0 6px var(--c-solar-1), var(--sh-thumb);
}
.range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px var(--c-night), 0 0 0 6px var(--c-solar-1), var(--sh-thumb);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  font: 500 12px/1 var(--f-body);
  color: var(--c-ink-subtle);
}

/* ---- Chips ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--c-ink);
  font: 600 12px/1 var(--f-body);
  white-space: nowrap;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Filter chip (toggle) */
.chip--filter {
  min-height: 36px;
  padding: 9px 14px;
  background: var(--surface-2);
  border-color: var(--pill-border);
  font-size: 13px;
  cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.chip--filter:hover { background: var(--surface-4); }
.chip--filter[aria-pressed="true"] {
  background: var(--c-solar-tint-on);
  border-color: var(--c-solar-border-on);
  color: var(--c-solar-text);
}
/* Square-ish variant (battery kWh buttons) */
.chip--box {
  justify-content: center;
  padding: 10px 0;
  border-radius: 12px;
  font: 700 13px/1 var(--f-head);
}

/* Removable chip (sky tint + ✕) */
.chip--remove {
  min-height: 34px;
  padding: 8px 10px 8px 14px;
  gap: 8px;
  background: var(--c-sky-tint);
  border-color: var(--c-sky-border-on);
  font-size: 13px;
  cursor: pointer;
}
.chip--remove .icon { width: 14px; height: 14px; color: var(--c-sky); stroke-width: 2; }
.chip--remove:hover { background: var(--c-sky-border); }

/* Quick-search chip (catalog "Често търсени") */
.chip--quick {
  min-height: 34px;
  padding: 8px 14px;
  background: var(--surface-2);
  border-color: var(--border-1);
  color: var(--c-ink-faint);
  font: 500 14px/1 var(--f-body);
  cursor: pointer;
}
.chip--quick:hover { color: var(--c-ink); background: var(--surface-4); }

/* Blog tag */
.chip--tag {
  background: var(--c-sky-tint);
  border-color: var(--c-sky-border);
  color: var(--c-sky);
}

/* Battery chip on project cards */
.chip--yes {
  background: var(--c-savings-tint);
  border-color: var(--c-savings-border);
  color: var(--c-savings);
}
.chip--no {
  background: var(--surface-1);
  border-color: var(--border-1);
  color: var(--c-ink-muted);
}

/* Stock pill (on product images) */

/* Brand tag on product images */
.chip--brand {
  border-radius: var(--r-sm);
  background: var(--surface-6);
  border-color: var(--pill-border);
  font: 800 12px/1 var(--f-head);
}

/* kW badge (solar) */
.badge-kw {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: var(--g-solar);
  color: var(--c-on-solar);
  font: 800 14px/1 var(--f-head);
  white-space: nowrap;
}

/* Glass chip over images ("Типичен системи…", "5–10 kW + батерия") */
.chip--glass {
  gap: 10px;
  padding: 10px 14px;
  background: var(--overlay-glass);
  border-color: var(--glass-strong-border);
  font: 600 14px/1 var(--f-body);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* ---- Checkbox row (catalog brand filter) ---- */
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  font: 500 15px/1 var(--f-body);
  color: var(--c-ink);
  cursor: pointer;
}
.check-row input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 6px;
  background: var(--input-bg);
  border: 1px solid var(--border-4);
  cursor: pointer;
}
.check-row input::after {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border-left: 3px solid var(--c-on-solar);
  border-bottom: 3px solid var(--c-on-solar);
  transform: rotate(-45deg);
  opacity: 0;
}
.check-row input:checked {
  background: var(--g-solar);
  border-color: var(--c-solar-1);
}
.check-row input:checked::after { opacity: 1; }
.check-row__label { flex: 1; }
.check-row__count { color: var(--c-ink-subtle); font-size: 13px; }

/* ---- Stat tile ---- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 14px;
  border-radius: var(--r-well);
  background: var(--well-bg);
  border: 1px solid var(--well-border);
}
.stat__value {
  font: 800 28px/1 var(--f-head);
  letter-spacing: -0.02em;
}
.stat__label {
  font: 500 12px/1.25 var(--f-body);
  color: var(--c-ink-soft);
}
.stat--savings {
  background: var(--c-savings-tint);
  border-color: var(--c-savings-border-soft);
}
.stat--savings .stat__value { color: var(--c-savings); }
.stat--lg .stat__value { font-size: 36px; }
@media (min-width: 960px) {
  .stat--xl .stat__value { font-size: 40px; }
}

/* ---- Media slot: real <img> over a gradient placeholder ---- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--ph-stripes-md), var(--g-ph-segment);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--hero { background: var(--ph-stripes), var(--g-ph-hero); }
.media--project { background: var(--ph-stripes-md), var(--g-ph-project); }
.media--post { background: var(--ph-stripes-md), var(--g-ph-post); }
.media--product { background: var(--ph-stripes-sm), var(--g-ph-product); }

/* ---- Product card ---- */
.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card);
  overflow: hidden;
}

.product-card__media {
  height: 200px;
  margin: 10px;
  border-radius: var(--r-well);
}
.product-card__media .chip--brand { position: absolute; right: 12px; top: 12px; }

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 10px 22px 22px;
}

.product-card__brand,
.eyebrow-sky {
  font: 700 12px/1 var(--f-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-sky);
}
.product-card__model { font: 700 18px/1.3 var(--f-head); }
.product-card__type { font: 400 14px/1.2 var(--f-body); color: var(--c-ink-subtle); }

.product-card__foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.product-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.price {
  font: 600 14px/1 var(--f-body);
  color: var(--c-ink-muted);
}
.price--value { font: 800 18px/1 var(--f-head); color: var(--c-ink); }

.datasheet-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 13px/1 var(--f-body);
  white-space: nowrap;
}
.datasheet-link .icon { width: 15px; height: 15px; stroke-width: 1.6; }

/* ---- Project card ---- */
.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card);
  overflow: hidden;
}
.project-card__media { height: 180px; }
.project-card__media .badge-kw { position: absolute; right: 14px; top: 14px; }
.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}
.project-card__title { font: 700 19px/1.3 var(--f-head); }
.project-card__text { font: 400 14px/1.45 var(--f-body); color: var(--c-ink-soft); }

/* ---- Article card ---- */
.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card);
  overflow: hidden;
  color: var(--c-ink);
  transition: border-color var(--t-med), background-color var(--t-med);
}
.post-card:hover { color: var(--c-ink); border-color: var(--c-solar-border-hover); }
.post-card__media { height: 200px; }
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}
.post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 13px/1 var(--f-body);
  color: var(--c-ink-subtle);
}
.post-card__title { font: 700 19px/1.35 var(--f-head); text-wrap: pretty; }
.post-card__text { font: 400 15px/1.6 var(--f-body); color: var(--c-ink-soft); }
.post-card__more { font: 600 15px/1 var(--f-body); color: var(--c-sky); }
@media (min-width: 960px) {
  .post-card__media { height: 220px; }
  .post-card__body { padding: 26px; }
  .post-card__title { font-size: 21px; }
}

/* ---- FAQ accordion ---- */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq__item {
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  box-shadow: inset 0 1px 0 var(--border-3);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: background-color var(--t-med);
}
.faq__item:has(.faq__q[aria-expanded="true"]) { background: var(--surface-5); }

.faq__heading { font: inherit; }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  background: none;
  color: var(--c-ink);
  text-align: left;
  font: 700 15px/1.4 var(--f-head);
}
.faq__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-3);
  color: var(--c-solar-text);
  transition: transform var(--t-med);
}
.faq__icon .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(45deg); }

.faq__a {
  max-width: 680px;
  padding: 0 18px 18px;
  font: 400 14px/1.6 var(--f-body);
  color: var(--c-ink-muted);
}
@media (min-width: 960px) {
  .faq__q { gap: 20px; padding: 24px 26px; font-size: 18px; }
  .faq__icon { flex-basis: 36px; height: 36px; }
  .faq__a { padding: 0 26px 26px; font-size: 16px; line-height: 1.65; }
}

/* ---- Form fields ---- */
.form-grid {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid .field--full { grid-column: 1 / -1; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field__label {
  font: 600 14px/1.2 var(--f-body);
  color: var(--c-ink-muted);
}

.input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border-radius: var(--r-input);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--c-ink);
  font: 500 16px/1.2 var(--f-body);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input--lg { height: 56px; padding: 0 20px; border-radius: var(--r-well); }
textarea.input {
  height: auto;
  min-height: 96px;
  padding: 14px 18px;
  line-height: 1.5;
  resize: vertical;
}
select.input {
  padding-right: 44px;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-ink) 50%), linear-gradient(135deg, var(--c-ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select.input option { color: var(--c-night); }

.input::placeholder { color: var(--input-placeholder); opacity: 1; }
.input:hover { border-color: var(--border-4); }
.input:focus-visible,
.input:focus {
  outline: none;
  border-color: var(--c-solar-1);
  box-shadow: var(--focus-ring);
}
.input[aria-invalid="true"] {
  border-color: var(--c-error-border);
  background-color: var(--c-error-tint);
}
.field__error {
  font: 500 13px/1.4 var(--f-body);
  color: var(--c-error-text);
}

/* Light inputs on the amber CTA panel */
.input--light {
  background: var(--input-light-bg);
  border-color: var(--input-light-border);
  color: var(--c-on-solar);
}
.input--light::placeholder { color: var(--input-light-placeholder); }
.input--light:hover { border-color: var(--c-on-solar); }
.input--light:focus,
.input--light:focus-visible {
  border-color: var(--c-night);
  box-shadow: 0 0 0 4px var(--input-light-border);
}
.input--light[aria-invalid="true"] { border-color: var(--c-night); background-color: var(--input-light-bg); }
.field__error--dark { color: var(--c-on-solar); font-weight: 700; }

.form-note {
  font: 400 13px/1.5 var(--f-body);
  color: var(--c-ink-subtle);
}
.form-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.form-note a:hover { color: var(--c-ink); }

/* Spam honeypot: hidden from people, visible to bots */
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Stepper (− n +) ---- */
.stepper {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
}
.stepper__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-4);
  color: var(--c-ink);
  font: 600 20px/1 var(--f-body);
}
.stepper__btn:hover { background: var(--surface-6); }
.stepper__btn:disabled { opacity: 0.35; cursor: default; }
.stepper__value {
  min-width: 56px;
  text-align: center;
  font: 800 26px/1 var(--f-head);
}

.stepper--sm {
  gap: 2px;
  padding: 3px;
  background: var(--input-bg);
  border-color: var(--border-1);
}
.stepper--sm .stepper__btn { width: 32px; height: 32px; font: 700 15px/1 var(--f-body); }
.stepper--sm .stepper__value { min-width: 24px; font-size: 14px; }

/* ---- Option card (selectable: calculator type, panel power) ---- */
.option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-1);
  border: 1px solid var(--pill-border);
  color: var(--c-ink);
  text-align: left;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.option-card:hover { background: var(--surface-3); }
.option-card[aria-pressed="true"],
.option-card[aria-checked="true"] {
  background: var(--c-solar-tint-2);
  border-color: var(--c-solar-border-on);
}
.option-card__title { font: 700 18px/1 var(--f-head); }
.option-card__text { font: 400 14px/1.4 var(--f-body); color: var(--c-ink-soft); }
.option-card--stack {
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 18px 8px;
  border-radius: var(--r-well);
  text-align: center;
}
.option-card--stack .option-card__title { font-size: 24px; font-weight: 800; }
.option-card--stack .option-card__text { font: 500 12px/1 var(--f-body); color: var(--c-ink-subtle); }
@media (min-width: 960px) { .option-card { padding: 22px; } }

/* ---- Success state ---- */
.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 12px;
  text-align: center;
}
.success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--c-savings-tint-3);
  border: 1px solid var(--c-savings-border-on);
  box-shadow: var(--sh-glow-savings);
  color: var(--c-savings);
}
.success__icon .icon { width: 32px; height: 32px; stroke-width: 2; }
.success__title { font: 800 22px/1.2 var(--f-head); }
.success__text { max-width: 480px; font: 400 15px/1.55 var(--f-body); color: var(--c-ink-body); }

/* ---- Quote-list floating button ---- */
.quote-fab {
  position: fixed;
  z-index: 45;
  right: 16px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--r-pill);
  background: var(--fab-bg);
  border: 1px solid var(--border-4);
  box-shadow: var(--glass-strong-highlight), var(--sh-nav);
  color: var(--c-ink);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.quote-fab__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--g-solar);
  color: var(--c-on-solar);
}
.quote-fab__icon .icon { width: 22px; height: 22px; stroke-width: 1.7; }
.quote-fab__count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--c-night);
  border: 2px solid var(--c-solar-1);
  color: var(--c-solar-text);
  font: 800 11px/18px var(--f-head);
  text-align: center;
}
.quote-fab__text { display: none; flex-direction: column; gap: 4px; text-align: left; }
.quote-fab__title { font: 700 15px/1 var(--f-head); }
.quote-fab__sub { font: 500 12px/1 var(--f-body); color: var(--c-ink-soft); }
@media (min-width: 960px) {
  .quote-fab { right: 40px; bottom: 40px; padding: 10px 22px 10px 10px; }
  .quote-fab__text { display: flex; }
}

/* ---- Drawer (right side on desktop, bottom sheet on mobile). Built on <dialog>. ---- */
.drawer {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: 92vh;
  /* the *visible* height: on iPhone Safari 100vh is taller than the screen while the address bar shows */
  max-height: calc(100dvh - 12px - env(safe-area-inset-top));
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--glass-strong-border);
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--drawer-bg);
  color: var(--c-ink);
  box-shadow: var(--sh-drawer);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  overflow: hidden;
}
.drawer::backdrop { background: var(--drawer-backdrop); }
.drawer[open] {
  display: flex;
  flex-direction: column;
  animation: drawer-up 0.3s ease both;
}
@keyframes drawer-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drawer-left { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.drawer__inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.drawer__title { font: 800 22px/1 var(--f-head); }
.drawer__sub { margin-top: 6px; font: 500 14px/1.3 var(--f-body); color: var(--c-ink-soft); }
.drawer__divider { height: 1px; background: var(--surface-6); }

@media (min-width: 640px) {
  .drawer {
    inset: 0 0 0 auto;
    width: 460px;
    height: 100%;
    max-height: none;
    border-top: 0;
    border-left: 1px solid var(--glass-strong-border);
    border-radius: var(--r-card) 0 0 var(--r-card);
  }
  .drawer[open] { animation-name: drawer-left; }
  .drawer__inner { padding: 28px; }
  .drawer__title { font-size: 24px; }
}

/* Line item inside the quote drawer */
.line-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--border-1);
}
.line-item__thumb {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 12px;
}
.line-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.line-item__brand { font: 700 11px/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-sky); }
.line-item__model { font: 700 14px/1.25 var(--f-head); }

/* ---- Breadcrumb ---- */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 14px/1 var(--f-body);
  color: var(--c-ink-subtle);
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; }
.breadcrumb a { color: var(--c-ink-subtle); }
.breadcrumb a:hover { color: var(--c-ink); }
.breadcrumb [aria-current="page"] { color: var(--c-ink); }

/* ---- Section head (eyebrow + h2 + optional aside) ---- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.section-head__text { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 960px) {
  .section-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
  }
  .section-head__text { gap: 16px; }
}

/* ---- Form send error (added by js/forms.js) ---- */
.form-status {
  padding: 12px 14px;
  border-radius: var(--r-input);
  background: var(--c-error-tint);
  border: 1px solid var(--c-error-border);
  color: var(--c-error-text);
  font: 500 14px/1.45 var(--f-body);
}
.wizard > .form-status { margin: 0 40px 32px; }
@media (max-width: 959.98px) { .wizard > .form-status { margin: 12px 0 0; } }
.cta .form-status {
  background: var(--input-light-bg);
  border-color: var(--c-night);
  color: var(--c-on-solar);
  font-weight: 600;
}

/* ==========================================================================
   404 page
   ========================================================================== */
.nf { padding: calc(var(--header-top) + var(--header-h) + 64px) 0 40px; }
.nf__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-height: 50vh;
}
.nf__code {
  font: 800 96px/1 var(--f-head);
  letter-spacing: -0.04em;
  background: var(--g-solar-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nf__text { max-width: 560px; }
.nf__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.nf__contact { font: 500 15px/1.5 var(--f-body); color: var(--c-ink-body); }
.nf-glow--1 { right: -160px; top: -120px; }
.nf-glow--2 { left: -180px; top: 420px; }
@media (min-width: 960px) {
  .nf { padding-top: calc(var(--header-top) + var(--header-h) + 120px); }
  .nf__code { font-size: 160px; }
  .nf-glow--1 { width: 640px; }
  .nf-glow--2 { width: 620px; }
}

/* ==========================================================================
   Real content additions
   ========================================================================== */

/* Product photos (white background) sit in a light well and are never cropped */
.media--product.has-photo { background: var(--product-photo-bg); }
.media--product.has-photo > img { object-fit: contain; padding: 12px; }

/* Whole card is clickable via a stretched title link; inner buttons stay on top */
.product-card,
.project-card,
.post-card { position: relative; }
.product-card__link,
.project-card__link,
.post-card__link { color: inherit; }
.product-card__link:hover,
.project-card__link:hover,
.post-card__link:hover { color: inherit; }
.product-card__link::after,
.project-card__link::after,
.post-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.product-card__link:focus-visible,
.project-card__link:focus-visible,
.post-card__link:focus-visible { outline: none; box-shadow: none; }
.product-card:has(.product-card__link:focus-visible),
.project-card:has(.project-card__link:focus-visible),
.post-card:has(.post-card__link:focus-visible) {
  outline: var(--focus-outline);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}
/* Controls inside a card sit above its stretched link, or taps on them open the card instead */
.product-card .btn,
.product-card .datasheet-link,
.product-card .compare-check,
.project-card .btn { position: relative; z-index: 2; }
.product-card,
.project-card { transition: border-color var(--t-med), background-color var(--t-med); }
.product-card:hover,
.project-card:hover { border-color: var(--c-solar-border-hover); }
.post-card__more { margin-top: auto; }

/* ---- Touch targets: standalone text links get a 44px tap area (QA, 21 Nov) ---- */
.products__all,
.blog__all,
.related__all,
.datasheet-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.breadcrumb a { display: inline-block; padding-block: 4px; }
@media (max-width: 959.98px) {
  .site-footer__list a,
  .site-footer__col > a { display: inline-block; padding-block: 4px; }
}

/* ==========================================================================
   Quote list on every page: floating "Оферта" button + drawer (js/quote-drawer.js)
   ========================================================================== */
.drawer__handle {
  align-self: center;
  flex: 0 0 auto;
  width: 40px;
  height: 4px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: var(--border-4);
}
@media (min-width: 640px) { .drawer__handle { display: none; } }

/* Mobile: round count + "Оферта", sitting just above the bottom action bar */
.quote-fab {
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  min-height: 52px;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  background: var(--fab-bg-m);
  box-shadow: var(--sh-fab-m);
}
.quote-fab__icon { width: 40px; height: 40px; }
.quote-fab__icon .icon,
.quote-fab__icon .quote-fab__count { display: none; }
.quote-fab__icon::after {
  content: attr(data-num);
  font: 800 14px/1 var(--f-head);
}
.quote-fab__short { font: 700 14px/1 var(--f-head); }

/* Calculator page: above the result bar; hidden while that bar is expanded */
.is-calculator .quote-fab { bottom: calc(100px + env(safe-area-inset-bottom)); }
.is-calculator:has([data-summary-toggle][aria-expanded="true"]) .quote-fab { display: none; }

@media (min-width: 960px) {
  .quote-fab,
  .is-calculator .quote-fab {
    right: 40px;
    bottom: 40px;
    gap: 12px;
    padding: 10px 22px 10px 10px;
    background: var(--fab-bg);
    box-shadow: var(--glass-strong-highlight), var(--sh-nav);
  }
  .quote-fab__icon { width: 48px; height: 48px; }
  .quote-fab__icon .icon { display: block; }
  .quote-fab__icon .quote-fab__count { display: block; }
  .quote-fab__icon::after { content: none; }
  .quote-fab__short { display: none; }
}

.quote-items { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.quote-empty { font: 400 14px/1.5 var(--f-body); color: var(--c-ink-subtle); }

/* Each item links to its product page; the −/+ stepper stays separate */
.line-item__link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 14px;
  min-width: 0;
  border-radius: 12px;
  color: var(--c-ink);
}
.line-item__link:hover { color: var(--c-ink); }
.line-item__link:hover .line-item__model { color: var(--c-solar-text); text-decoration: underline; text-underline-offset: 3px; }
.line-item__link .line-item__body { flex: 1; }
.line-item__model { overflow-wrap: anywhere; }
.line-item__thumb.has-photo > img { padding: 4px; }

.quote-form { display: flex; flex-direction: column; gap: 12px; }
.quote-form__title { font: 700 17px/1 var(--f-head); }
.quote-form .input { height: 52px; border-color: var(--border-2); font-size: 15px; }
.quote-form textarea.input { height: auto; resize: none; }
.quote-form__submit { margin-top: 6px; padding: 18px; box-shadow: var(--sh-btn-primary); }
.quote-form__note { text-align: center; font-size: 12px; }
@media (max-width: 639.98px) {
  .quote-form .input { height: 48px; }
  .quote-drawer .drawer__title { font-size: 20px; }
}

/* ==========================================================================
   Mobile header + menu (client feedback, 21 Nov)
   ========================================================================== */
/* The bottom bar's "Калкулатор" button replaces the header CTA on phones/tablets */
@media (max-width: 959.98px) {
  .site-header__cta { display: none; }
}

/* Open menu: its top bar is the page header's exact twin (same position, height, padding, logo and
   button size), so opening the menu only swaps ☰ for ✕. Focus goes to the sheet itself, so no ring on ✕. */
.menu-sheet:focus,
.menu-sheet:focus-visible { outline: none; box-shadow: none; }
.site-header { top: calc(var(--header-top) + env(safe-area-inset-top)); }

/* ==========================================================================
   Bottom sheets (filters, quote list): sticky top bar with title + ✕
   ========================================================================== */
.drawer:focus,
.drawer:focus-visible { outline: none; box-shadow: none; }
.drawer__bar {
  position: sticky;
  top: -22px;   /* sticky offsets are measured inside the drawer padding; this pins the bar to the real top edge */
  z-index: 3;
  display: flex;
  flex-direction: column;
  margin: -22px -20px 0;
  padding: 12px 20px 14px;
  background: var(--c-navy);
  border-bottom: 1px solid var(--hairline);
}
.drawer__actions { display: flex; align-items: center; gap: 8px; }
.drawer__actions .text-btn { min-height: 44px; padding-inline: 8px; }
@media (min-width: 640px) {
  .drawer__bar { top: -28px; margin: -28px -28px 0; padding: 22px 28px 18px; }
}

/* ---- Weekly promotions (data/promotions.js) ---- */
.chip--promo {
  border: 0;
  background: var(--g-solar);
  color: var(--c-on-solar);
  font: 800 12px/1 var(--f-head);
}
.product-card__media .chip--promo { position: absolute; left: 12px; top: 12px; }
.product-card__promo-note { font: 600 13px/1.35 var(--f-body); color: var(--c-solar-text); }
.price__old { margin-left: 6px; font: 500 13px/1 var(--f-body); color: var(--c-ink-subtle); }
.pd__promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font: 500 14px/1.4 var(--f-body);
  color: var(--c-ink-body);
}
.pd__promo a { color: var(--c-solar-text); text-decoration: underline; text-underline-offset: 3px; }

/* Icon-only social link (Facebook) */
.social a.social__icon { justify-content: center; width: 44px; min-height: 44px; padding: 0; }
.social__icon svg { width: 20px; height: 20px; fill: currentColor; }

/* ---- Product comparison: card toggle, floating bar, status message (js/compare.js) ---- */
.compare-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 4px 0 0;
  background: none;
  border: 0;
  color: var(--c-ink-soft);
  font: 600 13px/1 var(--f-body);
  cursor: pointer;
}
.compare-check:hover { color: var(--c-ink); }
.compare-check__box {
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--input-bg);
  border: 1px solid var(--border-4);
}
.compare-check__box::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid var(--c-on-solar);
  border-bottom: 2px solid var(--c-on-solar);
  transform: rotate(-45deg);
  opacity: 0;
}
.compare-check[aria-pressed="true"] { color: var(--c-solar-text); }
.compare-check[aria-pressed="true"] .compare-check__box { background: var(--g-solar); border-color: var(--c-solar-1); }
.compare-check[aria-pressed="true"] .compare-check__box::after { opacity: 1; }
.pd__compare[aria-pressed="true"] { background: var(--c-solar-tint-on); border-color: var(--c-solar-border-on); color: var(--c-solar-text); }
.pd__compare .icon { width: 18px; height: 18px; }

.compare-bar {
  position: fixed;
  z-index: 45;
  left: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--fab-bg-m);
  border: 1px solid var(--border-4);
  box-shadow: var(--sh-fab-m);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.compare-bar[hidden] { display: none; }
.compare-bar__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--g-solar);
  color: var(--c-on-solar);
  font: 700 14px/1 var(--f-head);
}
.compare-bar__go:hover { color: var(--c-on-solar); }
.compare-bar__go .icon { width: 18px; height: 18px; }
.compare-bar__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--c-on-solar);
  color: var(--c-solar-1);
  font-size: 12px;
}
.compare-bar__clear {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: none;
  border: 0;
  color: var(--c-ink-soft);
  cursor: pointer;
}
.compare-bar__clear:hover { color: var(--c-ink); background: var(--surface-3); }
.compare-bar__clear .icon { width: 18px; height: 18px; }
.compare-toast {
  position: fixed;
  z-index: 46;
  left: 16px;
  right: 16px;
  bottom: calc(156px + env(safe-area-inset-bottom));
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: var(--r-input);
  background: var(--fab-bg-m);
  border: 1px solid var(--border-4);
  box-shadow: var(--sh-nav);
  color: var(--c-ink);
  font: 500 14px/1.4 var(--f-body);
  text-align: center;
}
.compare-toast[hidden] { display: none; }
@media (min-width: 960px) {
  .compare-bar { left: 50%; bottom: 40px; padding: 6px; transform: translateX(-50%); background: var(--fab-bg); box-shadow: var(--glass-strong-highlight), var(--sh-nav); }
  .compare-toast { bottom: 112px; }
}

/* The floating "Оферта" button is desktop-only; below 960px the header button replaces it */
@media (max-width: 959.98px) {
  .quote-fab,
  .is-calculator .quote-fab { display: none; }
}

/* ==========================================================================
   Holiday raffle popup (js/tombola.js)
   ========================================================================== */
.tombola {
  width: min(720px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-panel);
  background: transparent;
  color: var(--c-ink);
  overflow: visible;
}
.tombola::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.tombola[open] { animation: tombola-in 0.3s ease-out; }
@keyframes tombola-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .tombola[open] { animation: none; } }

.tombola__card {
  position: relative;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--r-panel);
  background: var(--drawer-bg);
  border: 1px solid var(--glass-strong-border);
  box-shadow: var(--sh-drawer);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
}
.tombola__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  background: var(--overlay-dark);
  border-radius: 50%;
}
.tombola__banner { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.tombola__body { display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 22px; }
.tombola__eyebrow { font: 600 12px/1 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-solar-text); }
.tombola__title { font: 800 22px/1.2 var(--f-head); }
.tombola__facts { display: grid; gap: 10px; }
.tombola__facts li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: var(--r-well);
  background: var(--well-bg);
  border: 1px solid var(--well-border);
}
.tombola__facts strong { font: 700 15px/1.3 var(--f-head); color: var(--c-ink); }
.tombola__facts span { font-size: 14px; line-height: 1.4; color: var(--c-ink-muted); }
.tombola__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tombola__actions .btn { flex: 1 1 180px; }

@media (min-width: 640px) {
  .tombola__body { padding: 24px 28px 28px; gap: 16px; }
  .tombola__title { font-size: 26px; }
  .tombola__facts { grid-template-columns: 1fr 1fr; }
}

/* Raffle gift button: fixed tab on the left edge, opens the raffle popup */
.tombola-tab {
  position: fixed;
  z-index: 44;
  left: 0;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 14px 7px;
  border: 0;
  border-radius: 0 14px 14px 0;
  background: var(--g-solar);
  color: var(--c-on-solar);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
  cursor: pointer;
}
.tombola-tab .icon { width: 20px; height: 20px; }
.tombola-tab__text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 800 13px/1 var(--f-head);
  letter-spacing: 0.04em;
}
.tombola-tab:hover { padding-left: 11px; }
.tombola-tab:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.35); }
@media (prefers-reduced-motion: no-preference) {
  .tombola-tab { transition: padding-left var(--t-fast); }
  .tombola-tab .icon { animation: tombola-gift 2.4s ease-in-out 2s 3; }
}
@keyframes tombola-gift { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-12deg); } 86% { transform: rotate(10deg); } 94% { transform: rotate(-6deg); } }
@media print { .tombola-tab { display: none; } }
