/* ============================================================
   Rolleta theme — дизайн-система головної сторінки
   Підключається ПІСЛЯ bootstrap.min.css та site.css.
   ============================================================ */

:root {
    --fog: #eef0f2;
    --card: #fff;
    --ink: #17191d;
    --ink-soft: #23262c;
    --muted: #5c6470;
    --line: #dfe3e8;
    --r-xl: 1.5rem;
    --r-pill: 100rem;
    /* UX-11 (Іван 13.09): кольорова схема з калькулятора ComfortDoors (theme-v2):
       помаранчевий має рівно три ролі — дія, вибір, номер/бейдж. Суцільної
       помаранчевої заливки з білим текстом не буває (контраст 3.4:1);
       дія = чорна кнопка з помаранчевим написом (7.2:1), вибір = помаранчева
       рамка на білому, фокус — помаранчеве кільце. Було: бурштин #E8A317 заливкою. */
    --accent: #EE6C00;        /* рамка вибору, бейджі, фокус */
    --accent-lt: #FF8A1F;     /* напис на чорному */
    --accent-lt-hover: #FF9C3D;
    --accent-ring: rgba(238, 108, 0, .25);
}

html { scroll-behavior: smooth; }

body.theme {
    font-family: "Manrope", system-ui, sans-serif;
    background: var(--fog);
    color: var(--ink);
    line-height: 1.6;
}

.theme h1, .theme h2, .theme h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
.theme h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.display-hero { font-size: clamp(1.9rem, 3.8vw, 3.1rem); font-weight: 800; }
.text-muted-2 { color: var(--muted); }

/* Картки */
.card-xl { background: var(--card); border: 0; border-radius: var(--r-xl); }
/* 13.09 (Іван: «користувач не любить скролити»). Вертикальний ритм щільніший
   без правок у кожній в'юсі: p-md-5 у картках теми = 2 rem (bootstrap дає 3),
   секції mt-5 = 2.25 rem. !important — бо утиліти bootstrap теж !important. */
