/* =========================================================================
   Дизайн-система сайту (за CLAUDE.md): темно-синій + білий, стиль Windows 11
   / Fluent. Єдине джерело стилів. Кольори/радіуси/тіні — через CSS-змінні.
   ========================================================================= */

:root {
  /* Бренд — темно-синій */
  --brand-900: #0F3D91;
  --brand-700: #1E3A8A;
  --brand-500: #2563EB;
  --brand-500-rgb: 37, 99, 235;

  /* Білий і поверхні (Mica-багатошаровість) */
  --white: #FFFFFF;
  --surface: #F8FAFC;
  --surface-2: #F3F4F6;

  /* Текст і межі */
  --text: #1F2933;
  --text-muted: #5B6470;
  --border: #E2E8F0;

  /* Статуси */
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;

  /* Радіуси */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;

  /* Тіні-«висота» (Fluent elevation) */
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 6px rgba(15, 23, 42, .06);
  --shadow-2: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 20px rgba(15, 23, 42, .10);
  --shadow-3: 0 12px 32px rgba(15, 23, 42, .16);

  --transition: 160ms ease;

  --font-sans: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--brand-900); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; max-width: 65ch; }
a { color: var(--brand-500); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Службовий текст лишається доступним для скрінрідерів, але не займає місце в UI. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.container-ts { width: min(1200px, 92%); margin-inline: auto; }
.section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.section--surface { background: var(--surface); }

/* ------------------ Ненав'язлива консультаційна панель ------------------ */
.consultation-panel {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  z-index: 1100;
  width: min(440px, calc(100vw - 2rem));
  padding: 1.4rem 3.5rem 1.4rem 1.4rem;
  border: 1px solid rgba(var(--brand-500-rgb), .24);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(var(--brand-500-rgb), .08), rgba(255, 255, 255, .98) 42%),
    var(--white);
  box-shadow: var(--shadow-3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(.98);
  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease;
}
.consultation-panel.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.consultation-panel__close {
  position: absolute;
  top: .65rem;
  right: .65rem;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.consultation-panel__close:hover {
  color: var(--brand-900);
  background: rgba(var(--brand-500-rgb), .1);
}
.consultation-panel__close:focus-visible {
  outline: 3px solid rgba(var(--brand-500-rgb), .35);
  outline-offset: 2px;
}
.consultation-panel__eyebrow {
  display: block;
  margin-bottom: .45rem;
  color: var(--brand-500);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.consultation-panel h2 {
  margin-bottom: .65rem;
  font-size: 1.35rem;
}
.consultation-panel p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: .95rem;
}
.consultation-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.consultation-panel__actions .btn {
  flex: 1 1 175px;
  min-height: 44px;
}
@media (max-width: 560px) {
  .consultation-panel {
    right: .75rem;
    bottom: .75rem;
    width: calc(100vw - 1.5rem);
    padding: 1.2rem 1rem 1rem;
    border-radius: var(--radius-lg);
  }
  .consultation-panel h2 { padding-right: 2.6rem; font-size: 1.2rem; }
  .consultation-panel__actions .btn { flex-basis: 100%; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .consultation-panel { transition: none; }
}
.section__head { text-align: center; max-width: 760px; margin: 0 auto 2.5rem; }
.section__head p { margin-inline: auto; color: var(--text-muted); font-size: 1.05rem; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand-500); margin-bottom: .6rem;
}

/* Видимий focus на всіх інтерактивних елементах */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--brand-500-rgb), .35);
  border-radius: var(--radius-sm);
}

/* ----------------------------- Кнопки ----------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1;
  padding: .8rem 1.4rem; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand-500); color: #fff; box-shadow: var(--shadow-1); }
.btn--primary:hover { background: var(--brand-700); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn--secondary { background: #fff; color: var(--brand-700); border-color: var(--brand-500); }
.btn--secondary:hover { background: rgba(var(--brand-500-rgb), .06); }
.btn--ghost { background: transparent; color: var(--brand-700); }
.btn--ghost:hover { background: rgba(var(--brand-500-rgb), .08); }
.btn--lg { font-size: 1.1rem; padding: 1rem 1.8rem; }
.btn--block { width: 100%; }
.btn--light { background: #fff; color: var(--brand-900); }
.btn--light:hover { background: var(--surface-2); }

/* ----------------------------- Навбар ----------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 66px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--brand-900); font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand__mark { display: inline-flex; align-items: center; }
.brand__soft { color: var(--brand-500); }
.brand__placeholder { font-size: .7rem; color: var(--text-muted); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.site-nav a { color: var(--text); font-weight: 500; }
.site-nav a:hover { color: var(--brand-500); text-decoration: none; }
.site-header__phone { color: var(--brand-900); font-weight: 600; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--brand-900); margin: 4px 0; border-radius: 2px; }

@media (max-width: 1080px) {
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    align-items: flex-start; gap: .25rem; background: #fff; padding: 1rem 4%;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2);
    margin-left: 0; display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav .btn { width: 100%; }
}

/* ------------------------------- Hero ----------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(var(--brand-500-rgb), .12), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--white));
}
.hero__inner { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero h1 { max-width: 16ch; }
.hero__lead { font-size: 1.2rem; color: var(--text-muted); max-width: 60ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.6rem 0 2.4rem; }

/* Hero: текст + сітка відео (до 4). Без відео — контент на всю ширину. */
.hero__top--split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hero__top--split .hero__cta { margin-bottom: 0; }
.hero__media { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.hero__media--single { grid-template-columns: 1fr; }
.hero__video {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-2);
  border: 1px solid var(--border);
}
.hero__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hero__video-item { margin: 0; }
.hero__video-title {
  margin-top: .5rem; font-size: .9rem; font-weight: 600; color: var(--brand-900);
  line-height: 1.3; text-align: center;
}
@media (max-width: 860px) {
  .hero__top--split { grid-template-columns: 1fr; }
  .hero__top--split .hero__cta { margin-bottom: 2.4rem; }
}

/* Дві картки-входи: роздріб / фастфуд */
.audience { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 640px) { .audience { grid-template-columns: 1fr; } }
.audience__card {
  display: block; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-1);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.audience__card:hover {
  box-shadow: var(--shadow-2); transform: translateY(-2px);
  border-color: rgba(var(--brand-500-rgb), .4); text-decoration: none;
}
.audience__icon { font-size: 1.8rem; }
.audience__card h3 { margin: .5rem 0 .25rem; }
.audience__card p { margin: 0; color: var(--text-muted); font-size: .95rem; }
.audience__card .audience__more { color: var(--brand-500); font-weight: 600; font-size: .9rem; }

/* ------------------------------ Чипи ніш -------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .95rem;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font-size: .95rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
}
.chip:hover { border-color: var(--brand-500); color: var(--brand-700); box-shadow: var(--shadow-1); text-decoration: none; }

/* ------------------------------ Картки ---------------------------------- */
.cards { display: grid; gap: 1.25rem; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards--3, .cards--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-1);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: rgba(var(--brand-500-rgb), .35); }
.card__icon {
  width: 46px; height: 46px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: rgba(var(--brand-500-rgb), .1); color: var(--brand-700); font-size: 1.4rem; margin-bottom: .9rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--text-muted); margin-bottom: .25rem; font-size: .97rem; }
.card__price { font-weight: 700; color: var(--brand-900); }

