/* --- Глобальные Настройки и Цвета (Премиум Темный Дорогой Стиль) --- */
:root {
    --bg-dark-primary: #0b0f19;    /* Очень дорогой глубокий ночной цвет */
    --bg-dark-secondary: #131a2e;  /* Контрастный блок */
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-light: #f1f5f9;
    --text-muted: #64748b;
    --color-red: #ef4444;          /* Агрессивный триггер для боли и цен */
    --color-red-hover: #dc2626;
    --color-blue: #3b82f6;         /* Медицинский акцент */
    --radius-lg: 24px;
    --radius-md: 12px;

    --container-w: 1160px;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 10px;
    --handle-size: 56px;
    --line-width: 2px;
    --accent: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Сквозные компоненты --- */
.sub-tag {
    display: table;
    margin: 0 auto 16px auto;
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-blue);
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
}

.center-title {
    text-align: center;
    margin-bottom: 60px;
}

.center-title h2 {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
}

.underlined {
    position: relative;
    display: inline-block;
}
.underlined::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-red);
}

/* --- Промо-лайн дефицита --- */
.promo-banner {
    background: var(--color-red);
    color: #fff;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
}
.banner-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Главный экран --- */
.hero-section {
    background: linear-gradient(135deg, var(--bg-dark-primary) 0%, var(--bg-dark-secondary) 100%);
    color: var(--text-light);
    padding: 80px 0 120px 0;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.medical-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-section h1 {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.highlight-red { color: var(--color-red); }

.hero-descr {
    font-size: 18px;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 40px;
}

.hero-benefits {
    margin-bottom: 45px;
}

.hb-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 16px;
    margin-bottom: 16px;
}
.hb-icon { font-size: 20px; }

.hero-price-action {
    display: flex;
    align-items: center;
    gap: 40px;
}

.price-card {
    display: flex;
    flex-direction: column;
}
.price-old { font-size: 18px; text-decoration: line-through; color: #64748b; }
.price-new { font-size: 42px; font-weight: 900; color: #fff; }

.btn-main {
    display: inline-block;
    background: var(--color-red);
    color: #fff;
    padding: 20px 40px;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
    transition: background 0.2s, transform 0.2s;
}
.btn-main:hover {
    background: var(--color-red-hover);
    transform: translateY(-2px);
}

.hero-visual { position: relative; }
.hero-img {
    width: 100%;
    height: 300px;
    filter: drop-shadow(0 25px 60px rgba(0,0,0,0.4));
        object-fit: cover;
    object-position: center;
}

.sale-tag {
    position: absolute;
    top: -65px;
    right: 0;
    background: var(--color-red);
    color: white;
    font-weight: 900;
    font-size: 24px;
    padding: 16px;
    border-radius: 50%;
    text-align: center;
    line-height: 1;
    transform: rotate(15deg);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}
.sale-tag span { font-size: 11px; font-weight: 600; letter-spacing: 1px;}

/* --- Блок жесткого давления на боли --- */
.pain-deep-section {
    padding: 120px 0;
    background: var(--bg-light);
}

.pain-detailed-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.pain-detail-card {
    display: flex;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
    border-left: 5px solid var(--color-red);
    gap: 30px;
}

.pd-number {
    font-size: 36px;
    font-weight: 900;
    color: #cbd5e1;
    line-height: 1;
}

.pd-content h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.pd-content p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 16px;
}

.pd-danger {
    background: #fff5f5;
    color: #c53030;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* --- Блок-Решение --- */
.solution-section {
    padding: 120px 0;
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.side-gif {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}
.solution-text h2 {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 20px;
}
.solution-text p {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 30px;
}
.solution-features {
    list-style: none;
}
.solution-features li {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    padding-left: 24px;
}
.solution-features li::before {
    content: '✓';
    color: var(--color-blue);
    font-weight: 900;
    position: absolute;
    left: 0;
}

/* --- Анатомия подушки --- */
.anatomy-section {
    padding: 120px 0;
    background: var(--bg-light);
}
.anatomy-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    margin-top: 50px;
}
.dimensions-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.05));
}
.anatomy-labels-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.label-card {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}
.lc-header {
    font-weight: 800;
    font-size: 17px;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dot {
    width: 8px;
    height: 8px;
    background: var(--color-blue);
    border-radius: 50%;
}
.label-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Характеристики --- */
.specs-section { padding: 100px 0; }
.specs-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-dark-primary);
    color: #fff;
    padding: 50px;
    border-radius: var(--radius-lg);
}
.specs-box h2 { font-size: 32px; font-weight: 900; margin-bottom: 40px; text-align: center;}
.table-specs .tr {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #1e293b;
}
.table-specs .tr:last-child { border-bottom: none; }
.td-name { color: #94a3b8; font-weight: 500; }
.td-val { font-weight: 700; text-align: right; width: 60%; }

/* --- Отзывы --- */
.reviews-section { padding: 120px 0; background: #fff;}
.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 40px;}
.review-premium-card {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
}
.rev-stars { color: #f59e0b; font-size: 20px; margin-bottom: 16px; }
.review-premium-card h4 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.rev-text { font-size: 15px; color: #475569; font-style: italic; line-height: 1.6; margin-bottom: 24px; }
.rev-user strong { display: block; font-size: 16px; color: var(--text-dark); }
.green-check { color: #10b981; font-weight: 700; font-size: 13px; }

/* --- Финальный экран формы --- */
.order-cta-section {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--bg-dark-primary) 0%, var(--bg-dark-secondary) 100%);
    color: #fff;
}
.cta-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}
.cta-info h2 { font-size: 46px; font-weight: 900; line-height: 1.2; margin-bottom: 20px; }
.text-red { color: var(--color-red); }
.cta-subtext { color: #94a3b8; font-size: 18px; margin-bottom: 40px; line-height: 1.6;}

.guarantee-badges { display: flex; flex-direction: column; gap: 20px; }
.gb-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    padding: 20px;
    border-radius: 8px;
    font-size: 15px;
}

/* ---------- Stakes (чому це важливо для здоров'я) ---------- */
.stakes {
  padding: 50px 0;
  background: var(--cloud-dim);
}

.stakes__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stakes__text {
    margin-bottom: 30px;
    width: 100%;
}
.slide {
    width: 100%;
}

.stakes__lead {
  font-size: 16.5px;
  color: var(--ink-soft);
  margin-top: 22px;
  /*max-width: 440px;*/
}

.stakes__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stakes__item {
  display: flex;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(35, 38, 46, 0.1);
}

.stakes__item:first-child { padding-top: 0; }
.stakes__item:last-child { border-bottom: none; }

.stakes__num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--night);
  color: var(--glow);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stakes__item h3 {
  font-size: 17px;
  margin-bottom: 8px;
  line-height: 1.35;
}

