:root {
    /* Colors & media */
    --purina-red: #e91c24;
    --white: #fff;
    --grey: grey;
    --muted-gray: #f4f4f4;
    --header-img: url('/templates/solo/images/purina/promo/hand.jpg');
    --logo-img: url('/templates/solo/images/purina/promo/idp55faEGc_logos.svg');
    --footer-img: url('/templates/solo/images/purina/PURINA-red-line.png');
    --cta-img: url('/templates/solo/images/purina/promo/dog-with-cat.jpg');
    --gifts-img: url('/templates/solo/images/purina/promo/cat-dog-gifts.jpg');

    /* Layout scale */
    --radius: 12px;
    --shadow: 0 10px 15px rgba(0,0,0,.15);
    --space-0: 0;
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 20px;
    --space-5: 28px;
    --space-6: 36px;

    /* Typography */
    --fs-base: clamp(16px, 1.6vw, 18px);
    --fs-lg: clamp(22px, 2.2vw, 28px);
    --fs-xl: clamp(28px, 3vw, 36px);

    /* Breakpoints */
    /* sm: 576, md: 768, lg: 992, xl: 1200, xxl: 1400 */
}

/* ===== BASICS ===== */
html, body { height: 100%; }
body { background: var(--white); margin: 0; }

.text-uppercase { text-transform: uppercase; }
.fw-bold { font-weight: 600; }
.fs-22 { font-size: 22px }
.text-purina { color: var(--purina-red) !important; }
.bg-purina { background-color: var(--purina-red) !important; }

/* ===== LAYOUT UTILS ===== */
.container,
.container-fluid { width: 100%; margin: 0 auto; }
.container { max-width: 1200px; padding-inline: var(--space-3); }
.container-fluid { padding-inline: var(--space-0); }

.brand_footer {
    margin-top: 30px;
    background-color: #ff0000;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: var(--footer-img);
    height: 40px;
    margin-inline: calc(-1 * 15px);
}

.flex { display: flex; align-items: center; justify-content: center; gap: var(--space-3); }
.flex-col { display: flex; flex-direction: column; gap: var(--space-3); }
.grid { display: grid; gap: var(--space-4); }

/* ===== PAGE WRAPPER ===== */
.main-wrapper {
    display: flex; flex-direction: column;
    width: 100%; max-width: 1100px; margin-inline: auto;
}

/* ===== SECTION CARDS ===== */
.section-card,
.events-wrapper, .gifts-wrapper, .bonuses-wrapper, .events-content-wrapper {
    background: var(--muted-gray);
    border-radius: var(--radius);
    padding: var(--space-3);
    display: flex;
    gap: var(--space-4);
}

.bonuses-content-wrapper {
    padding: var(--space-0);
}

/* Автоматическая сетка карточек внутрянки на широких экранах */
.section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