/* Картка товару вітрини (фото зверху, дія знизу) */
.product-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.product-card__media {
  aspect-ratio: 4 / 3; background: var(--surface-2);
  display: grid; place-items: center; border-bottom: 1px solid var(--border);
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__ph { color: var(--text-muted); font-size: .85rem; }
.product-card__body { display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem; flex: 1; }
.product-card__body .card__price { margin-top: .1rem; }
.product-card__body .btn { margin-top: auto; }
.product-card__link { color: inherit; }
.product-card__link:hover { text-decoration: none; }
.product-card__title { color: var(--brand-900); }
.product-card__title:hover { color: var(--brand-500); }

/* Компактна рекламна вітрина обладнання на головній */
.equipment-promo__shell {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background:
    radial-gradient(700px 320px at 0 0, rgba(var(--brand-500-rgb), .12), transparent 70%),
    var(--white);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.equipment-promo__content h2 { max-width: 15ch; margin-bottom: .8rem; }
.equipment-promo__content > p { max-width: 54ch; color: var(--text-muted); font-size: 1.05rem; }
.equipment-promo__types {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .8rem;
  list-style: none; padding: 0; margin: 1.4rem 0 1.6rem;
}
.equipment-promo__types li {
  position: relative; min-width: 0; padding-left: 1.35rem;
  color: var(--brand-900); font-size: .9rem; font-weight: 600;
}
.equipment-promo__types li::before {
  content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800;
}
.equipment-promo__note {
  display: block; max-width: 52ch; margin-top: .8rem; color: var(--text-muted);
  font-size: .82rem; line-height: 1.45;
}
.equipment-promo__products {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem;
}
.equipment-promo-card {
  display: flex; min-width: 0; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--white); box-shadow: var(--shadow-1);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.equipment-promo-card:hover {
  transform: translateY(-2px); border-color: rgba(var(--brand-500-rgb), .35); box-shadow: var(--shadow-2);
}
.equipment-promo-card__media {
  display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.equipment-promo-card__media:hover { text-decoration: none; }
.equipment-promo-card__media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease;
}
.equipment-promo-card:hover .equipment-promo-card__media img { transform: scale(1.025); }
.equipment-promo-card__media > span { color: var(--text-muted); font-size: .82rem; }
.equipment-promo-card__body {
  display: flex; min-width: 0; flex: 1; flex-direction: column; gap: .45rem; padding: .9rem 1rem;
}
.equipment-promo-card__body h3 {
  margin: 0; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere;
}
.equipment-promo-card__body h3 a { color: var(--brand-900); }
.equipment-promo-card__body h3 a:hover { color: var(--brand-500); }
.equipment-promo-card__price {
  margin-top: auto; color: var(--brand-900); font-size: .92rem; font-weight: 700;
}
.equipment-promo-more {
  display: flex; min-height: 100%; flex-direction: column; justify-content: center;
  gap: .45rem; padding: clamp(1.2rem, 3vw, 1.7rem);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-lg);
  background:
    radial-gradient(300px 180px at 100% 0, rgba(255, 255, 255, .16), transparent 70%),
    var(--brand-900);
  color: var(--white); box-shadow: var(--shadow-1);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.equipment-promo-more:hover {
  color: var(--white); text-decoration: none; transform: translateY(-2px);
  box-shadow: var(--shadow-2); background: var(--brand-700);
}
.equipment-promo-more svg {
  width: 42px; height: 42px; margin-bottom: .35rem; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linejoin: round; opacity: .82;
}
.equipment-promo-more__eyebrow {
  color: rgba(255, 255, 255, .7); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.equipment-promo-more strong { color: var(--white); font-size: 1.15rem; line-height: 1.25; }
.equipment-promo-more > span:last-child { color: rgba(255, 255, 255, .8); font-size: .86rem; }

@media (max-width: 900px) {
  .equipment-promo__shell { grid-template-columns: 1fr; }
  .equipment-promo__content h2 { max-width: 20ch; }
}
@media (max-width: 560px) {
  .equipment-promo__shell { padding: 1rem; border-radius: var(--radius-lg); }
  .equipment-promo__types, .equipment-promo__products { grid-template-columns: 1fr; }
  .equipment-promo__content .btn { width: 100%; }
  .equipment-promo-card__media { aspect-ratio: 16 / 9; }
  .equipment-promo-more { min-height: 220px; }
}

/* Мініатюри додаткових фото товару (перемикають головне фото картки) */
.product-card__thumbs { display: flex; gap: .4rem; padding: .6rem 1.2rem 0; }
.product-card__thumb {
  width: 36px; height: 36px; padding: 0; flex: 0 0 auto; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--white); transition: border-color .15s ease;
}
.product-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card__thumb.is-active, .product-card__thumb:hover { border-color: var(--brand-500); }
.product-card__thumb:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

/* Категорія вітрини */
.shop-category { margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.shop-category__head { margin-bottom: 1.4rem; }
.shop-category__head h2 { margin-bottom: .3rem; }

/* Окрема сторінка торгового обладнання */
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: .35rem .55rem; align-items: center;
  margin-bottom: 1.5rem; color: var(--text-muted); font-size: .9rem;
}
.breadcrumbs a { color: var(--text-muted); }
.product-detail__grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.product-gallery__main {
  position: relative; width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.product-gallery__main img {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: contain; object-position: center;
}
button.product-gallery__main {
  padding: 0; color: var(--brand-900); font: inherit; cursor: zoom-in;
  transition: border-color var(--transition), box-shadow var(--transition);
}
button.product-gallery__main:hover {
  border-color: rgba(var(--brand-500-rgb), .45); box-shadow: var(--shadow-2);
}
.product-gallery__zoom {
  position: absolute; right: 1rem; bottom: 1rem; display: grid; place-items: center;
  width: 44px; height: 44px; color: var(--brand-900); background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-2);
  pointer-events: none; transition: color var(--transition), transform var(--transition);
}
button.product-gallery__main:hover .product-gallery__zoom { color: var(--brand-500); transform: scale(1.04); }
.product-gallery__thumbs { display: flex; justify-content: center; gap: .6rem; margin-top: .8rem; }
.product-gallery__thumbs .product-card__thumb { width: 60px; height: 60px; }

body.is-lightbox-open { overflow: hidden; overscroll-behavior: none; }
.product-lightbox[hidden] { display: none; }
.product-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; grid-template-columns: minmax(56px, 88px) minmax(0, 1fr) minmax(56px, 88px);
  grid-template-rows: minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  padding: 3.5rem clamp(1rem, 3vw, 2.5rem) 1rem;
  color: var(--white); background: rgba(15, 23, 42, .96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.product-lightbox__close, .product-lightbox__nav {
  display: grid; place-items: center; width: 52px; height: 52px; padding: 0;
  color: var(--white); background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px;
  cursor: pointer; transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.product-lightbox__close:hover, .product-lightbox__nav:hover {
  background: rgba(var(--brand-500-rgb), .7); border-color: rgba(255, 255, 255, .55);
  transform: scale(1.04);
}
.product-lightbox__close {
  position: absolute; top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); z-index: 2;
}
.product-lightbox__nav { justify-self: center; }
.product-lightbox__nav--prev { grid-column: 1; grid-row: 1; }
.product-lightbox__nav--next { grid-column: 3; grid-row: 1; }
.product-lightbox__figure {
  grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-width: 0; min-height: 0; margin: 0;
}
.product-lightbox__figure img {
  display: block; max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px);
  object-fit: contain; border-radius: var(--radius-sm); user-select: none; -webkit-user-drag: none;
  touch-action: pan-y; box-shadow: var(--shadow-3);
}
.product-lightbox__caption {
  display: flex; justify-content: center; gap: .65rem; margin-top: .75rem;
  color: rgba(255, 255, 255, .78); font-size: .9rem; text-align: center;
}
.product-lightbox__title { color: var(--white); font-weight: 600; }
.product-lightbox__thumbs {
  grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; gap: .55rem;
  max-width: 100%; overflow-x: auto; padding: .2rem .25rem .4rem; scrollbar-width: thin;
}
.product-lightbox__thumb {
  width: 64px; height: 64px; padding: 0; flex: 0 0 auto; overflow: hidden;
  background: rgba(255, 255, 255, .08); border: 2px solid transparent;
  border-radius: var(--radius-sm); cursor: pointer; opacity: .68;
  transition: opacity var(--transition), border-color var(--transition), transform var(--transition);
}
.product-lightbox__thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.product-lightbox__thumb:hover { opacity: 1; transform: translateY(-1px); }
.product-lightbox__thumb.is-active { opacity: 1; border-color: var(--brand-500); }
.product-detail__summary { padding-top: clamp(.2rem, 2vw, 1.25rem); }
.product-detail__summary h1 { overflow-wrap: anywhere; }
.product-detail__lead { color: var(--text-muted); font-size: 1.05rem; }
.product-detail__price { color: var(--brand-900); font-size: 1.7rem; font-weight: 700; margin: 1.4rem 0; }
.product-detail__summary .btn { margin: 0 .55rem .55rem 0; }
.product-content-width { max-width: 860px; }
.product-driver h2, .product-article h2 { max-width: 24ch; }
.driver-download {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 1.4rem; padding: 1rem 1.2rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-1);
}
.driver-download > div { display: flex; flex-direction: column; min-width: 0; }
.driver-download strong { color: var(--brand-900); overflow-wrap: anywhere; }
.driver-download span { color: var(--text-muted); font-size: .9rem; }
.driver-download .btn { flex: 0 0 auto; }
.product-article__head { margin-bottom: 1.5rem; }
.product-article__body { font-size: 1.05rem; }
.product-article__body p { white-space: pre-line; max-width: 70ch; margin-bottom: 1.25rem; }
@media (max-width: 760px) {
  .product-detail__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .driver-download { align-items: stretch; flex-direction: column; }
  .driver-download .btn { width: 100%; }
  .product-lightbox {
    grid-template-columns: 48px minmax(0, 1fr) 48px; gap: .35rem;
    padding: 3.75rem .6rem max(.75rem, env(safe-area-inset-bottom));
  }
  .product-lightbox__figure { grid-column: 1 / -1; }
  .product-lightbox__figure img {
    max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px);
  }
  .product-lightbox__nav { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; }
  .product-lightbox__nav--prev { left: .65rem; }
  .product-lightbox__nav--next { right: .65rem; }
  .product-lightbox__caption { flex-direction: column; gap: .1rem; margin-inline: 2.5rem; }
  .product-lightbox__thumb { width: 56px; height: 56px; }
}