@media (min-width: 768px) {
    .theme .card-xl.p-md-5, .theme .card-dark.p-md-5 { padding: 2rem !important; }
}
.theme section.mt-5 { margin-top: 2.25rem !important; }
.theme h2.mb-4 { margin-bottom: 1.1rem !important; }
.card-dark { background: var(--ink); color: #fff; border-radius: var(--r-xl); }
.card-dark .text-muted-2 { color: #9aa1ab; }

.lift { transition: transform .3s ease, box-shadow .3s ease; }
.lift:hover { transform: translateY(-4px); box-shadow: 0 1.25rem 2.5rem rgba(23, 25, 29, .10); }

/* Кнопки-пігулки */
.btn-pill { border-radius: var(--r-pill); padding: .8rem 1.6rem; font-weight: 600; }
.btn-ink { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-ink:hover { background: #000; color: #fff; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ink .bi, .btn-ghost .bi { transition: transform .25s ease; }
.btn-ink:hover .bi, .btn-ghost:hover .bi { transform: translate(3px, -3px); }
/* UX-11. Цільова дія сторінки: шапка «Розрахувати ціну», hero, картки хаба,
   «Додати в кошик», «Оформити», «Надіслати». На сторінці — одна така кнопка
   (плюс її дубль у липкій панелі). Чорний текст на бурштині — контраст 8:1. */
.btn-accent { background: var(--ink); color: var(--accent-lt); border: 1px solid var(--ink); font-weight: 700; }
.btn-accent:hover, .btn-accent:focus { background: #000; border-color: #000; color: var(--accent-lt-hover); transform: translateY(-1px); }
.btn-accent:focus-visible { outline: none; box-shadow: 0 0 0 .25rem var(--accent-ring); }
/* на темній картці (CTA-блок) чорна кнопка зливалась би з тлом — світла рамка окреслює її,
   текст лишається помаранчевим на чорному (7.2:1) */
.card-dark .btn-accent { background: #000; border-color: rgba(255, 255, 255, .45); }
.card-dark .btn-accent:hover { border-color: #fff; }
.btn-accent .bi { transition: transform .25s ease; }
.btn-accent:hover .bi { transform: translate(3px, -3px); }
.btn-accent.is-off { opacity: .45; }
.btn-accent:disabled { opacity: .6; transform: none; }

/* Плаваючий навбар */
.nav-wrap { position: sticky; top: .75rem; z-index: 1030; }
.nav-pill {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    border-radius: var(--r-xl);
    border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: 0 .5rem 1.5rem rgba(23, 25, 29, .06);
}
.nav-pill .nav-link { color: var(--ink); font-weight: 600; font-size: .95rem; padding: .5rem .9rem; border-radius: var(--r-pill); white-space: nowrap; }
.nav-pill .nav-link:hover { background: var(--fog); }
/* UX-10 (13.09). Шапка не переламується на два рядки (бачили на 1568 px із
   лічильником кошика): нічого не переноситься, меню стискається, CTA — одним рядком. */
.nav-pill { flex-wrap: nowrap; gap: .5rem; }
/* прогін 13.09: ul.nav усередині — bootstrap дає йому flex-wrap:wrap, і при
   «Розрахувати ціну» + телефон + кошик меню ламалось на два рядки навіть на
   1900 px (контейнер 1200). Тому nowrap і вужчі пункти (.7rem замість .9rem). */
.nav-pill .nav { flex-wrap: nowrap; }
.nav-pill .nav-link { padding-left: .7rem; padding-right: .7rem; }
.nav-pill .brand { flex: none; }
.nav-pill .btn { white-space: nowrap; }
.nav-pill > .d-flex { flex: none; }
/* телефон текстом — лише коли справді є місце (було d-xl: ≥ 1200) */
.nav-phone { display: none !important; }
@media (min-width: 1400px) { .nav-phone { display: inline-flex !important; } }

.brand { font-weight: 800; letter-spacing: -.02em; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.brand small { color: var(--muted); font-weight: 600; }
.brand-mark { width: 1.25rem; height: 1.25rem; border-radius: .35rem; background: repeating-linear-gradient(to bottom, var(--ink) 0 3px, transparent 3px 6px); }

/* Статистика hero */
.stat { background: var(--fog); border-radius: 1rem; padding: .9rem 1.1rem; }
.stat b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
/* FIX-10: лише прямий span — підпис. Раніше правило ловило й <span data-count>
   усередині <b>, і число ставало окремим рядком над одиницею («59» / «с») */
.stat > span { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.stat b span { display: inline; }
/* UX-12: «3–5 дн» не переноситься на два рядки у вузькому тайлі */
.stat b { white-space: nowrap; }
@media (max-width: 575.98px) { .stat b { font-size: 1.45rem; } .stat { padding: .75rem .9rem; } }

/* Фото-слоти: заглушки до появи реальних фото.
   Коли додасте <img> — заглушка .photo-note просто видаляється. */
.photo-slot { position: relative; border-radius: var(--r-xl); overflow: hidden; background: linear-gradient(165deg, #e2e6ea 0%, #f4f5f7 60%, #e8ebee 100%); display: flex; align-items: center; justify-content: center; }
.photo-slot::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 14px, rgba(23, 25, 29, .045) 14px 16px); }
.photo-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* Для line-art ілюстрацій: вписуємо без обрізання, з повітрям навколо */
.photo-slot > img.img-contain { object-fit: contain; /*padding: 2.5rem;*/ }
.photo-note { position: relative; text-align: center; color: var(--muted); font-size: .85rem; font-weight: 600; padding: 1rem; }
.photo-note .bi { font-size: 1.6rem; display: block; margin-bottom: .35rem; }
/* Підпис фото: другорядний — напівпрозорий, не бореться за увагу з CTA */
/* 13.09: плашка щільніша (.45 → .62) — підписи «Полотно набране з профілю…» на світлих рендерах не читались */
.photo-chip { position: absolute; background: rgba(23, 25, 29, .62); backdrop-filter: blur(6px); color: #fff; border-radius: 1rem; padding: .45rem .8rem; font-weight: 500; font-size: .84rem; z-index: 2; }
.chip-float { position: absolute; top: 1rem; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); color: var(--ink); border-radius: var(--r-pill); padding: .5rem 1rem; font-weight: 600; font-size: .85rem; z-index: 2; text-decoration: none; }

/* Таби каталогу — сегментований перемикач, а не ряд кнопок-CTA (13.09):
   одна світла смуга, активний сегмент темний. Було: кожен таб окремою білою
   пігулкою з рамкою — виглядало як три кнопки дії. */
.cat-tabs { background: var(--fog); border-radius: var(--r-pill); padding: .25rem; display: inline-flex; gap: .15rem; }
.cat-tabs .nav-link { border-radius: var(--r-pill); font-weight: 600; color: var(--muted); background: transparent; border: 1px solid transparent; padding: .55rem 1.1rem; margin: 0; }
.cat-tabs .nav-link:hover { color: var(--ink); }
.cat-tabs .nav-link.active { background: var(--ink); color: var(--accent-lt); border-color: var(--ink); font-weight: 700; }

.cat-item { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: var(--r-xl); padding: .9rem 1rem; text-decoration: none; color: var(--ink); border: 1px solid transparent; transition: border-color .25s ease, transform .25s ease; height: 100%; }
.cat-item:hover { border-color: var(--ink); transform: translateY(-2px); }
.cat-item img { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.cat-item .bi-arrow-right { margin-left: auto; color: var(--muted); transition: transform .25s ease; }
.cat-item:hover .bi-arrow-right { transform: translateX(4px); color: var(--ink); }
.cat-item b { font-size: .98rem; line-height: 1.25; display: block; }
.cat-item small { color: var(--muted); line-height: 1.3; display: block; }
.icon-tile { width: 52px; height: 52px; border-radius: .9rem; background: var(--fog); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
/* Фото-плитка категорії як background: cover вирішує масштаб,
   скруглення як в icon-tile, fog-підкладка поки фото вантажиться */
.cat-thumb { width: 52px; height: 52px; border-radius: .9rem; background-color: var(--fog); background-size: cover; background-position: center; flex-shrink: 0; }
.profile-num { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }

/* Калькулятор (темна картка) */
.calc .form-control, .calc .form-select { background-color: var(--ink-soft); border: 1px solid #3a3f47; color: #fff; border-radius: .9rem; padding: .9rem 1rem; }
.calc .form-control:focus, .calc .form-select:focus { border-color: #fff; box-shadow: 0 0 0 .2rem rgba(255,255,255,.35); background-color: var(--ink-soft); color: #fff; }
/* Білий еврон селекта: показує, що є вибір (стандартний темний губився на темному фоні) */
.calc .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 14px 14px; padding-right: 2.4rem; }
.calc label { color: #9aa1ab; font-size: .85rem; font-weight: 600; }
.price-out { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; }

/* Кроки */
/* номери кроків — помаранчевий контур (ComfortDoors: номер картки помаранчевий) */
.step-num { font-size: 2.6rem; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--accent); line-height: 1; }

/* FAQ */
.faq .accordion-item { background: var(--card); border: 0; border-radius: var(--r-xl) !important; margin-bottom: .75rem; overflow: hidden; }
.faq .accordion-button { background: transparent; font-weight: 700; box-shadow: none; padding: 1.25rem 1.5rem; }
.faq .accordion-button:not(.collapsed) { color: var(--ink); }
.faq .accordion-body { color: var(--muted); padding-top: 0; }

/* Поява при скролі */
/* UX-1. Ховаємо лише коли є JS (клас js ставить інлайн-скрипт у <head>):
   без скрипта сторінка видима одразу. Було: .reveal { opacity:0 … } без умови —
   обрив на 3G чи блокувальник = порожня сторінка. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Футер (темна картка) */
footer.theme-footer a { color: #9aa1ab; text-decoration: none; }
footer.theme-footer a:hover { color: #fff; }

/* Підказка-підскок: два стрибки із затуханням */
@keyframes hintBounce {
    0% { transform: translateY(0); }
    25% { transform: translateY(-9px); }
    45% { transform: translateY(0); }
    65% { transform: translateY(-4px); }
    80% { transform: translateY(0); }
    100% { transform: translateY(0); }
}
/* Для табів: підскок + потемніння рамки + фокус-кільце */
@keyframes hintBounceTab {
    0% { transform: translateY(0); }
    25% { transform: translateY(-9px); border-color: var(--ink); background: #eef0f2; box-shadow: 0 0 0 5px rgba(23, 25, 29, .16); }
    45% { transform: translateY(0); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23, 25, 29, .10); }
    65% { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 0 0 2px rgba(23, 25, 29, .06); }
    80% { transform: translateY(0); }
    100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(23, 25, 29, 0); }
}
.cat-tabs .nav-link.hint { animation: hintBounceTab .7s cubic-bezier(.3, .7, .4, 1); }
#calcCta.hint { animation: hintBounce .75s cubic-bezier(.3, .7, .4, 1); transform-origin: center bottom; }



/* Register/Login у футері (розмітка _LoginPartial лишається незмінною) */
.footer-auth .navbar-nav { flex-direction: row; gap: 1.25rem; }
.footer-auth .nav-link { padding: 0; font-size: .9rem; color: #9aa1ab !important; }
.footer-auth .nav-link:hover { color: #fff !important; }
.footer-auth .form-inline { display: inline; }


/* ---- CardBlock: картки сценаріїв (профілі, керування...) ---- */
.pick-card { height: 100%; display: flex; flex-direction: column; padding: 1.5rem; }
.pick-eyebrow { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.pick-eyebrow .bi { font-size: 1.25rem; color: var(--muted); }
.card-dark .pick-eyebrow .bi { color: #9aa1ab; }
.pick-note { color: var(--muted); font-size: .92rem; margin: .25rem 0 .9rem; line-height: 1.45; }
.card-dark .pick-note { color: #9aa1ab; }
.pick-photo { position: relative; border-radius: 1rem; overflow: hidden; aspect-ratio: 4/3; background: #e2e6ea; }
.pick-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.type-badge { position: absolute; top: .7rem; left: .7rem; display: inline-flex; align-items: center; gap: .4rem; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-radius: var(--r-pill); padding: .3rem .75rem; font-size: .78rem; font-weight: 600; color: var(--ink); z-index: 2; }
.chip-stack { position: absolute; top: .7rem; right: .7rem; display: flex; flex-direction: column; gap: .5rem; z-index: 2; }
.profile-chip { background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border-radius: .8rem; padding: .4rem .7rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; color: var(--ink); box-shadow: 0 .35rem .9rem rgba(23, 25, 29, .18); text-align: center; }
.pick-photo .photo-caption { position: absolute; left: .7rem; bottom: .7rem; width: max-content; max-width: calc(100% - 1.4rem); background: rgba(23, 25, 29, .5); backdrop-filter: blur(6px); color: rgba(255, 255, 255, .95); border-radius: .8rem; padding: .35rem .65rem; font-weight: 500; font-size: .78rem; z-index: 2; }
.spec-row { display: flex; gap: 1.5rem; padding-top: .9rem; margin-top: .9rem; border-top: 1px solid var(--fog); }
.card-dark .spec-row { border-top-color: #3a3f47; }
.spec b { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.spec span { color: var(--muted); font-size: .78rem; }
.card-dark .spec span { color: #9aa1ab; }

/* Локальна навігація секцій (Scrollspy): нижче за головний navbar,
   ширина по вмісту, притиснута вправо — підкреслює другорядність */
section[id] { scroll-margin-top: 6rem; }
/* UX-5 (13.09). Було: position: sticky; top: 5.9rem — липкі пігулки лягали на
   «Додати в кошик», таби лінійок і поле «Висота» на хабі. Тепер рядок статичний
   під шапкою: скролиться разом зі сторінкою, на мобільному живе в offcanvas.
   scroll-margin-top зменшено з 9rem — тепер над секцією лише шапка. */
.local-nav { margin-top: .75rem; pointer-events: none; }
.local-nav .nav { display: inline-flex; width: auto; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: 0 .4rem 1rem rgba(23, 25, 29, .06); padding-left: .35rem; padding-right: .35rem; pointer-events: auto; }
.local-nav .nav-link { color: var(--muted); font-weight: 600; font-size: .88rem; padding: .45rem .9rem; border-radius: var(--r-pill); }
.local-nav .nav-link:hover { color: var(--ink); }
.local-nav .nav-link.active { background: var(--ink); color: var(--accent-lt); }


/* Мобільні розміри (до 576px) */
@media (max-width: 575.98px) {
    .nav-pill .btn-ink { padding: .5rem .95rem; font-size: .88rem; white-space: nowrap; }
    .btn-pill { padding: .65rem 1.1rem; font-size: .92rem; }
    .cat-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-right: 2rem; }
    .cat-tabs::-webkit-scrollbar { display: none; }
    /* MOB-2. Обрізаний третій таб без натяку на скрол — тепер край тане */
    .cat-tabs-wrap { mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); }
    .cat-tabs .nav-link { white-space: nowrap; padding: .5rem .9rem; font-size: .86rem; margin: .15rem; }
}


/* Мобільне offcanvas-меню */
.theme-offcanvas { border-radius: var(--r-xl) 0 0 var(--r-xl); max-width: 20rem; }
.theme-offcanvas .offcanvas-menu .nav-link { color: var(--ink); font-weight: 700; font-size: 1.05rem; padding: .55rem .25rem; }
.theme-offcanvas .offcanvas-menu .nav-link:hover { color: #000; }
#offcanvasLocal .nav-link { color: var(--muted); font-weight: 600; padding: .45rem .25rem; display: block; }
#offcanvasLocal .nav-link:hover { color: var(--ink); }

/* Кнопка "нагору" */
.to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 1040; width: 2.9rem; height: 2.9rem; border-radius: var(--r-pill); border: 0; background: var(--ink); color: #fff; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 .5rem 1.25rem rgba(23, 25, 29, .25); opacity: 0; visibility: hidden; transform: translateY(.5rem); transition: opacity .3s ease, transform .3s ease, visibility .3s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #000; }

/* Доступність: вимикаємо рух для тих, хто його не хоче */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .lift, .cat-item, .btn-ink, .btn-ghost { transition: none; }
    .cat-tabs .nav-link.hint, #calcCta.hint { animation: none; }
    .to-top { transition: none; }
}

/* Галерейна розкладка CardBlock: вертикальне фото 3/4, як у «Наших роботах» */
.pick-photo.ratio-34 { aspect-ratio: 3/4; }
/* У галереї картка — це саме фото, тож зайвих відступів навколо не треба */
.pick-card.gallery-card { padding: .75rem; }

/* ============================================================================
   STD-8 · доступність.

   Видимий фокус. Раніше стилів фокуса не було зовсім, тобто людина, яка
   ходить сайтом із клавіатури, не бачила, де вона перебуває. :focus-visible,
   а не :focus — щоб кільце не спалахувало від кліка мишею.
   ============================================================================ */
:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 2px;
    border-radius: 4px;
}
.card-dark :focus-visible,
.theme-footer :focus-visible { outline-color: #fff; }

/* Перехід одразу до вмісту — перше, що чує зчитувач екрана й перше,
   на що потрапляє Tab. Ховається, поки не отримає фокус. */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 1080;
    background: var(--ink); color: #fff; padding: .75rem 1.25rem;
    border-radius: 0 0 var(--r-xl) 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ============================================================================
   CMS-13 · абзац із роллю (callout): довідка, застереження, межа,
   «кому не підходить». Колір — лише на смужці й іконці: чотири фонові
   кольори на одній сторінці перетворили б застереження на шпалери.
   Контраст тексту той самий, що й у звичайного абзацу (--ink / --muted).
   ============================================================================ */
.callout { display: flex; gap: 1rem; background: var(--card); border-radius: var(--r-xl); padding: 1.25rem 1.5rem; border-left: .35rem solid var(--muted); }
.callout-icon { font-size: 1.4rem; line-height: 1.2; flex-shrink: 0; color: var(--muted); }
.callout-body { min-width: 0; }
.callout-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 .35rem; letter-spacing: -.01em; }
.callout-text { color: var(--muted); }
.callout-text p:last-child { margin-bottom: 0; }
.callout-info   { border-left-color: #2f6fed; }  .callout-info .callout-icon   { color: #2f6fed; }
.callout-warning{ border-left-color: #d98b00; }  .callout-warning .callout-icon{ color: #b87400; }
.callout-limit  { border-left-color: var(--ink); } .callout-limit .callout-icon { color: var(--ink); }
.callout-notfor { border-left-color: #b3261e; }  .callout-notfor .callout-icon { color: #b3261e; }

/* ============================================================================
   CMS-11 · таблиця з даних. Семантична <table>, читається й машиною,
   й на телефоні (table-responsive від Bootstrap). У specs перша колонка —
   заголовок рядка, тому вона жирна.
   ============================================================================ */
.data-table { --bs-table-bg: transparent; font-size: .95rem; }
.data-table caption { caption-side: bottom; color: var(--muted); font-size: .85rem; padding-top: .75rem; }
.data-table-caption { color: var(--muted); font-size: .85rem; padding-top: .75rem; }
/* MOB-1. Широка таблиця на телефоні: перша колонка липка, край — підказка, що є ще */
.data-table-wrap { position: relative; }
@media (max-width: 767.98px) {
    .data-table-wrap { mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); }
    .data-table tbody th:first-child, .data-table tbody td:first-child, .data-table thead th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 4px 0 8px -6px rgba(0,0,0,.25); }
    .data-table-specs tbody th { width: auto; max-width: 9rem; }
}
.data-table thead th { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--line); padding: .6rem .75rem; white-space: nowrap; }
.data-table tbody td, .data-table tbody th { padding: .65rem .75rem; border-bottom: 1px solid var(--fog); vertical-align: top; }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table-specs tbody th { font-weight: 700; color: var(--ink); width: 40%; }
.data-table-specs tbody td { font-variant-numeric: tabular-nums; }

/* ============================================================================
   CMS-16 · розкладки карток без фото.
   stats — .stat уже є (лічильники hero), тут лише вирівнювання в сітці;
   checklist — рядок «іконка + текст», без картки;
   links — .cat-item з каталогу; static — той самий вигляд без href.
   .card-link/.stretched-link: картка з Url клікабельна цілком.
   ============================================================================ */
.stat-card { height: 100%; }
.check-item { display: flex; gap: .9rem; align-items: flex-start; padding: .75rem 0; }
.check-item > .bi { font-size: 1.35rem; color: var(--ink); flex-shrink: 0; line-height: 1.3; }
.check-item b { display: block; font-weight: 700; }
.check-item span { color: var(--muted); font-size: .95rem; }
.cat-item-static { cursor: default; }
.cat-item-static:hover { border-color: transparent; transform: none; }
.pick-card .stretched-link:focus-visible { outline-offset: -3px; }

/* CONTENT-12 · підпис-посилання під карткою («Ліміти P/45 →»): картка з Url
   клікабельна цілком, тому це span, не <a> — два лінки в одне місце не треба */
.pick-card .spec-link { display: block; margin-top: auto; padding-top: .9rem; font-weight: 700; font-size: .92rem; color: var(--ink); }

/* FORM-1 · медівниця форми заявки: поза екраном, не display:none —
   частина ботів пропускає display:none, а позиціонування — ні */
.hp-field { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

/* STD-6 · список документів */
.doc-item { display: flex; align-items: center; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--fog); }
.doc-item:last-child { border-bottom: 0; }
.doc-icon { font-size: 1.6rem; color: var(--ink); flex-shrink: 0; }
.doc-body { flex-grow: 1; min-width: 0; }
.doc-title { font-weight: 700; color: var(--ink); text-decoration: none; }
.doc-title:hover { text-decoration: underline; }
.doc-meta { display: block; color: var(--muted); font-size: .85rem; }
.card-dark .text-muted-2 { color: #9aa1ab; }  /* CMS-14: сірий на темному — контраст */

/* SHOP-1 · макет виробу (drawing.js): світла сцена, тонкі приглушені
   розмірні лінії піксельної товщини. Кольори макета — CSS-змінні на svg. */
/* Фон за виробом = фон сторінки (Іван 12.09); на хабі всі макети однієї
   висоти — вироби різних пропорцій стоять в один ряд */
.cfg-stage, .hub-stage { display: flex; justify-content: center; align-items: center; background: var(--fog); border-radius: var(--r-xl); padding: 1rem .75rem .75rem; }
.cfg-stage svg { width: 100%; height: auto; max-height: min(62vh, 480px); display: block; }
/* UX-3: на телефоні макет нижчий (був ~500 px) — під ним ще кольори й FAQ */
@media (max-width: 991.98px) { .cfg-stage svg { max-height: 260px; } }

/* UX-10 (13.09). Шапка товару без картки: крихти → H1 + лід в один ряд */
.product-h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; }
/* 19.09 (Іван): лід став плашкою-підказкою (.cfg-tipbox) і тягнеться на висоту
   H1. Три рядки, а не два: це не хінт на наведення, а текст, який читають. */
.product-lead { flex: 1 1 18rem; --tip-lines: 3; }

/* UX-3 (13.09). Липка панель ціни на телефоні */
.cfg-sticky { position: fixed; left: .5rem; right: .5rem; bottom: .5rem; z-index: 1035; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .9rem; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 .6rem 1.5rem rgba(23, 25, 29, .16); }
.cfg-sticky[hidden] { display: none; }
.cfg-sticky-price { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.cfg-sticky .btn.is-off { opacity: .45; }
/* коли панель видима, кнопка «нагору» їй заважає */
@media (max-width: 991.98px) { .to-top { bottom: 4.5rem; } }

/* MOB-4 (13.09). Згорнутий довгий текст на телефоні (theme.js, data-clamp) */
[data-clamp].is-clamped { max-height: 15rem; overflow: hidden; position: relative; }
[data-clamp].is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4rem; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); }
.clamp-more { display: inline-flex; margin-top: .5rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: var(--r-pill); padding: .45rem 1rem; font-weight: 600; font-size: .9rem; }
/* на телефоні текст SEO-блоків не має бути «лідом» 1.25rem — читається, але не тягне сторінку вниз */
@media (max-width: 991.98px) { .theme .card-xl .fs-5, .theme .callout .fs-5 { font-size: 1.05rem !important; } }

/* UX-14. Елементи лише для тих, хто без JS (кнопка «Оновити» в кошику) */
.js .nojs-only { display: none; }
/* CALC-5 (14.09). Доповнення: рядок = галочка (або вибір) + назва з тултіпом
   + ціна, що з'являється після ввімкнення. Вигляд спокійний: це не вітрина
   допродажів, а відповіді на питання «а якщо в мене…». */
.cfg-options { display: grid; gap: .75rem; margin-bottom: .75rem; }
.cfg-opt-group { display: grid; gap: .35rem; }
.cfg-opt-row { display: flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer; }
/* 18.09: перемикач замість чекбокса; .form-check дає відступ під input — прибираємо */
.cfg-opt-switch { padding: 0; margin: 0; min-height: 0; display: inline-flex; flex: none; }
.cfg-opt-switch .form-check-input { margin: 0; width: 2.4em; height: 1.3em; cursor: pointer; }
.cfg-opt-switch .form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
/* 18.09: плаваючі підписи на розмірах — число велике, підпис із сантиметрами всередині */
.cfg .form-floating > .form-control { font-size: 1.2rem; font-weight: 700; }
.cfg .form-floating > label .mm-cm { font-size: inherit; margin-left: .25rem; }
.cfg-opt-row-choice { cursor: default; }
.cfg-opt-name { flex: 1 1 auto; font-size: .95rem; }
.cfg-opt-price { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.cfg-opt-qty { width: 4.5rem; flex: none; }
.cfg-opt-values { display: flex; flex-wrap: wrap; gap: .35rem; margin: .15rem 0 .25rem 1.6rem; }
.cfg-opt-value { font-size: .85rem; padding: .35rem .75rem; }
/* CALC-8: опція не діє при цьому керуванні — гасимо, але не ховаємо:
   людина має бачити, що її вибір врахований і чому він зараз недоступний */
.cfg-opt.is-off { opacity: .45; }
.cfg-opt.is-off .cfg-opt-row { cursor: default; }
.cfg-opt-expert > summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.cfg-opt-expert[open] > summary { margin-bottom: .5rem; }
.cfg-notice { line-height: 1.35; }
.cfg-notice:empty { display: none; }
/* поки чекаємо на калькулятор — ціна пригасає й крутиться спінер; кнопки не блокуємо */
.cfg.is-loading .cfg-price-value, .cfg.is-loading .cfg-opt-price { opacity: .55; transition: opacity .2s; }
.cfg-spin { display: none; vertical-align: middle; color: var(--muted); }
.cfg.is-loading .cfg-spin { display: inline-block; }

/* UX-9 (13.09). Месенджери й копія конфігурації під вибором */
.cfg-ask { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.trust-line { line-height: 1.45; }

/* UX-12 (13.09) → скасовано 14.09 (Іван): без стрілок поле перестає читатись як
   числове — на десктопі не видно інкременту, і виникає сумнів, чи буде на
   телефоні цифрова клавіатура. Стрілки повертаємо (крок 10 мм у розмітці),
   `inputmode="numeric"` лишається. Було:
.cfg input[type=number], .hub-card input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.cfg input[type=number]::-webkit-outer-spin-button, .cfg input[type=number]::-webkit-inner-spin-button,
.hub-card input[type=number]::-webkit-outer-spin-button, .hub-card input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
*/
.hub-stage { height: 210px; gap: .6rem; justify-content: flex-start; }
/* стрічка кольорів ліворуч, силует — по центру вільного місця (auto-поля
   з'їдають залишок порівну), а не по центру всієї сцени разом зі стрічкою */
.hub-stage svg { height: 100%; width: auto; max-width: 100%; display: block; margin-inline: auto; }
/* 20.09 (Іван): стрічка кольорів ліворуч від силуету. Зона під кружечок —
   константа 26 px (20 px кружечок + 6 px проміжок): сім кольорів займають
   рівно 182 px, тобто висоту SVG. Менше кольорів — коротша стрічка, розмір і
   проміжки ті самі; тому `justify-content: flex-start` — малюємо згори вниз,
   а не центруємо. Стрічка — окрема колонка, не накладка: на широкій ролеті
   (1800 мм) силует займає майже всю сцену, і накладка лягла б на полотно. */
.hub-swatches { --sw-cell: 26px; --sw-dot: 20px;
                display: flex; flex-direction: column; justify-content: flex-start;
                flex: 0 0 auto; align-self: stretch; margin-left: -3px; }
/* Кнопка — на всю зону 26 px (щоб палець влучав: WCAG просить від 24), а
   видимий кружечок — вкладений span на 20 px; поля кнопки й дають проміжок,
   тому окремого gap у стрічці немає. Колір фарбує саме span: інлайновий
   `background` на кнопці скидав background-clip, і заливка лягала на всі
   26 px, з'їдаючи проміжок і ховаючи кільце вибору (20.09). */
.hub-swatch { width: var(--sw-cell); height: var(--sw-cell); flex: 0 0 var(--sw-cell);
              padding: calc((var(--sw-cell) - var(--sw-dot)) / 2); border: 0;
              background: none; border-radius: 50%; cursor: pointer; }
.hub-dot { display: block; width: 100%; height: 100%; border-radius: 50%;
           box-shadow: inset 0 0 0 1px rgba(23, 25, 29, .18);
           transition: transform .12s, box-shadow .12s; }
.hub-swatch:hover .hub-dot { transform: scale(1.12); }
/* кільце вибору рівно по полях кнопки — не налазить на сусідні кружечки */
.hub-swatch.active .hub-dot, .hub-swatch:focus-visible .hub-dot {
    box-shadow: inset 0 0 0 1px rgba(23, 25, 29, .18), 0 0 0 2px #fff, 0 0 0 3px var(--accent); }
.hub-swatch:focus-visible { outline: none; }
/* UX-16: кнопки підйому на картці — ті самі, що на товарі, але дрібніші:
   сцена тут 182 px, і 34 px кружечки з'їли б її кут. 28 px — усе ще палець. */
.hub-stage { position: relative; }
.hub-stage-tools { position: absolute; top: .5rem; right: .5rem; display: flex; flex-direction: column; gap: .3rem; z-index: 1; }
.hub-tool { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink);
            display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: .8rem;
            touch-action: none; user-select: none; }
.hub-tool:hover { border-color: var(--ink); }
/* Підсвітка-підказка — та сама, що в дверному калькуляторі (theme-v2.css,
   hint-pulse): Іванові подобається, як вона привертає увагу, і помаранчевий
   там наш. Два блимання, далі кнопка стоїть звичайною. */
@keyframes hub-hint-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(238, 108, 0, 0); }
    50%      { box-shadow: 0 0 0 3px rgba(238, 108, 0, .75); }
}
.hub-tool.is-hint { animation: hub-hint-pulse 1.1s ease-in-out 2; border-color: var(--accent); color: var(--accent); }
/* Те саме блимання для решти кроків мультика: поля розміру, кнопка «Рахувати».
   Ціна — не коробка, а число, тож їй світиться не рамка, а сам колір. */
.hub-card .form-control.is-hint { animation: hub-hint-pulse 1.1s ease-in-out 2; border-color: var(--accent); }
.hub-buy .btn.is-hint { animation: hub-hint-pulse 1.1s ease-in-out 2; }
.hub-price.is-hint { animation: hub-hint-ink 1.1s ease-in-out 2; }
@keyframes hub-hint-ink { 0%, 100% { color: inherit; } 50% { color: var(--accent); } }
@media (prefers-reduced-motion: reduce) {
    .hub-tool.is-hint, .hub-card .form-control.is-hint, .hub-buy .btn.is-hint, .hub-price.is-hint { animation: none; }
}
/* UX-16: сцена в прорізі. Світліша за розмірні лінії — вона підказка, а не
   креслення, і не повинна сперечатися з ролетою за увагу (Іван: «тонкими
   сірими контурами, щоб не забирати увагу»). */
.cfg-stage .scn, .hub-stage .scn { stroke: #b4b3af; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; stroke-linejoin: round; }
.cfg-stage .dim, .hub-stage .dim { stroke: #6f6e69; stroke-width: .8; vector-effect: non-scaling-stroke; fill: none; }
.cfg-stage .ext, .hub-stage .ext { stroke: #9b9a94; stroke-width: .6; vector-effect: non-scaling-stroke; fill: none; }
.cfg-stage .dimt, .hub-stage .dimt { fill: #4a4944; font-family: "Manrope", system-ui, sans-serif; }
.cfg-photo { max-width: 100%; border-radius: var(--r-xl); }
.cfg.is-loading .cfg-price-value { opacity: .5; }
/* кнопки підйому й розмірів — на самому макеті (Іван 13.09) */
.cfg-stage { position: relative; }
.cfg-stage-tools { position: absolute; top: .75rem; right: .75rem; display: flex; flex-direction: column; gap: .35rem; }
.cfg-tool { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cfg-tool:hover { border-color: var(--ink); }
.cfg-stage-dims { position: absolute; left: .75rem; bottom: .75rem; margin: 0; display: inline-flex; align-items: center; gap: .3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill); padding: .25rem .6rem; font-size: .85rem; color: var(--muted); cursor: pointer; }
.cfg-stage-dims input { margin: 0; }
/* лінійки — однакової ширини над полями розміру */
/* подвійний клас — щоб перебити .cfg-tabs{display:flex}, який стоїть нижче у файлі */
.cfg-tabs.cfg-tabs-eq { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: .5rem; }
/* width:100% обов'язково: <button> у grid не розтягується сам, як звичайний блок */
.cfg-tabs-eq .cfg-tab { width: 100%; align-items: center; text-align: center; padding: .6rem .5rem; }
/* Профілі: групи в один рядок по чверті (Іван 18.09, було по половині) — груп
   не більше трьох, і так вони не переносяться, а пояснення до обраної групи
   лишається під нею. Пігулки всередині групи стають у стовпчик, якщо не влазять. */
/* 18.09 (Іван): «заголовок ліворуч (col-4) — підказка праворуч (col-8)».
   Одна схема для профілю й кольору: пояснення завжди на світлій підкладці з
   іконкою, тож форма не стрибає від довжини тексту й економить два рядки. */
/* Заголовок — чверть рядка, підказка — решта, і так на будь-якому екрані
   (Іван 18.09): на телефоні вони більше не стають одне під одним — це з'їдало
   рядок саме там, де його найменше. */
.cfg-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: .5rem; align-items: center; margin-bottom: .5rem; }
/* 18.09 (Іван): стала висота. Текст у підказці міняється на наведення й при
   виборі — з «авто» висотою сторінка під нею дригалась. Тому рівно N рядків
   (два на десктопі, три на телефоні, де колонка вужча), а довше — обрізаємо
   трикрапкою: підказка це підказка, не стаття. */
.cfg-tipbox { --tip-lines: 2; display: flex; align-items: center; gap: .5rem; padding: .4rem .7rem;
              height: calc(var(--tip-lines) * 1.25em + .8rem + 2px);
              background: var(--mist, #f3f5f8); border-radius: .7rem; color: var(--muted); font-size: .85rem; line-height: 1.25; }
.cfg-tipbox i { color: var(--accent); flex: none; }
.cfg-tipbox span { display: -webkit-box; -webkit-line-clamp: var(--tip-lines); -webkit-box-orient: vertical; overflow: hidden; }
.cfg-tipbox span:empty::before { content: "Оберіть варіант"; opacity: .6; }
@media (max-width: 767.98px) { .cfg-tipbox { --tip-lines: 3; } }
/* Плашка, що росте під сусіда (лід біля H1): висоту задає ряд, а не число
   рядків; трикрапка лишається запобіжником проти нескінченного тексту. */
.cfg-tipbox.is-stretch { height: auto; padding: .5rem .8rem; }

/* STD-10 (19.09, Іван). Умови — всередині картки ціни, під дівайдером: це про
   виріб і цінову політику. Підпис сірий, відповідь помаранчева — пари
   «питання → відповідь» читаються швидше за суцільний рядок.
   Текст акценту тут не --accent (#EE6C00 на сірому дає 3.1:1 — мало для
   дрібного), а темніший --accent-ink: 5:1, AA. Іконки лишаються яскравими:
   для них поріг 3:1. */
.cfg-terms { --accent-ink: #C25500; flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center;
             gap: .15rem .85rem; margin-top: .1rem; padding-top: .55rem;
             border-top: 1px solid rgba(23, 25, 29, .09); font-size: .76rem; line-height: 1.5; }
/* Розрив рядка «за задумом»: перший рядок — що входить і монтаж, другий —
   доставка · гарантія · повернення (Іван 19.09). Без нього флекс ламав ряд
   де завгодно й «Гарантія» їхала до «Обміну» через рядок. Вужчий екран далі
   переносить сам — це підказка розкладці, а не заборона. */
.cfg-terms-br { flex: 0 0 100%; height: 0; }
.cfg-term { display: inline-flex; align-items: center; gap: .3rem; }
.cfg-term-k { color: var(--muted); }
.cfg-terms a, .cfg-terms b { color: var(--accent-ink); font-weight: 700; }
.cfg-terms a { text-decoration: underline; text-underline-offset: .15em; }
.cfg-terms a:hover { color: var(--ink); }
.cfg-terms .bi { color: var(--accent); }
.cfg-terms .bi + .bi { margin-left: .2rem; }
.cfg-terms .tip { cursor: help; }
/* Вкладки блоку деталей — у стилі пігулок сторінки, не бутстрапівські сині */
.cfg-details-nav .nav-link { color: var(--muted); border-radius: .8rem; padding: .35rem .8rem; font-size: .92rem; font-weight: 700; }
.cfg-details-nav .nav-link.active { background: var(--ink); color: #fff; }
/* У темі є голий `h2 { font-size: 2.25rem }`, і він б'є бутстрапівський .h6 —
   заголовки вкладок мають бути H2 заради структури, але звучати підписом. */
#details h2 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.cfg-spec-table th { font-weight: 500; color: var(--muted); width: 45%; }
.cfg-spec-calc { font-size: .78em; opacity: .7; white-space: nowrap; }
.cfg-spec-table td { font-weight: 700; }
.cfg-terms-list { list-style: none; padding: 0; margin: 0; }
.cfg-terms-list li { display: flex; gap: .5rem; padding: .2rem 0; }
.cfg-terms-list .bi { color: var(--accent); }
/* Групи профілів: третина рядка на великих, половина на малих (Іван 18.09) */
.cfg-profiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem .75rem; align-items: start; }
/* 18.09: у чверті рядка мають поміститись три пігулки (P39 · P45 · P55) — тому
   тут вони компактніші за звичайні; на дотик усе одно лишається ≥ 38 px висоти */
.cfg-profiles .cfg-pills { gap: .3rem; margin-bottom: 0; }
.cfg-profiles .cfg-pill { padding: .42rem .62rem; font-size: .86rem; }
@media (max-width: 767.98px) { .cfg-profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cfg-group-hint { min-height: 1.2em; margin-top: .35rem; }
@media (max-width: 991.98px) { .cfg-group-hint:empty { display: none; } }
/* значок підказки з глосарію (<tip>) — скрізь однаковий */
.tip { color: var(--muted); font-size: .95em; margin-left: .3rem; cursor: help; vertical-align: -1px; }
.tip:hover, .tip:focus-visible { color: var(--ink); outline: none; }
.tooltip-inner { text-align: left; max-width: 280px; font-size: .85rem; }
/* ціна + кошик одразу під розміром */
.cfg-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.1rem; background: var(--fog); border-radius: 1rem; margin-bottom: .75rem; }
.cfg-buy .btn.is-off { opacity: .45; }
.cfg-group { margin-bottom: .5rem; }
.cfg-group-name { font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
.cfg-kit-short { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
/* кошик */
/* бейдж — помаранчевий з темним текстом (ComfortDoors .idx) */
.cart-badge { display: inline-block; min-width: 1.35em; padding: 0 .35em; border-radius: var(--r-pill); background: var(--accent); color: #18181b; font-size: .75rem; font-weight: 700; text-align: center; }
.cart-item { padding: 1rem 0; border-bottom: 1px solid var(--fog); }
.cart-item-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cart-item-title a { color: var(--ink); font-weight: 700; text-decoration: none; }
.cart-item-price { font-weight: 800; font-size: 1.15rem; white-space: nowrap; text-align: right; }
.cart-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); vertical-align: -1px; margin: 0 .2rem 0 .3rem; }
/* SHOP-6 крок 5: список за постачальником — заголовок з терміном і доставкою над позиціями */
.cart-group { margin-top: 1.25rem; }
.cart-group + .cart-group { margin-top: 1.75rem; }
/* Заголовок і термін/доставка — завжди два рядки: flex-wrap робив їх то одним рядком,
   то двома залежно від довжини тексту, і списки виглядали по-різному */
.cart-group-head { padding-bottom: .4rem; border-bottom: 2px solid var(--ink); }
.cart-group-head > .small { margin-top: .15rem; }
.cart-group-title { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
/* 24.09 (Іван): позиція кошика — один рядок: картинка · опис · кількість · ціна ·
   червоний кошик. Опис тягнеться, решта — по вмісту. На телефоні кількість,
   ціна й кошик переносяться під опис одним рядком. */
.cart-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto auto;
            grid-template-areas: "thumb desc qty price remove" "thumb desc links links links";
            align-items: center; gap: .35rem .9rem; }
.cart-cell-links { grid-area: links; text-align: right; align-self: start; }
.cart-cell-links a:last-child { margin-right: 0; }
.cart-cell-thumb { grid-area: thumb; }
.cart-cell-desc { grid-area: desc; min-width: 0; }
.cart-cell-qty { grid-area: qty; }
.cart-cell-price { grid-area: price; text-align: right; white-space: nowrap; }
.cart-cell-remove { grid-area: remove; }
.cart-qty { width: 4.2rem; text-align: center; }
.cart-remove { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #f3c3c3; background: #fff; color: #c62828;
               display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 1.05rem; }
.cart-remove:hover { background: #c62828; color: #fff; border-color: #c62828; }
@media (max-width: 575.98px) {
    .cart-row { grid-template-columns: 84px auto 1fr auto; grid-template-areas: "thumb desc desc desc" "qty price price remove" "links links links links"; }
    .cart-cell-links { text-align: left; }
    .cart-cell-thumb .cart-item-thumb { width: 84px; height: 63px; }
    .cart-cell-price { text-align: left; }
}
/* SHOP-6: силует позиції — знімок креслення з браузера; код кошика — клікабельний, копіює посилання */
.cart-item-thumb { flex: none; width: 96px; height: 72px; object-fit: contain; background: var(--fog); border-radius: .5rem; }
.cart-item-thumb-empty { display: block; }
.cart-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; cursor: pointer; border-bottom: 1px dashed var(--line); }
.cart-code:hover { border-bottom-color: var(--ink); }

/* SHOP-15 · згода на розміри поза рекомендацією. Той самий бурштин, що й
   попередження на товарі: людина вже бачила цей колір там, де обирала розмір,
   і впізнає його тут. Поки згоди немає — рамка яскравіша, бо це те, що
   тримає замовлення. */
.cart-consent { margin-top: 1.25rem; padding: .9rem 1rem; border-radius: .8rem;
                background: #fff4e0; border: 1px solid #ffc978; color: #5a3600; }
.cart-consent.is-on { border-color: #ffd79a; }
.cart-consent-head { font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.cart-consent-head i { color: #b36b00; }
.cart-consent-list { margin: .5rem 0 .6rem; padding-left: 1.1rem; font-size: .9rem; }
.cart-consent-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; line-height: 1.35; cursor: pointer; }
.cart-consent-check input { margin-top: .2rem; flex: none; width: 1.1rem; height: 1.1rem; }

/* SHOP-1 · конфігуратор: таби лінійок, пігулки варіантів, свотчі кольорів, ціна */
.cfg-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; }
.cfg-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.cfg-tab { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 1rem; padding: .55rem .9rem; font-weight: 700; font-size: .92rem; line-height: 1.15; }
/* UX-11 (схема ComfortDoors): обране — чорне з помаранчевим написом, як дія */
.cfg-tab.active { background: var(--ink); color: var(--accent-lt); border-color: var(--ink); }
/* 15.09: на таб іде три речі — ціна, термін, профіль; тому кегль трохи менший,
   а «днів» скорочено до «дн.» (Іван). Профіль — окремим рядком і ще дрібніше:
   він пояснює число, а не змагається з ним. */
.cfg-tab-price { font-weight: 500; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.cfg-tab.active .cfg-tab-price { color: #c9ced6; }
/* 18.09: назва лінійки й марка профілю в одному рядку — жирна назва, дрібна сіра марка */
.cfg-tab-head { display: inline-flex; align-items: baseline; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.cfg-tab-prof { font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.cfg-tab-prof:empty { display: none; }
.cfg-tab.active .cfg-tab-prof { color: #c9ced6; }
/* «3 580 за 10 дн.»: термін — тим самим кеглем, з відступом; на вузьких табах переноситься під число */
.cfg-tab-days { margin-left: .3em; }
@media (max-width: 575.98px) { .cfg-tab-price { white-space: normal; } .cfg-tab-days { display: block; margin-left: 0; font-size: .72rem; } }
.cfg-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.cfg-pill { display: inline-flex; align-items: baseline; gap: .5rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: var(--r-pill); padding: .45rem .9rem; font-weight: 600; font-size: .9rem; }
/* вибір профілю — помаранчева рамка на білому (ComfortDoors .opening-label:active) */
.cfg-pill.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cfg-pill-price { font-size: .8rem; color: var(--muted); font-weight: 500; }
.cfg-colors { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: .4rem; }
.cfg-swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); padding: 0; }
/* UX-12: для пальця ≥ 40 px */
@media (max-width: 991.98px) { .cfg-swatch { width: 40px; height: 40px; } }
.cfg-swatch.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.cfg-swatch:focus-visible, .cfg-pill:focus-visible, .cfg-tab:focus-visible { outline: none; box-shadow: 0 0 0 .25rem var(--accent-ring); }
.cfg-swatch.active:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent), 0 0 0 .5rem var(--accent-ring); }
/* поля розміру — фокус як у калькуляторі ComfortDoors */
.theme .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem var(--accent-ring); }
.cfg-price-value { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
/* 13.09: порожнє повідомлення не займає рядка (Іван: економимо висоту); було min-height:1.2em */
.cfg-approx { font-size: .8rem; font-weight: 500; color: var(--muted); margin-right: .2rem; }   /* SHOP-5 */
.cfg-msg { color: var(--muted); margin: .5rem 0 .75rem; }
.cfg-msg:empty { display: none; }
/* 17.09 (Іван): підміну профілю («P39 не підходить — підставлено PE55») треба
   бачити, а не читати дрібним сірим: людина обрала одне, а в ціні інше */
.cfg-msg.is-warn { color: #7a4a00; background: #fff4e0; border: 1px solid #ffd79a; border-radius: .6rem; padding: .5rem .75rem; }
.cfg-msg.is-warn::before { content: "\26A0\FE0F"; margin-right: .4rem; }
.cfg-msg.is-ok { color: #1d5c2f; background: #e9f7ec; border: 1px solid #b7e2c1; border-radius: .6rem; padding: .5rem .75rem; }
.cfg-msg.is-ok::before { content: "\2713"; margin-right: .4rem; font-weight: 700; }
/* SHOP-15: на картці хаба місця під плашку немає — лишається колір. Бурштин
   між сірим (примітка) і червоним (відмова): ціна є, але з умовою.
   #8a4b00 на білому — 6,4:1, читається і дрібним. */
.text-warn { color: #8a4b00; }
/* CALC-7: «у комплекті за замовчуванням» — слова калькулятора, дрібним і
   без наголосу: це довідка, а не те, що людина обирала */
.cfg-defaults { list-style: none; padding: 0; margin: .2rem 0 0; color: var(--muted); font-size: .85rem; }
.cfg-defaults li { padding: .1rem 0 .1rem .9rem; position: relative; line-height: 1.35; }
.cfg-defaults li::before { content: "·"; position: absolute; left: .25rem; }
.cfg-defaults-label { font-size: .8rem; }
.cart-item-options { color: var(--ink); }
.cfg-kit { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .35rem 1.5rem; }
.cfg-kit li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--fog); font-size: .92rem; }
.cfg-kit li span { color: var(--muted); }
/* Керування: кнопки по ширині назви (Іван 19.09). Було по рівній третині — і
   «З електроприводом» ламалось на два рядки, піднімаючи весь ряд, поки два
   сусіди стояли напівпорожні. Тепер кожна картка не вужча за свій напис, а
   вільне місце ділиться порівну: довга стає ширшою за рахунок коротких.
   flex-shrink: 0 — щоб замість стискання й переносу слів картка пішла в
   наступний ряд (так вузький екран сам розкладе їх 2+1). */
.cfg-siblings { display: flex; flex-wrap: wrap; gap: .5rem; }
/* без описів картки стали вдвічі нижчі — padding теж (18.09) */
.cfg-sibling { flex: 1 0 auto; max-width: 100%; display: flex; align-items: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: .9rem; color: var(--ink); text-decoration: none; font-size: .92rem; }
/* 18.09: поточне керування в тому ж списку — обведене акцентом, як обраний профіль */
.cfg-sibling.is-current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); cursor: default; }
.cfg-tool { touch-action: none; user-select: none; }
.cfg-sibling:hover { border-color: var(--ink); }
.cfg-sibling-name { font-weight: 700; }

/* SHOP-1 · картки-пресети хабу */
.hub-card-title { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
/* 20.09 (Іван): поля розміру по половині рядка з плаваючими підписами — як у
   калькуляторі; нижче окремий ряд «ціна ліворуч, кнопка праворуч». Було: поля
   вузькі в один ряд із ціною, а кнопка на всю ширину під ними. */
.hub-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; }
.hub-buy .btn { white-space: nowrap; }
/* підказку про колір ужимаємо: на картці вона довідка, а не текст для читання */
.hub-card .cfg-tipbox { font-size: .78rem; padding: .4rem .6rem; }
.hub-price { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
/* 20.09 (Іван): «напис зсуває кнопку». Підпис лінійки живе довільної довжини
   («Еко · P39 · Золотий дуб — текстура дерева»), і поки він стояв в одній
   коробці з ціною, довгий варіант розпирав коробку й переносив кнопку вниз —
   картки поруч ставали різними. Тепер підпис бере окремий рядок під ціною й
   кнопкою: `flex: 0 0 100%`. Ряд «скільки → що далі» тримає форму за будь-якого
   тексту. Порожній (поки ціни немає) — не займає рядка. */
.hub-price-sub { flex: 0 0 100%; font-size: .78rem; line-height: 1.25; }
.hub-price-sub:empty { display: none; }
.hub-card.is-loading .hub-price { opacity: .5; }
/* 13.09. Дубль розміру в сантиметрах — у рядку підпису праворуч від «Ширина, мм»
   (theme.js: data-mm / data-cm). Окремого рядка не займає — Іван: економимо висоту. */
.mm-label { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .25rem; }
.mm-cm { font-size: .82rem; color: var(--muted); white-space: nowrap; }

/* ---------- Друк кошика (Іван 24.09: «PDF — це друк кошика з браузера») ----------
   Кошик як документ: код, списки з умовами, позиції зі знімком і специфікацією,
   разом і термін дії. Усе інтерактивне — шапка, підвал, кнопки, поля, згода —
   зникає. Специфікацію розкриваємо примусово: на папері «клікніть» не працює.
   Область — `body:is(:has(#cartPage), :has(#orderPage))`: у layout немає класу на body, а :has у друку
   з того самого браузера є всюди, де є сам друк. */
.print-only { display: none; }
/* посилання «редагувати» / «копіювати й редагувати» під описом позиції */
/* SHOP-8: форма й сторінка замовлення */
.order-delivery { padding: .55rem .8rem .55rem 2.2rem; border: 1px solid var(--line); border-radius: .75rem; cursor: pointer; }
.order-delivery:has(input:checked) { border-color: var(--accent); background: var(--accent-soft, rgba(240,120,0,.06)); }
.order-delivery .form-check-input { margin-left: -1.6rem; }
.order-summary .order-sum-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.order-summary .order-sum-price { white-space: nowrap; font-weight: 700; }
.order-summary .order-sum-total { display: flex; justify-content: space-between; padding-top: .7rem; font-size: 1.15rem; }
.order-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.order-status { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: var(--surface-2, #f3f4f6); font-size: .9rem; }
.order-lines .order-row { grid-template-areas: "thumb desc qty price"; grid-template-columns: 96px minmax(0, 1fr) auto auto; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.order-block { padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 1rem; }
.order-block-title { font-weight: 700; margin-bottom: .3rem; }
.order-pay { background: var(--surface-2, #f7f7f8); }
.order-phone { border: 1px solid #ffd79a; background: #fffaf0; }
/* FORM-5: «+38» як частина поля, не кнопка */
.phone-field .input-group-text { background: var(--surface-2, #f7f7f8); color: var(--muted); border-color: var(--line); font-variant-numeric: tabular-nums; }
.phone-field .form-control { letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.phone-field.is-invalid .form-control, .phone-field.is-invalid .input-group-text { border-color: #d9534f; }   /* SHOP-18: той самий «увага», що .cfg-msg.is-warn */
.order-pay-qr { display: flex; gap: .9rem; align-items: center; }
.order-pay-qr-img { flex: 0 0 auto; width: 112px; height: 112px; background: #fff; border: 1px solid var(--line); border-radius: .6rem; padding: 4px; }
.order-pay-qr-img svg { width: 100%; height: 100%; display: block; }
.order-req { display: grid; grid-template-columns: auto 1fr; gap: .25rem .8rem; margin: .4rem 0 .5rem; }
.order-req dt { color: var(--muted); font-weight: 400; }
.order-req dd { margin: 0; word-break: break-all; }
@media (max-width: 575.98px) { .order-lines .order-row { grid-template-columns: 84px auto 1fr; grid-template-areas: "thumb desc desc" "qty price price"; } }
.cart-item-links a { color: var(--muted); text-decoration: none; margin-right: .9rem; }
.cart-item-links a:hover { color: var(--accent-ink, #C25500); text-decoration: underline; }
@media print {
    /* шапка друку: бренд ліворуч, реквізити кошика в центрі, QR праворуч */
    body:is(:has(#cartPage), :has(#orderPage)) .cart-print-head { display: grid !important; grid-template-columns: 1fr auto auto; gap: 1.5rem; align-items: start;
                                          padding-bottom: .8rem; margin-bottom: 1rem; border-bottom: 2px solid #000; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-print-name { font-weight: 800; font-size: 1.3rem; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-print-line, body:is(:has(#cartPage), :has(#orderPage)) .cart-print-meta { font-size: .85rem; line-height: 1.4; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-print-qr svg { width: 26mm; height: 26mm; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-item-links { display: none; }
    body:is(:has(#cartPage), :has(#orderPage)) header, body:is(:has(#cartPage), :has(#orderPage)) footer, body:is(:has(#cartPage), :has(#orderPage)) .cfg-sticky,
    body:is(:has(#cartPage), :has(#orderPage)) .cart-actions, body:is(:has(#cartPage), :has(#orderPage)) .order-phone, body:is(:has(#cartPage), :has(#orderPage)) .cfg-ask, body:is(:has(#cartPage), :has(#orderPage)) .nojs-only,
    body:is(:has(#cartPage), :has(#orderPage)) .cart-cell-remove, body:is(:has(#cartPage), :has(#orderPage)) .cart-cell-qty form,
    body:is(:has(#cartPage), :has(#orderPage)) .cart-consent input, body:is(:has(#cartPage), :has(#orderPage)) .cart-consent button,
    body:is(:has(#cartPage), :has(#orderPage)) .cfg-msg.is-warn, body:is(:has(#cartPage), :has(#orderPage)) .cfg-msg.is-ok,
    body:is(:has(#cartPage), :has(#orderPage)) .order-pay-online, body:is(:has(#cartPage), :has(#orderPage)) .order-pay-or { display: none !important; }
    body:is(:has(#cartPage), :has(#orderPage)) .print-only { display: inline; }
    body:is(:has(#cartPage), :has(#orderPage)) { background: #fff; color: #000; }
    body:is(:has(#cartPage), :has(#orderPage)) .card-xl { box-shadow: none; padding: 0 !important; border: 0; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-row { grid-template-columns: 72px minmax(0, 1fr) auto auto; grid-template-areas: "thumb desc qty price"; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-spec { display: block; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-spec summary { display: none; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-item, body:is(:has(#cartPage), :has(#orderPage)) .cart-group { break-inside: avoid; }
    body:is(:has(#cartPage), :has(#orderPage)) a { color: #000; text-decoration: none; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-code { border: 0; }
    body:is(:has(#cartPage), :has(#orderPage)) .cart-consent { background: none; border: 1px solid #999; color: #000; }
}
