/* ===== Палітри (активна задається в index.php: <html data-theme="...">) ===== */
:root,
[data-theme="ember"] {          /* 1. Жар: помаранчевий + графіт */
    --bg: #fff6ef;
    --surface: #ffffff;
    --ink: #1f2328;
    --muted: #6b6f76;
    --line: #f1dfd1;
    --accent: #ea580c;
    --accent-2: #ff8a3d;
    --accent-ink: #ffffff;
    --soft: #ffe8d6;
    --dark: #23262b;
    --dark-ink: #f5f5f5;
    --glow: 234, 88, 12;
}
[data-theme="mint"] {           /* 2. Свіжість: бірюза + глибокий зелений */
    --bg: #effaf7;
    --surface: #ffffff;
    --ink: #0f2a27;
    --muted: #5d716d;
    --line: #cdebe3;
    --accent: #0f8f76;
    --accent-2: #19b997;
    --accent-ink: #ffffff;
    --soft: #d4f3ea;
    --dark: #0e2f2b;
    --dark-ink: #eafaf6;
    --glow: 15, 143, 118;
}
[data-theme="caramel"] {        /* 3. Карамель: у тон шкіряного ремінця */
    --bg: #faf4ec;
    --surface: #ffffff;
    --ink: #2e2219;
    --muted: #7a6a5c;
    --line: #ecdcc8;
    --accent: #a85a22;
    --accent-2: #cf7b38;
    --accent-ink: #ffffff;
    --soft: #f5e3cf;
    --dark: #3a2a1e;
    --dark-ink: #fbf1e6;
    --glow: 168, 90, 34;
}
[data-theme="ultra"] {          /* 4. Ультра: фіолетовий, як УФ-світло */
    --bg: #f4f2ff;
    --surface: #ffffff;
    --ink: #1b1640;
    --muted: #6a6688;
    --line: #dedaf6;
    --accent: #6b3cf5;
    --accent-2: #9466ff;
    --accent-ink: #ffffff;
    --soft: #e7e0ff;
    --dark: #1b1340;
    --dark-ink: #efeaff;
    --glow: 107, 60, 245;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: #e9e6e2;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b, strong { font-weight: 800; }

.page {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    padding-bottom: 84px; /* місце під нижню панель */
    overflow: hidden;
}

/* ===== Меню ===== */
.menu {
    position: sticky; top: 0; z-index: 20;
    display: flex; justify-content: space-between; gap: 4px;
    padding: 10px 12px;
    background: var(--dark);
}
.menu a {
    flex: 1; text-align: center;
    font-size: 13px; font-weight: 700; text-decoration: none;
    color: var(--dark-ink); opacity: .9;
    padding: 6px 2px; border-radius: 8px;
}
.menu a:active { background: rgba(255,255,255,.12); }

/* ===== Перший екран ===== */
.intro { padding: 18px 16px 8px; text-align: center; }
.intro__kicker {
    display: inline-block;
    font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: var(--accent);
    background: var(--soft);
    padding: 4px 10px; border-radius: 999px;
    margin-bottom: 8px;
}
.intro__title, .checkout__title {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 14px;
}

/* ===== Галерея (свайп) ===== */
.shots { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.shots__track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.shots__track::-webkit-scrollbar { display: none; }
.shots__track .shots__img { flex: 0 0 100%; width: 100%; scroll-snap-align: center; object-fit: contain; background: #fff; aspect-ratio: 3 / 4; }
.shots__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.shots__dots button {
    width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0;
    background: rgba(0,0,0,.25); cursor: pointer; transition: width .2s, background .2s;
}
.shots__dots button.is-on { width: 22px; border-radius: 4px; background: var(--accent); }
.shots__badge {
    position: absolute; bottom: 30px; right: 10px; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--accent); color: var(--accent-ink);
    font-size: 11px; font-weight: 700; text-transform: uppercase; line-height: 1.1;
    box-shadow: 0 6px 18px rgba(var(--glow), .45);
    transform: rotate(8deg);
}
.shots__badge b { font-size: 20px; }
.shots--single .shots__badge { bottom: 12px; }
.shots--reviews .shots__track .shots__img { height: auto; align-self: flex-start; } /* пропорції задані в index.php */
.shots--single .shots__img { width: 100%; }

/* ===== Ціна ===== */
.deal { margin: 16px 0; display: grid; gap: 8px; }
.deal__was {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    color: var(--muted); font-size: 14px;
}
.deal__was-sum {
    font-size: 18px; font-weight: 600;
    text-decoration-thickness: 2px; text-decoration-color: var(--accent);
}
.deal__cut {
    font-size: 14px; font-weight: 800;
    color: var(--accent); background: var(--soft);
    padding: 2px 8px; border-radius: 6px;
}
.deal__now {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    padding: 22px 16px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--accent-ink);
    box-shadow: 0 10px 26px rgba(var(--glow), .35);
    animation: breathe 2.4s ease-in-out infinite;
}
.deal__tag {
    position: absolute; top: -11px;
    font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    background: var(--dark); color: var(--dark-ink);
    padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.deal__sum { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.deal__sum small { font-size: 22px; font-weight: 700; letter-spacing: 0; }

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.025); }
}