/* Новини та публікації */
.news-filters {
  display: flex; gap: .25rem 1.25rem; overflow-x: auto; margin-bottom: 2rem;
  border-bottom: 1px solid var(--border); scrollbar-width: thin;
}
.news-filter {
  flex: 0 0 auto; padding: .65rem 0; color: var(--text-muted); font-weight: 600;
  border-bottom: 3px solid transparent; transition: color var(--transition), border-color var(--transition);
}
.news-filter:hover { color: var(--brand-500); text-decoration: none; }
.news-filter.is-active { color: var(--brand-900); border-bottom-color: var(--brand-500); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.news-card {
  display: flex; min-width: 0; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white);
  box-shadow: var(--shadow-1); transition: box-shadow var(--transition), border-color var(--transition);
}
.news-card:hover { border-color: rgba(var(--brand-500-rgb), .35); box-shadow: var(--shadow-2); }
.news-card__media {
  display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.news-card__media:hover { text-decoration: none; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.news-card:hover .news-card__media img { transform: scale(1.02); }
.news-card__placeholder { color: var(--brand-700); font-size: .85rem; font-weight: 600; text-align: center; padding: 1rem; }
.news-card__body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem; }
.news-card__meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; margin-bottom: .6rem; color: var(--text-muted); font-size: .78rem; }
.news-card__meta span { color: var(--brand-500); font-weight: 600; }
.news-card h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.news-card h2 a { color: var(--brand-900); }
.news-card h2 a:hover { color: var(--brand-500); }
.news-card p { color: var(--text-muted); font-size: .93rem; }
.news-card__read { margin-top: auto; padding-top: .5rem; font-weight: 600; }
.home-news__head {
  display: flex; align-items: end; justify-content: space-between; gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.home-news__head h2 { margin-bottom: 0; }
.home-news__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.home-news-card .news-card__media { aspect-ratio: 16 / 8; }
.home-news-card .news-card__body { padding: 1rem; }
.home-news-card h3 { margin-bottom: .4rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.home-news-card h3 a { color: var(--brand-900); }
.home-news-card h3 a:hover { color: var(--brand-500); }
.home-news__all-mobile { display: none; margin-top: 1rem; }
.news-empty { padding: 3.5rem 0; text-align: center; }
.news-empty p { margin-inline: auto; color: var(--text-muted); }
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 2rem; }
.pagination__link {
  display: grid; width: 44px; height: 44px; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--brand-900); font-weight: 600;
}
.pagination__link:hover, .pagination__link.is-active { color: var(--white); background: var(--brand-500); border-color: var(--brand-500); text-decoration: none; }
.news-content-width { max-width: 860px; }
.news-article__header { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.news-article__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: center; }
.news-article__meta time { color: var(--text-muted); font-size: .9rem; }
.news-article__header h1 { max-width: 22ch; overflow-wrap: anywhere; }
.news-article__lead { max-width: 58ch; color: var(--text-muted); font-size: 1.15rem; }
.news-article__author { color: var(--text-muted); font-size: .9rem; }
.news-article-gallery { padding: 2rem 0; background: var(--surface); }
.news-gallery { max-width: 980px; }
.news-gallery__main {
  display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white);
}
.news-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.news-gallery__caption { max-width: none; margin: .65rem 0 0; color: var(--text-muted); font-size: .9rem; text-align: center; }
.news-gallery__thumbs { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .8rem; }
.news-gallery__thumbs .product-card__thumb { width: 64px; height: 64px; }
.news-article__content { font-size: 1.06rem; }
.news-article__content > .container-ts > p { max-width: 70ch; white-space: pre-line; margin-bottom: 1.35rem; }
.news-source {
  display: flex; flex-direction: column; gap: .2rem; margin-top: 2rem; padding: 1rem 1.2rem;
  border-left: 4px solid var(--brand-500); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.news-source span { color: var(--text-muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; }
.news-source a { overflow-wrap: anywhere; font-weight: 600; }
.news-article__back { margin-top: 2rem; }
@media (max-width: 900px) {
  .news-grid, .home-news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .news-grid, .home-news__grid { grid-template-columns: 1fr; }
  .home-news__head .btn { display: none; }
  .home-news__all-mobile { display: inline-flex; width: 100%; }
  .news-article__meta { align-items: flex-start; flex-direction: column; }
  .news-gallery__thumbs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; }
}

/* Мініатюра товару в адмінці */
.admin-thumb {
  width: 46px; height: 46px; border-radius: var(--radius-sm); object-fit: cover;
  border: 1px solid var(--border); background: var(--surface-2); flex: 0 0 auto;
}

/* Слоти фото товару (до 3 шт.) у формах адмінки вітрини */
.admin-photo-slots { display: flex; gap: .6rem; flex-wrap: wrap; }
.admin-photo-slot {
  display: flex; flex-direction: column; gap: .35rem; align-items: flex-start;
  padding: .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); flex: 1 1 160px;
}
.admin-photo-slot .input { width: 100%; }