/* ===== FEATURE BOXES (две “плитки” слева/справа) ===== */
.purina-box-wrapper {
    position: relative;
    margin-bottom: var(--space-3);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.purina-box {
    display: flex; flex-direction: column; justify-content: center;
    text-align: center;
    padding: var(--space-5) var(--space-3);
    min-height: 260px;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.purina-box-text {
    color: var(--white);
    font-weight: 600;
    font-size: var(--fs-xl);
    line-height: 1.25;
    margin-bottom: var(--space-3);
}

/* Модификаторы позиции учитываются только на десктопе (см. брейкпоинты) */
.purina-box.left { }
.purina-box.right { }

/* ===== HEADER ===== */
.header { background: var(--white); }
.header-photo {
    background: none;
    width: 100%;
}

.purina-logo { min-height: 40px; }
.purina-logo-background {
    background: var(--logo-img) center / contain no-repeat;
    width: 100%; height: 50px;
}

/* ===== ICON BADGE ===== */
.icon-wrap {
    width: 64px; min-width: 64px; height: 64px;
    background: var(--purina-red);
    border-radius: 12px; display: inline-flex;
    align-items: center; justify-content: center;
}
.icon-wrap svg {
    width: 32px; height: 32px;
    stroke: var(--white); stroke-width: 2.5;
}

/* ===== CTA IMAGE STRIP ===== */
.bottom-image-cta {
    background: none;
    margin-bottom: 25px;
}

.content { padding: 15px; }
.bottom-image-cta, .gifts-image { background: none }

.bonuses-content-wrapper img {
    width: 100%;
    border: 5px solid var(--muted-gray);
    background: var(--muted-gray);
    border-radius: var(--radius);
    margin-block: 25px;
}

.calculation-example {
    background-color: #fff;
    border-radius: 15px;
    padding: var(--space-2);
    margin-bottom: var(--space-2);
}

.calculation-example h3 {
    margin-top: 0 !important;
}

.comment-wrapper {
    display: flex;
    justify-content: center;
    background: var(--muted-gray);
    padding: 40px 0;
}
.comment-form-wrapper {
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comment-form-wrapper form {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comment-form-wrapper .title {
    margin: 25px 0;
    text-align: center;
}

.comment-form-wrapper button {
    padding: 0 75px !important;
    margin-top: 25px;
}

.events-content-wrapper {
    flex-direction: column;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ====== BREAKPOINTS (mobile-first) ====== */

/* ≥576px (sm) */
@media (min-width: 576px) {
    .section-grid { grid-template-columns: repeat(2, 1fr); }
    .comment-form-wrapper {
        width: 75%;
    }
}

/* ≥768px (md) */
@media (min-width: 768px) {
    .section-card { padding: calc(var(--space-5) + 4px); }
    .main-wrapper { padding-inline: var(--space-4); }
    .content { padding: 0; overflow: hidden; }
    .main-wrapper {
        padding: var(--space-6) var(--space-3) calc(var(--space-6) + var(--space-3));
    }
    .comment-form-wrapper {
        width: 75%;
    }
}

/* ≥992px (lg) */
@media (min-width: 992px) {
    .header-photo { background: #e9e9e9 var(--header-img) right center / contain no-repeat; min-height: 420px; }
    .bottom-image-cta { background: var(--cta-img) left center / contain no-repeat; min-height: 750px; }
    .gifts-image { background: var(--gifts-img) left center / contain no-repeat; min-height: 750px; }
    /* Две плитки в абсолютном позиционировании для эффектного лейаута */
    .purina-box-wrapper {
        height: 450px;
        display: block; /* отключаем grid */
        padding: 0;
    }
    .purina-box {
        position: absolute; z-index: 2;
        width: 360px; min-height: 300px;
    }
    .purina-box.left  { top: 50px; left: 14%; }
    .purina-box.right {
        top: 50px;
        right: 14%;
    }

    /* Секции в линию, если нужно (оставил гибкость) */
    .events-wrapper, .gifts-wrapper, .bonuses-wrapper {
        flex-direction: row; align-items: center; gap: var(--space-5);
    }

    .section-grid { grid-template-columns: repeat(3, 1fr); }

    .comment-form-wrapper {
        width: 75%;
    }
}

/* ≥1200px (xl) */
@media (min-width: 1200px) {
    .container { max-width: 1280px; }
    .purina-box.left  { left: 18%; }
    .purina-box.right {
        right: 18%;
    }
}

/* ≥1400px (xxl) */
@media (min-width: 1400px) {
    .container { max-width: 1380px; }
    .purina-box.left  { left: 20%; }
    .purina-box.right {
        right: 18%;
        top: 50%;
    }
    .comment-form-wrapper {
        width: 50%;
    }
}

/****** VIDEO POPUP ******/

.draw-results-video-block {
     margin: 20px 0;
 }

.open-video-popup {
    display: block;
    width: 100%;
    margin: 0 0 12px;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: #2d6cdf;
    color: #fff;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
}

.open-video-popup:hover {
    opacity: 0.92;
}

.video-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.video-popup.is-active {
    display: block;
}

.video-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.video-popup__content {
    position: relative;
    z-index: 2;
    width: calc(100% - 30px);
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
}

.video-popup__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-right: 40px;
}

.video-popup__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.video-popup__video {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-popup__video video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
}