/* ===== Переваги ===== */
.perks { list-style: none; display: grid; gap: 10px; margin: 6px 0 4px; }
.perks li {
    position: relative; padding: 10px 12px 10px 44px;
    background: var(--surface); border-radius: 12px; border: 1px solid var(--line);
    font-size: 15px; line-height: 1.4;
}
.perks li::before {
    content: ""; position: absolute; left: 12px; top: 50%; margin-top: -11px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ===== Кнопки ===== */
.go { padding: 18px 16px 10px; text-align: center; }
.intro .go { padding: 18px 0 10px; }
.go__btn {
    position: relative;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 58px; padding: 14px 18px;
    border: 0; border-radius: 16px; cursor: pointer;
    font: inherit; font-size: 19px; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .02em;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 20px rgba(var(--glow), .4);
    -webkit-tap-highlight-color: transparent;
}
.go__btn svg { width: 20px; height: 14px; flex: none; }
.go__btn--long { font-size: clamp(15px, 4.7vw, 19px); letter-spacing: 0; white-space: nowrap; gap: 8px; padding: 14px 12px; }
.go__btn:active { transform: scale(.98); }
.go__btn[disabled] { opacity: .7; cursor: default; animation: none; }
.go__note { margin-top: 10px; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.go__note b { color: var(--ink); }
.go__dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ping 1.8s infinite; }

/* Пульсація: м'яке збільшення + хвиля світла */
.pulse { animation: pump 2s ease-in-out infinite; }
.pulse::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(var(--glow), .55);
    animation: wave 2s ease-out infinite;
    pointer-events: none;
}
@keyframes pump { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes wave { 0% { box-shadow: 0 0 0 0 rgba(var(--glow), .55); } 70%, 100% { box-shadow: 0 0 0 14px rgba(var(--glow), 0); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }

/* ===== Блоки ===== */
.block { padding: 26px 16px 8px; }
.block__title { font-size: 24px; line-height: 1.2; font-weight: 800; margin-bottom: 14px; text-align: center; }
.block__sub { font-size: 18px; font-weight: 800; margin: 20px 0 10px; }

.clip {
    position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
    border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9;
}
.clip img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.clip__play {
    position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px;
    border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 8px rgba(255,255,255,.25);
}
.clip__play::after {
    content: ""; position: absolute; left: 27px; top: 21px;
    border-left: 20px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent;
}
.clip iframe { width: 100%; height: 100%; border: 0; display: block; }

.story { background: var(--surface); border-radius: 18px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); }
.story__text { padding: 16px; display: grid; gap: 8px; font-size: 16px; }
.story img { width: 100%; }

.specs { display: grid; background: var(--surface); border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; font-size: 15px; }
.specs div:nth-child(odd) { background: var(--soft); }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 700; text-align: right; }

.kit { list-style: none; display: grid; gap: 8px; }
.kit li { padding: 10px 14px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); font-weight: 600; }