/* Пакети «під ключ» */
.package__tag {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  color: var(--brand-500); background: rgba(var(--brand-500-rgb), .1);
  padding: .2rem .6rem; border-radius: 999px; margin-bottom: .7rem;
}
.package ul { list-style: none; padding: 0; margin: .5rem 0 1.1rem; }
.package li { padding: .25rem 0 .25rem 1.5rem; position: relative; color: var(--text-muted); font-size: .92rem; }
.package li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* Галерея реалізованих проєктів на головній */
.portfolio-section { overflow: hidden; }
.portfolio-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense; gap: 1rem;
}
.portfolio-card {
  grid-column: span 4; min-width: 0; min-height: 310px;
  overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--brand-900); box-shadow: var(--shadow-1);
}
.portfolio-card:first-child { grid-column: span 8; grid-row: span 2; min-height: 636px; }
.portfolio-card:nth-child(2), .portfolio-card:nth-child(3) { grid-column: span 4; }
.portfolio-card:first-child:nth-last-child(1) { grid-column: 1 / -1; grid-row: auto; min-height: 480px; }
.portfolio-card:first-child:nth-last-child(2),
.portfolio-card:first-child:nth-last-child(2) ~ .portfolio-card {
  grid-column: span 6; grid-row: auto; min-height: 420px;
}
.portfolio-card__link { position: relative; display: block; width: 100%; height: 100%; min-height: inherit; color: var(--white); }
.portfolio-card__link:hover { color: var(--white); text-decoration: none; }
.portfolio-card__image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 200ms ease;
}
.portfolio-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 61, 145, .02) 20%, rgba(8, 26, 59, .92) 100%);
  transition: background 200ms ease;
}
.portfolio-card__content {
  position: absolute; inset: auto 0 0; display: flex; flex-direction: column; align-items: flex-start;
  gap: .45rem; padding: clamp(1.15rem, 3vw, 1.75rem);
}
.portfolio-card__tag {
  display: inline-flex; padding: .24rem .62rem; border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px; background: rgba(15, 61, 145, .7); backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, .9); font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.portfolio-card__content h3 {
  margin: 0; color: var(--white); font-size: clamp(1.2rem, 2.2vw, 1.7rem); line-height: 1.2;
}
.portfolio-card__description {
  display: -webkit-box; max-width: 62ch; overflow: hidden; color: rgba(255, 255, 255, .82);
  font-size: .92rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.portfolio-card__more { color: var(--white); font-size: .88rem; font-weight: 600; }
.portfolio-card:hover { box-shadow: var(--shadow-2); }
.portfolio-card:hover .portfolio-card__image { transform: scale(1.025); }
.portfolio-card:hover .portfolio-card__overlay {
  background: linear-gradient(180deg, rgba(15, 61, 145, .08) 10%, rgba(8, 26, 59, .96) 100%);
}
.portfolio-card__link:focus-visible { outline: 3px solid var(--brand-500); outline-offset: -3px; border-radius: var(--radius-lg); }
.portfolio-actions {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem;
}

.portfolio-empty {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white);
  box-shadow: var(--shadow-1);
}
.portfolio-empty__preview {
  display: grid; grid-template-columns: 1.25fr .75fr; grid-template-rows: repeat(2, minmax(120px, 1fr));
  gap: .75rem; min-height: 340px;
}
.portfolio-empty__tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  min-width: 0; padding: 1rem; border: 1px dashed rgba(var(--brand-500-rgb), .42);
  border-radius: var(--radius-md); background:
    linear-gradient(145deg, rgba(var(--brand-500-rgb), .08), rgba(var(--brand-500-rgb), .02));
  color: var(--brand-700); text-align: center;
}
.portfolio-empty__tile--main { grid-row: 1 / -1; }
.portfolio-empty__tile svg {
  width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; opacity: .72;
}
.portfolio-empty__tile span { font-size: .86rem; font-weight: 600; }
.portfolio-empty__content h3 { font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
.portfolio-empty__content p { max-width: 56ch; color: var(--text-muted); }

@media (max-width: 900px) {
  .portfolio-card, .portfolio-card:first-child,
  .portfolio-card:nth-child(2), .portfolio-card:nth-child(3) {
    grid-column: span 6; grid-row: auto; min-height: 340px;
  }
  .portfolio-empty { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .portfolio-card, .portfolio-card:first-child,
  .portfolio-card:nth-child(2), .portfolio-card:nth-child(3) {
    grid-column: 1 / -1; min-height: 300px;
  }
  .portfolio-empty { padding: 1rem; }
  .portfolio-empty__preview { min-height: 280px; grid-template-columns: 1fr 1fr; grid-template-rows: 1.2fr .8fr; }
  .portfolio-empty__tile--main { grid-column: 1 / -1; grid-row: auto; }
  .portfolio-actions .btn { width: 100%; }
}

.home-lead-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-lead-cards--single {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}
@media (max-width: 760px) {
  .home-lead-cards { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------- Блок довіри (band) --------------------------- */
.trust { background: var(--brand-900); color: #fff; }
.trust h2 { color: #fff; }
.trust__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
@media (max-width: 600px) { .trust__grid { grid-template-columns: 1fr; gap: 1rem; } }
.trust__num { font-size: 2.2rem; font-weight: 800; color: #fff; }
.trust__label { color: rgba(255, 255, 255, .8); font-size: .95rem; }
.trust__logos { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }
.trust__logo {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-md); padding: .6rem 1.1rem; font-weight: 600; font-size: .9rem;
}
.trust__promise {
  margin: 1.5rem auto 0;
  color: rgba(255, 255, 255, .82);
  font-size: .95rem;
  font-weight: 600;
}

/* ------------------------------ Форми ----------------------------------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.input, .select, .textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .7rem .85rem; transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(var(--brand-500-rgb), .18);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-note { font-size: .85rem; color: var(--text-muted); }
.form-msg { margin-top: .8rem; font-weight: 600; }
.form-msg--ok { color: var(--success); }
.form-msg--err { color: var(--danger); }

/* ------------------------------ Панель ---------------------------------- */
.panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2); padding: clamp(1.4rem, 4vw, 2.4rem);
}

/* CTA-смуга */
.cta-band {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: #fff; border-radius: var(--radius-xl); text-align: center;
  padding: clamp(2rem, 5vw, 3.2rem);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .9); margin-inline: auto; }

/* ------------------------------ Футер ----------------------------------- */
.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .85); margin-top: 0; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer a:hover { color: #fff; }
.site-footer__contacts a { display: block; margin-bottom: .4rem; font-weight: 600; color: #fff; }
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .15); padding: 1.2rem 0;
  font-size: .9rem; color: rgba(255, 255, 255, .65);
}

/* ----------------------------- Утиліти ---------------------------------- */
.text-muted-2 { color: var(--text-muted); }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.hidden { display: none !important; }

/* --------------------------- Конфігуратор ------------------------------- */
.cfg-progress { margin-bottom: 1.2rem; }
.cfg-progress__bar {
  height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border);
}
.cfg-progress__bar span {
  display: block; height: 100%; width: 16.6%;
  background: linear-gradient(90deg, var(--brand-700), var(--brand-500));
  transition: width 250ms ease;
}
.cfg-progress__label { text-align: center; color: var(--text-muted); font-size: .9rem; margin-top: .5rem; }
.cfg-step h3 { margin-top: 0; }

.cfg-options { display: grid; gap: .8rem; }
.cfg-options--2 { grid-template-columns: 1fr 1fr; }
.cfg-options--3 { grid-template-columns: repeat(3, 1fr); }
.cfg-options--grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cfg-options--grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cfg-options--2, .cfg-options--3, .cfg-options--grid { grid-template-columns: 1fr; } }