.stakes__item p {
  font-size: 14.5px;
  color: var(--ink-soft);
}
/* ===== Outer wrapper ===== */
.before-after-center{
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

  /* This is the element whose width drives the clip-path math.
     It has position:relative so the absolute children are scoped to it. */
     .before-after-image-wrapper{
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;       /* change to match your images' ratio */
        overflow: hidden;
        border-radius: 16px;
        user-select: none;
        touch-action: none;        /* prevents page scroll while dragging on touch */
        cursor: ew-resize;
    }

    /* ===== Bottom image (the "first" / before image, always fully visible) ===== */
    .before-after-image-relative{
        position: relative;
        width: 100%;
        height: 100%;
    }

    .before-after-image{
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none;
    }

    /* ===== Top image (the "second" / after image, clipped to reveal) ===== */
    .before-after-image-absolute{
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        /* clip-path is set by JS via a CSS variable */
        clip-path: inset(0 var(--reveal, 50%) 0 0);
    }

    /* ===== Draggable cursor / handle ===== */
    .before-after-cursor-wrapper{
        position: absolute;
        top: 0;
        bottom: 0;
        left: var(--handle-pos, 50%);
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 99;
        pointer-events: none; /* the wrapper div area itself shouldn't block; the handle below re-enables it */
    }

    /* the vertical divider line */
    .before-after-cursor-wrapper::before{
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: var(--line-width);
        background: var(--accent);
        transform: translateX(-50%);
        box-shadow: 0 0 6px rgba(0,0,0,.25);
    }

    .before-after-cursor{
        position: relative;
        width: var(--handle-size);
        height: var(--handle-size);
        pointer-events: auto;
        cursor: ew-resize;
        display: block;
    }

    .before-after-cursor-circle{
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: var(--accent);
        box-shadow: 0 2px 10px rgba(0,0,0,.3);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* little arrow icons inside the handle, purely decorative */
    .before-after-cursor-circle::before,
    .before-after-cursor-circle::after{
        content: "";
        width: 8px;
        height: 8px;
        border-top: 2px solid #333;
        border-right: 2px solid #333;
    }
    .before-after-cursor-circle::before{ transform: rotate(-135deg); margin-right: 6px; }
    .before-after-cursor-circle::after{ transform: rotate(45deg); margin-left: 6px; }

    /* Labels (optional, remove if not needed) */
    .ba-label{
        position: absolute;
        top: 14px;
        padding: 6px 12px;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: .03em;
        text-transform: uppercase;
        color: #fff;
        background: rgba(0,0,0,.45);
        border-radius: 999px;
        pointer-events: none;
        z-index: 2;
    }
    .ba-label.before{ left: 14px; }
    .ba-label.after{ right: 14px; }


/* Форма закупки */
.premium-form-box {
    background: #ffffff;
    color: var(--text-dark);
    padding: 50px 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}
.form-title-block { text-align: center; margin-bottom: 30px; }
.form-title-block h3 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.form-title-block p { color: var(--text-muted); font-size: 14px; }

.form-input-wrapper { margin-bottom: 24px; }
.form-input-wrapper label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.form-input-wrapper input,
.form-input-wrapper select {
    width: 100%;
    padding: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-input-wrapper input:focus { border-color: var(--color-blue); }

.btn-submit {
    width: 100%;
    background: var(--color-red);
    color: #fff;
    padding: 22px;
    font-size: 18px;
    font-weight: 900;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}
.btn-submit:hover { background: var(--color-red-hover); }
.form-secure { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 15px; }

.field.has-error input {
  border-color: #D9534F;
}

.field__error {
  display: none;
  margin-top: 7px;
  font-size: 12.5px;
  color: #D9534F;
  font-weight: 600;
}

.field.has-error .field__error { display: block; }

/* --- Футер --- */
.luxury-footer { background: #05070f; padding: 60px 0 30px 0; color: #475569; border-top: 1px solid #1e293b; }
.footer-flex { display: flex; justify-content: space-between; margin-bottom: 40px; }
.footer-brand h3, .footer-contacts p { color: #fff; margin-bottom: 12px; }
.footer-copyright { text-align: center; font-size: 13px; padding-top: 20px; border-top: 1px solid #111726; }

/* Адаптивность под смартфоны (Трафик TikTok/Meta) */
@media (max-width: 992px) {
    .hero-grid, .grid-2, .anatomy-container, .cta-grid, .reviews-grid, .footer-flex {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-section h1 { font-size: 36px; }
    .center-title h2 { font-size: 28px; }
    .hero-price-action { flex-direction: column; gap: 20px; }
    .hero-visual { order: -1; }
    .td-val { width: 100%; text-align: center; margin-top: 4px; }
    .table-specs .tr { flex-direction: column; text-align: center; }
    .pain-detail-card { flex-direction: column; text-align: center; padding: 30px 20px; }
    .footer-flex { gap: 30px; }
}

/* Пульсация кнопки для удержания внимания */
@keyframes pulsing {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); box-shadow: 0 12px 35px rgba(239, 68, 68, 0.6); }
    100% { transform: scale(1); }
}
.pulse { animation: pulsing 2s infinite ease-in-out; }