.steps { list-style: none; counter-reset: st; display: grid; gap: 10px; }
.steps li {
    counter-increment: st; position: relative;
    display: grid; gap: 2px; padding: 14px 14px 14px 62px;
    background: var(--surface); border-radius: 14px; border: 1px solid var(--line);
}
.steps li::before {
    content: counter(st); position: absolute; left: 14px; top: 50%; margin-top: -18px;
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center;
    background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 18px;
}
.steps b { font-size: 17px; }
.steps span { font-size: 15px; color: var(--muted); }

/* ===== Замовлення ===== */
.checkout { margin: 26px 12px 0; padding: 20px 14px 22px; background: var(--surface); border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.08); border: 2px solid var(--soft); }
.checkout__title { font-size: 22px; text-align: center; }

.countdown { text-align: center; margin: 4px 0 16px; }
.countdown p { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.countdown__row { display: flex; justify-content: center; gap: 8px; }
.countdown__row span { display: grid; min-width: 64px; padding: 8px 4px; border-radius: 12px; background: var(--dark); color: var(--dark-ink); font-size: 12px; }
.countdown__row b { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }

.order { display: grid; gap: 12px; scroll-margin-top: 64px; } /* щоб форму не перекривало верхнє меню */
.intro .perks, .intro .shots { text-align: left; }
.order__field { display: grid; gap: 4px; }
.order__field span { font-size: 14px; font-weight: 700; color: var(--muted); }
.order__field input {
    width: 100%; height: 54px; padding: 0 16px;
    font: inherit; font-size: 17px; /* не менше 16px, щоб iPhone не зумив */
    color: var(--ink); background: var(--bg);
    border: 2px solid var(--line); border-radius: 14px; outline: none;
    -webkit-appearance: none; appearance: none;
}
.order__field input:focus { border-color: var(--accent); background: #fff; }
.order__field input.is-bad { border-color: #dc2626; }
.order__error { color: #dc2626; font-size: 14px; font-weight: 700; margin-top: -4px; }
.order__btn { margin-top: 4px; }
.order__hint { text-align: center; font-size: 13px; color: var(--muted); }

/* ===== Футер ===== */
.foot { margin-top: 26px; padding: 22px 16px; background: var(--dark); color: var(--dark-ink); font-size: 13px; line-height: 1.6; display: grid; gap: 12px; text-align: center; }
.foot a { color: inherit; opacity: .85; }
.foot__links { display: grid; gap: 4px; }

/* ===== Нижня панель ===== */
.dock {
    position: fixed; left: 50%; bottom: 0; z-index: 30;
    width: 100%; max-width: 480px; transform: translate(-50%, 110%);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--dark); color: var(--dark-ink);
    box-shadow: 0 -6px 20px rgba(0,0,0,.2);
    transition: transform .3s ease;
}
.dock.is-shown { transform: translate(-50%, 0); }
.dock__price { display: grid; line-height: 1.1; }
.dock__price s { font-size: 13px; opacity: .65; }
.dock__price b { font-size: 26px; color: var(--accent-2); }
.dock__right { display: grid; justify-items: center; gap: 2px; }
.dock__btn {
    position: relative; display: block; padding: 11px 26px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
    font-weight: 800; text-transform: uppercase; text-decoration: none; font-size: 16px;
}
.dock__timer { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }

/* ===== Юридичні сторінки та подяка ===== */
.doc { padding: 22px 18px 30px; }
.doc h1 { font-size: 24px; line-height: 1.2; margin-bottom: 14px; }
.doc h2 { font-size: 18px; margin: 18px 0 6px; }
.doc p, .doc li { font-size: 15px; margin-bottom: 8px; }
.doc ul { padding-left: 20px; }
.doc__back { display: inline-block; margin-top: 16px; font-weight: 700; color: var(--accent); }

.thanks { padding: 40px 18px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.thanks__icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); box-shadow: 0 10px 26px rgba(var(--glow), .35); }
.thanks__icon svg { width: 42px; height: 42px; }
.thanks h1 { font-size: 26px; line-height: 1.2; }
.thanks p { font-size: 16px; }
.thanks__note { background: var(--soft); border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.thanks .go__btn { max-width: 340px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