.cfg-group + .cfg-group { margin-top: 1.4rem; }
.cfg-group__label {
  display: block; font-size: .82rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); margin-bottom: .6rem;
}
[data-program-group],
[data-registration], [data-accounting] { margin-top: 1.2rem; }

/* Примітка-інструкція під полем кроку 2 */
.cfg-hint {
  display: block; margin-top: .4rem; color: var(--text-muted);
  font-size: .86rem; line-height: 1.45; max-width: 65ch;
}

/* Крок 3 — інтро фіскалізації з ілюстрацією чека праворуч */
.cfg-fisc-intro { display: flex; gap: 1.5rem; align-items: flex-start; }
.cfg-fisc-intro__text { flex: 1 1 auto; min-width: 0; }
.cfg-fisc-receipt { flex: 0 0 auto; width: 108px; margin-top: .2rem; }
.cfg-fisc-receipt svg {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, .1));
}
@media (max-width: 560px) { .cfg-fisc-receipt { display: none; } }

.cfg-label-note { font-weight: 400; color: var(--text-muted); font-size: .85rem; }

/* Іконка біля лейбла числового поля (каса / бекофіс) */
.cfg-field-label { display: flex; align-items: center; gap: .55rem; }
.cfg-field-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: var(--radius-sm);
  background: rgba(var(--brand-500-rgb), .1); color: var(--brand-700);
}

.cfg-option { position: relative; cursor: pointer; display: block; }
.cfg-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cfg-option__body {
  display: block; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem; background: #fff; transition: all var(--transition); height: 100%;
}
.cfg-option__body b { display: block; color: var(--brand-900); margin-top: .5rem; }
.cfg-option__body small { color: var(--text-muted); }
.cfg-option__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: rgba(var(--brand-500-rgb), .1); color: var(--brand-700);
}
.cfg-option input:checked + .cfg-option__body {
  border-color: var(--brand-500); background: rgba(var(--brand-500-rgb), .06);
  box-shadow: 0 0 0 3px rgba(var(--brand-500-rgb), .12);
}
.cfg-option input:checked + .cfg-option__body .cfg-option__icon {
  background: var(--brand-500); color: #fff;
}
.cfg-option--sm .cfg-option__body { text-align: center; padding: .9rem; }

.cfg-checks { display: grid; gap: .7rem; }
.cfg-check { position: relative; cursor: pointer; display: flex; align-items: center; }
.cfg-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cfg-check__body {
  flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: .85rem 1rem; background: #fff; transition: all var(--transition);
  display: flex; flex-direction: column;
}
.cfg-check__body b { color: var(--brand-900); }
.cfg-check__body small { color: var(--text-muted); font-size: .88rem; }
.cfg-check__price {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  font-size: .85rem; color: var(--text-muted); font-weight: 600; pointer-events: none;
}
.cfg-check input:checked ~ .cfg-check__body {
  border-color: var(--brand-500); background: rgba(var(--brand-500-rgb), .06);
}

/* Іконка всередині картки-чекбокса (програми кроку 2) — після базового
   .cfg-check__body, щоб перекрити flex-direction: column. */
.cfg-check__body--icon { flex-direction: row; align-items: center; gap: .8rem; }
.cfg-check__text { display: flex; flex-direction: column; min-width: 0; }
.cfg-check__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: var(--radius-md);
  background: rgba(var(--brand-500-rgb), .1); color: var(--brand-700);
  transition: all var(--transition);
}
.cfg-check input:checked ~ .cfg-check__body .cfg-check__icon {
  background: var(--brand-500); color: #fff;
}

