/* PageSpeed: CLS, LCP order, cookie banner, below-fold paint */

/* Адаптивность: картинки не вылазят за контейнер и держат пропорции на любом
   устройстве. Специфичные правила ниже (по классам/id) переопределяют это. */
img {
    max-width: 100%;
    height: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 10000;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #111;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

:root {
    --phone-select-gap: 56px;
}

.hero-product-wrap,
.section__inner-container:has(.product-image-1),
.section__column-container:has(.section__image.large) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-product-wrap img,
.product-image-1,
#start .section__image.large,
.sections__container.start .section__image.large {
    aspect-ratio: 520 / 480;
    width: auto;
    height: auto;
    max-width: min(100%, 520px);
}

#stats,
.stats-bar {
    min-height: 76px;
}

.section__form-input.phone {
    padding-left: var(--phone-select-gap) !important;
}

#cookie-popup {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 9999;
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    background: #fef5e2;
    color: #28261b;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#cookie-popup.cookie-popup--show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#cookie-popup p {
    margin-block: auto;
    font-size: 14px;
}

#cookie-popup .actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-left: auto;
    flex-wrap: wrap;
}

.cookie-btn {
    border: 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: #171e8d;
    font-size: 14px;
    color: #fef5e2;
    cursor: pointer;
    min-width: 120px;
}

.cookie-link {
    text-decoration: underline;
    color: #28261b;
    font-size: 14px;
}

 

@media (max-width: 768px) {
    /* Remove bundle.css padding that squeezes hero product image to ~245px */
    .product-image-1 {
        padding: 0;
    }

    /* Fix composition image distorted to 800px tall by bundle.css */
    #composition .section__image {
        height: auto;
    }
}

@media (max-width: 767px) {
    .hero,
    .sections-wrapper.gradient-start,
    .sections__container.start {
        min-height: auto;
    }

    #stats,
    .stats-bar {
        min-height: 228px;
    }

    .product-image-1,
    .section__inner-container:has(.product-image-1) .product-image-1 {
        order: -1;
    }

    .section__column-container:has(.section__image.large) .section__image.large {
        order: -1;
    }

    .header,
    .topbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .section__swiper {
        min-height: 280px;
    }
}

@media (max-width: 1024px) {
    /* Center column content on tablet (reviews page, product/causes page) */
    #reviews-page .section__inner-container.column,
    #where-page .section__inner-container.column {
        align-items: center;
    }

    /* Composition image: limit to 300px height with proportional sizing.
       Higher specificity (1,2,0) than inline-head .section__image.big-width (0,2,0) */
    #composition .section__image.big-width {
        max-height: 300px;
        height: auto;
        width: auto;
        max-width: 100%;
        margin-inline: auto;
    }
}

@media (max-width: 1280px) {
    /* Fix HD layout: bundle limits #prec cards to 390px inside ~600px columns.
       Override to fill column width so no whitespace appears to the right. */
    #prec .card-col > .section__card,
    #effects .card-col > .section__card {
        max-width: 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #cookie-popup {
        transition: none;
    }
}