/* Картки товарів у кроках обладнання (вибір моделі з магазину) */
.cfg-products {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.cfg-product { position: relative; cursor: pointer; display: block; }
.cfg-product input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cfg-product__body {
  display: flex; gap: .8rem; align-items: center; height: 100%;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: .75rem .85rem; background: #fff; transition: all var(--transition);
}
.cfg-product input:checked + .cfg-product__body {
  border-color: var(--brand-500); background: rgba(var(--brand-500-rgb), .06);
  box-shadow: 0 0 0 3px rgba(var(--brand-500-rgb), .12);
}
.cfg-product__img {
  width: 56px; height: 56px; flex: 0 0 auto; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
}
.cfg-product__img--empty { display: inline-block; }
.cfg-product__info { display: flex; flex-direction: column; min-width: 0; gap: .15rem; }
.cfg-product__info b { color: var(--brand-900); line-height: 1.25; }
.cfg-product__price { color: var(--text-muted); font-size: .9rem; }
.cfg-product--none .cfg-product__body { justify-content: center; text-align: center; }
.cfg-product--none .cfg-product__info b { color: var(--text-muted); }

.cfg-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.cfg-nav .btn[data-prev] { margin-right: auto; }
.cfg-nav .btn[data-next] { margin-left: auto; }
.cfg-nav--top { margin-top: 0; margin-bottom: 1.6rem; }

.cfg-summary { display: grid; gap: .1rem; margin-bottom: 1.2rem; }
.cfg-summary__row {
  display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}
.cfg-summary__row span { color: var(--text-muted); }
.cfg-summary__row b { color: var(--brand-900); text-align: right; }

.cfg-price {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.2rem; gap: .2rem;
}
.cfg-price > span { color: var(--text-muted); font-size: .9rem; }
.cfg-price b { font-size: 1.8rem; color: var(--brand-900); }
.cfg-price small { color: var(--text-muted); font-size: .82rem; }

/* ----------------------------- Адмінка ---------------------------------- */
.chip--active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.chip--active:hover { color: #fff; }

.lead-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.lead-table th, .lead-table td { padding: .7rem .9rem; text-align: left; vertical-align: top; }
.lead-table thead th {
  background: var(--surface-2); color: var(--text-muted); font-weight: 600;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.lead-table tbody tr { border-top: 1px solid var(--border); }
.lead-table tbody tr:hover { background: var(--surface); }
.lead-table .lead-detail td { padding-top: 0; }
.lead-table details summary { cursor: pointer; color: var(--brand-500); font-weight: 600; }

.status {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.status--new { background: rgba(var(--brand-500-rgb), .12); color: var(--brand-700); }
.status--in_progress { background: rgba(217, 119, 6, .15); color: #B45309; }
.status--done { background: rgba(22, 163, 74, .15); color: #15803D; }

/* Адмін-навігація */
.admin-nav { background: var(--brand-900); position: sticky; top: 66px; z-index: 30; }
.admin-nav__inner { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; padding: .5rem 0; }
.admin-nav__brand { color: rgba(255,255,255,.6); font-weight: 700; font-size: .8rem; text-transform: uppercase; margin-right: 1rem; }
.admin-nav__link { color: rgba(255,255,255,.85); padding: .45rem .8rem; border-radius: var(--radius-sm); font-weight: 500; font-size: .95rem; }
.admin-nav__link:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.admin-nav__link--active { background: var(--brand-500); color: #fff; }
.admin-nav__logout { margin-left: auto; color: rgba(255,255,255,.7); }

/* Картки-лічильники */
.stat-card { text-align: center; }
.stat-card__num { font-size: 2.2rem; font-weight: 800; color: var(--brand-900); line-height: 1.1; }
.stat-card__label { color: var(--text-muted); font-size: .9rem; }

/* Адмін-форми */
.admin-form-grid { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.admin-form-grid .input, .admin-form-grid .select { width: auto; flex: 1 1 160px; }
.admin-form-grid__wide { flex: 2 1 280px !important; }
.admin-field { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--text-muted); }
.admin-field .input, .admin-field .select { width: 100%; }
.admin-static-value {
  min-height: 44px; display: flex; align-items: center; padding: .7rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--brand-900); font-size: 1rem; font-weight: 600;
}
.admin-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; padding: .3rem .2rem; white-space: nowrap; }

.admin-row-form { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; flex-wrap: wrap; }
.admin-row-form__key { font-family: monospace; font-size: .8rem; color: var(--text-muted); min-width: 110px; }
.admin-row-form .input { width: auto; flex: 1 1 140px; }
.admin-row-form__price { flex: 0 0 110px !important; }
.admin-row-form__sort { flex: 0 0 80px !important; }
.admin-row-del { display: inline; }
.admin-row-del button { color: var(--danger); }

/* Панель «Конфігуратор» у редакторі категорії магазину */
.cfg-cat { flex-basis: 100%; width: 100%; margin-top: .4rem; }
.cfg-cat > summary { cursor: pointer; font-weight: 600; color: var(--brand-700); font-size: .88rem; }
.cfg-cat__body {
  display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; align-items: flex-end;
  padding: .8rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-top: .5rem;
}
.cfg-cat__field { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--text-muted); }
.cfg-cat__field .select, .cfg-cat__field .input { width: auto; }
.cfg-cat__types { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; }
.cfg-cat__group {
  flex-basis: 100%; font-size: .76rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); margin: .3rem 0 0;
}

.admin-product-content { min-width: 100%; }
.admin-seo-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start;
}
.admin-seo-fields label { display: flex; flex-direction: column; gap: .3rem; color: var(--text-muted); font-size: .85rem; }
.admin-seo-fields .input { width: 100%; min-width: 0; resize: vertical; }
.admin-seo-fields__wide { grid-column: 1 / -1; }
.admin-article-editor { min-height: 12rem; line-height: 1.5; }
.admin-driver-current {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: .7rem; padding: .7rem; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow-wrap: anywhere;
}
.admin-product-preview { display: flex; justify-content: flex-end; }
@media (max-width: 700px) {
  .admin-seo-fields { grid-template-columns: 1fr; }
  .admin-seo-fields__wide { grid-column: auto; }
}

/* Редактор новин */
.admin-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.admin-page-head h1 { font-size: 1.8rem; margin-bottom: .3rem; }
.admin-page-head p { margin: 0; }
.admin-back-link { display: inline-block; margin-bottom: .5rem; font-size: .9rem; }
.admin-message { margin-bottom: 1.25rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); }
.admin-message--success { border-left: 4px solid var(--success); }
.admin-message--error { border-left: 4px solid var(--danger); }

/* Плаваюче повідомлення про збереження: видно з будь-якого місця довгої сторінки
   і не зсуває розмітку, тож відновлена прокрутка лишається точною. */
.admin-toast {
  position: fixed; z-index: 80;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  max-width: min(28rem, calc(100vw - 2rem));
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .85rem 1rem; background: var(--white);
  border: 1px solid var(--border); border-left: 4px solid var(--brand-500);
  border-radius: var(--radius-md); box-shadow: var(--shadow-2);
  font-size: .92rem; line-height: 1.45;
  animation: admin-toast-in 180ms ease-out;
}
.admin-toast--success { border-left-color: var(--success); }
.admin-toast--error { border-left-color: var(--danger); }
.admin-toast__text { flex: 1 1 auto; min-width: 0; }
.admin-toast__close {
  flex: 0 0 auto; border: 0; background: none; cursor: pointer; color: var(--text-muted);
  font-size: 1rem; line-height: 1; padding: .3rem .35rem; border-radius: var(--radius-sm);
  transition: color 150ms ease, background-color 150ms ease;
}
.admin-toast__close:hover { color: var(--text); background: var(--surface-2); }
.admin-toast.is-hiding { opacity: 0; transform: translateY(6px); transition: opacity 250ms ease, transform 250ms ease; }
@keyframes admin-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Підсвічування блоку, у якому щойно натиснули «Зберегти». */
.is-just-saved {
  outline: 2px solid var(--success); outline-offset: 3px;
  animation: admin-saved-fade 2.6s ease-out forwards;
}
@keyframes admin-saved-fade {
  0%, 60% { outline-color: var(--success); }
  100% { outline-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-toast, .is-just-saved { animation: none; }
  .admin-toast.is-hiding { transition: none; }
}
.admin-news-list { display: flex; flex-direction: column; gap: .85rem; }
.admin-news-item {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  padding: .9rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-1);
}
.admin-news-item__media {
  display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
  color: var(--text-muted); font-size: .8rem;
}
.admin-news-item__media img { width: 100%; height: 100%; object-fit: cover; }
.admin-news-item__body { min-width: 0; }
.admin-news-item__body h2 { margin: .25rem 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.admin-news-item__body p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.admin-news-item__meta { display: flex; flex-wrap: wrap; gap: .3rem .65rem; color: var(--text-muted); font-size: .76rem; }
.admin-news-item__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.news-status { padding: .05rem .4rem; border-radius: var(--radius-sm); font-weight: 600; }
.news-status--published { color: var(--success); background: rgba(22, 163, 74, .1); }
.news-status--draft { color: var(--warning); background: rgba(217, 119, 6, .1); }
.news-status--missing-photo { color: var(--danger); background: rgba(220, 38, 38, .1); }
.admin-danger-action { color: var(--danger) !important; }
.portfolio-admin-note { margin-bottom: 1.25rem; padding: 1rem 1.2rem; }
.portfolio-admin-note p { max-width: 75ch; margin: .35rem 0 .25rem; color: var(--text-muted); }
.portfolio-admin-empty { padding: clamp(2rem, 6vw, 4rem); }
.portfolio-admin-empty p { margin-inline: auto; }
.news-editor-shell { max-width: 1040px; }
.news-editor-form { display: flex; flex-direction: column; gap: 1rem; }
.news-editor-section { padding: 1.3rem; }
.news-editor-section h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.news-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; align-items: end; }
.news-editor-grid__wide { grid-column: 1 / -1; }
.news-editor-body { min-height: 18rem; line-height: 1.55; resize: vertical; }
.news-editor-publish { min-height: 44px; }
.admin-news-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.admin-news-image { display: flex; min-width: 0; flex-direction: column; gap: .55rem; padding: .65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.admin-news-image > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.admin-news-image .input { width: 100%; }
.news-editor-actions { display: flex; justify-content: flex-end; gap: .65rem; position: sticky; bottom: 0; padding: .8rem 0; background: rgba(255, 255, 255, .94); }
@media (max-width: 820px) {
  .admin-news-item { grid-template-columns: 100px minmax(0, 1fr); }
  .admin-news-item__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .admin-news-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .admin-page-head { align-items: stretch; flex-direction: column; }
  .admin-page-head > .btn { width: 100%; }
  .admin-news-item { grid-template-columns: 1fr; }
  .admin-news-item__media { max-width: 220px; }
  .admin-news-item__actions { grid-column: auto; }
  .news-editor-grid, .admin-news-gallery { grid-template-columns: 1fr; }
  .news-editor-grid__wide { grid-column: auto; }
}

.admin-package { margin-bottom: 1rem; }
.admin-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
@media (max-width: 640px) { .admin-pick { grid-template-columns: 1fr; } }
.admin-pick > div { display: flex; flex-direction: column; gap: .2rem; }
.admin-pick b { margin-bottom: .3rem; }

/* ---------------------- Каталог драйверів і утиліт ---------------------- */
.downloads-hero { min-height: 55vh; }
.download-brand-list { display: flex; flex-direction: column; gap: 2.25rem; }
.download-brand-section { scroll-margin-top: 96px; }
.download-brand-section__head { margin-bottom: .85rem; }
.download-brand-section__head .eyebrow { margin-bottom: .25rem; }
.download-brand-section__head h2 { margin: 0; font-size: 1.45rem; }
.download-brand-section__head p { margin: .25rem 0 0; color: var(--text-muted); font-size: .9rem; }
.download-table-wrap {
  overflow: hidden; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-1);
}
.download-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.download-table th, .download-table td {
  padding: .8rem .9rem; text-align: left; vertical-align: middle; overflow-wrap: anywhere;
}
.download-table th {
  color: var(--brand-900); background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: .78rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase;
}
.download-table th:nth-child(1) { width: 27%; }
.download-table th:nth-child(2) { width: 40%; }
.download-table th:nth-child(3) { width: 11%; }
.download-table th:nth-child(4) { width: 9%; }
.download-table th:nth-child(5) { width: 13%; }
.download-table tbody tr + tr { border-top: 1px solid var(--border); }
.download-table tbody tr { transition: background-color 160ms ease; }
.download-table tbody tr:hover { background: var(--surface); }
.download-table__name { display: block; color: var(--brand-900); line-height: 1.35; }
.download-table__file { display: block; margin-top: .2rem; color: var(--text-muted); font-size: .76rem; }
.download-table td p { margin: 0; color: var(--text); font-size: .9rem; line-height: 1.45; }
.download-table__models { margin-top: .3rem; color: var(--text-muted); font-size: .82rem; line-height: 1.4; }
.download-table__models strong { color: var(--brand-700); }
.download-table__size { color: var(--text-muted); font-size: .88rem; white-space: nowrap; }
.download-table__action { text-align: right !important; }
.download-table__action .btn { min-width: 0; padding: .55rem .75rem; font-size: .82rem; }
.download-type {
  display: inline-flex; align-items: center; min-height: 26px; padding: .18rem .55rem;
  border-radius: 999px; font-size: .78rem; font-weight: 700;
}
.download-type { color: var(--brand-700); background: rgba(var(--brand-500-rgb), .1); }
.download-type--utility { color: var(--brand-900); background: var(--surface-2); }
.download-type--program { color: var(--brand-500); background: rgba(var(--brand-500-rgb), .06); }
.downloads-empty { text-align: center; }
.downloads-empty p { margin-inline: auto; color: var(--text-muted); }

.admin-download-categories { margin-bottom: 2.5rem; }
.admin-section-heading { margin-bottom: .9rem; }
.admin-section-heading h2 { margin-bottom: .25rem; font-size: 1.35rem; }
.admin-section-heading p { margin: 0; }
.admin-category-create { margin-bottom: .8rem; }
.admin-category-create h3 { margin-top: 0; font-size: 1.05rem; }
.admin-download-categories .admin-form-grid > .admin-field { flex: 1 1 180px; }
.admin-download-categories .admin-form-grid > .admin-form-grid__wide { flex: 2 1 320px; }
.admin-download-categories .admin-form-grid > .admin-category-sort { flex: 0 0 96px; }
.admin-category-list { display: flex; flex-direction: column; gap: .65rem; }
.admin-category-row { display: flex; align-items: flex-end; gap: .65rem; padding: .85rem; }
.admin-category-row__form { flex: 1 1 auto; min-width: 0; }
.admin-download-files-heading { margin-top: .5rem; }

.admin-download-list { display: flex; flex-direction: column; gap: .8rem; }
.admin-download-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--white); box-shadow: var(--shadow-1);
}
.admin-download-item__body { min-width: 0; }
.admin-download-item__body h2 { margin: .35rem 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.admin-download-item__body p { margin: 0; color: var(--text-muted); font-size: .88rem; }
.admin-download-count {
  padding: .08rem .45rem; color: var(--brand-700); background: rgba(var(--brand-500-rgb), .09);
  border-radius: var(--radius-sm); font-weight: 600;
}
.admin-download-count strong { color: var(--brand-900); }
.admin-download-item__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.download-model-editor { min-height: 10rem; resize: vertical; }
.download-current-file { margin-bottom: 1rem; }
.download-current-file > div { display: flex; flex-direction: column; min-width: 0; }
.download-current-file span { color: var(--text-muted); font-size: .85rem; }
.download-source-separator { display: flex; align-items: center; gap: .7rem; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; }
.download-source-separator::before, .download-source-separator::after { content: ""; flex: 1; height: 1px; background: var(--border); }

@media (max-width: 760px) {
  .admin-category-row { align-items: stretch; flex-direction: column; }
  .admin-category-row > form:last-child .btn { width: 100%; }
  .admin-download-item { grid-template-columns: 1fr; }
  .admin-download-item__actions { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .download-brand-list { gap: 1.7rem; }
  .download-brand-section__head h2 { font-size: 1.25rem; }
  .download-table-wrap { overflow: visible; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .download-table, .download-table tbody, .download-table tr, .download-table td { display: block; width: 100%; }
  .download-table { table-layout: auto; }
  .download-table thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .download-table tbody { display: flex; flex-direction: column; gap: .75rem; }
  .download-table tbody tr {
    display: grid; overflow: hidden; background: var(--white); border: 1px solid var(--border) !important;
    border-radius: var(--radius-md); box-shadow: var(--shadow-1);
  }
  .download-table td {
    display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); gap: .65rem;
    align-items: start; padding: .65rem .8rem; border-top: 1px solid var(--border);
  }
  .download-table td:first-child { border-top: 0; }
  .download-table td::before {
    content: attr(data-label); color: var(--text-muted); font-size: .75rem;
    font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  }
  .download-table__action { text-align: left !important; }
  .download-table__action .btn { width: 100%; }
}

/* Графік статистики */
.stats-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-top: .5rem; }
.stats-chart__col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.stats-chart__bar { width: 100%; background: linear-gradient(180deg, var(--brand-500), var(--brand-700)); border-radius: 3px 3px 0 0; min-height: 2px; }
.stats-chart__col:hover .stats-chart__bar { background: var(--brand-900); }
.stats-chart__axis { display: flex; justify-content: space-between; color: var(--text-muted); font-size: .8rem; margin-top: .4rem; }

/* ----------------------------- Модалка ---------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 1rem;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-3);
  width: min(480px, 100%); padding: 1.8rem; position: relative;
}
.modal__close {
  position: absolute; top: .8rem; right: .8rem; background: none; border: 0;
  font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--text-muted);
}

/* ----------------- Конструктор автоматизації (адмінка) ------------------ */
.admin-subnav { margin-bottom: 1.1rem; }
.automation-business-picker { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; }
.automation-business-picker .admin-field { min-width: 280px; }
.automation-scenario-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem;
}
.automation-scenario-head .status { margin-left: .5rem; vertical-align: middle; }
.automation-scenario-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.automation-warning-list { margin: .4rem 0 0 1.1rem; }
.automation-step { margin-top: 1rem; }
.automation-step--inactive { opacity: .65; }
.automation-step-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.automation-step-move { margin-left: auto; display: flex; gap: .3rem; }
.automation-step-move form { display: inline; }
.automation-step-buttons { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .7rem; }
.automation-products-grid { display: grid; gap: .35rem; }
.automation-product-row {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .35rem .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface);
}
.automation-product-row--inactive { opacity: .6; }
/* Назва товару може бути довгою — переносимо її в межах своєї колонки,
   інакше вона друкується поверх ціни (успадкований .admin-check nowrap). */
.automation-product-row__pick {
  min-width: 220px; flex: 1 1 220px;
  align-items: flex-start;  /* чекбокс — на рівні першого рядка назви */
  white-space: normal;
  overflow-wrap: anywhere;  /* довгий суцільний артикул теж розривається */
}
.automation-product-row__price {
  color: var(--text-muted); white-space: nowrap; flex: 0 0 auto;
}
.automation-product-row__mode { max-width: 220px; }
.automation-icon-preview { display: inline-flex; color: var(--brand-500); width: 26px; flex: 0 0 auto; }

/* --------------- Конфігуратор: нові елементи DB-driven кроків ------------ */
.cfg-product__reco {
  display: inline-block; font-size: .72rem; font-weight: 600;
  color: var(--brand-500); background: rgba(var(--brand-500-rgb), .1);
  border-radius: var(--radius-sm); padding: .1rem .45rem; margin: .15rem 0;
  width: fit-content;
}
.cfg-offer-tag {
  display: inline-block; font-size: .72rem; font-weight: 500;
  color: var(--text-muted); background: var(--surface-2);
  border-radius: var(--radius-sm); padding: .05rem .4rem; vertical-align: middle;
}
.cfg-offer-tag--req { color: var(--brand-700); background: rgba(var(--brand-500-rgb), .12); }
.cfg-check--locked { opacity: .92; }
.cfg-check--locked input { pointer-events: none; }
.cfg-offer-qty {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: .45rem;
  color: var(--text-muted); font-size: .85rem;
}
.cfg-offer-qty .input { width: 90px; }

/* ----------------------- Звіт прорахунку (публічний) --------------------- */
.report-sheet { padding: 2rem; }
.report-title { font-size: 1.7rem; margin: .2rem 0 .3rem; }
.report-meta { margin: 0; }
.report-answers { margin: 1rem 0 0; }
.report-warning {
  margin: 1rem 0; padding: .8rem 1rem; border-radius: var(--radius-md);
  border: 1px solid var(--warning); background: rgba(217, 119, 6, .07);
  color: var(--text); font-size: .95rem;
}
.report-section-title { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.report-table th, .report-table td {
  border: 1px solid var(--border); padding: .5rem .7rem; text-align: left;
  vertical-align: top;
}
.report-table thead th { background: var(--surface); font-weight: 600; }
.report-table tbody tr:nth-child(even) td { background: var(--surface); }
.report-table tfoot td { font-weight: 600; background: var(--surface-2); }
.report-num { text-align: right; white-space: nowrap; }
.report-line-desc { display: block; color: var(--text-muted); font-size: .8rem; }
.report-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 1.4rem 0 .4rem; padding: .9rem 1.1rem; border-radius: var(--radius-md);
  background: var(--brand-900); color: #fff; font-size: 1.05rem;
}
.report-total b { font-size: 1.5rem; }
.report-manager { margin-top: 1.4rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.report-manager a { font-weight: 600; }
.report-footer-note { margin-top: .8rem; }
.report-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.report-callback { margin-top: 1.4rem; }
.report-callback-modes { display: flex; flex-direction: column; gap: .4rem; }
.report-modal-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }

/* ------------------------------ Друк (A4) -------------------------------- */
@media print {
  @page { size: A4; margin: 14mm; }
  .site-header, .site-footer, .nav-toggle, .modal-backdrop,
  .report-actions, .report-callback, .btn, .admin-nav { display: none !important; }
  body { background: #fff; }
  .section { padding: 0; }
  .panel.report-sheet { box-shadow: none; border: 0; padding: 0; }
  .report-table, .report-table-wrap { overflow: visible; }
  .report-table tr { break-inside: avoid; }
  .report-total { background: #fff; color: #000; border: 2px solid #000; }
  .report-manager a { color: #000; text-decoration: none; }
}

/* ------------- Прев'ю товару при наведенні (крок обладнання) ------------- */
.cfg-preview {
  position: fixed; z-index: 90; left: 0; top: 0;
  width: min(440px, calc(100vw - 24px));
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  padding: .75rem;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  pointer-events: none;
}
.cfg-preview.is-open {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
}
.cfg-preview__media {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border-radius: var(--radius-md);
  padding: .5rem; margin-bottom: .75rem;
  height: min(320px, calc(100vh - 120px)); flex: 0 0 auto;
}
.cfg-preview__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cfg-preview__empty {
  color: var(--text-muted); font-size: .95rem; text-align: center;
}
.cfg-preview__link { width: 100%; min-height: 44px; }
/* На сенсорних екранах hover відсутній — панель не потрібна. */
@media (hover: none), (pointer: coarse) {
  .cfg-preview { display: none; }
}

/* --------- Позначка «Найдешевший» на картці товару (крок обладнання) ------ */
.cfg-product__cheapest {
  display: inline-block; width: fit-content;
  font-size: .72rem; font-weight: 600;
  color: var(--danger); background: rgba(220, 38, 38, .1);
  border-radius: var(--radius-sm); padding: .1rem .45rem; margin: .15rem 0;
}
.cfg-product__price--cheapest { color: var(--danger); font-weight: 700; }
/* Рамка картки живе на .cfg-product__body, тому модифікатор адресує саме її. */
.cfg-product--cheapest .cfg-product__body { border-color: rgba(220, 38, 38, .45); }
.cfg-product--cheapest input:checked + .cfg-product__body {
  border-color: var(--danger); background: rgba(220, 38, 38, .06);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
