/* Modern responsive hero campaign slider (Web storefront).
   Ratios: Desktop >1024px -> 16:5 (max 380px), Tablet 601-1024px -> 12:5, Mobile <=600px -> 2:1. */

.hero-section {
    padding: 16px 0 8px;
    margin-top: 0;
}

.hero-section .campaign-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
}

.hero-section .campaign-slider {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 5;
    max-height: 380px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    background: var(--surface-card);
    overflow: hidden;
}

.hero-section .campaign-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    --mark-size: clamp(52px, 6vw, 72px);
    grid-template-rows: var(--mark-size) auto;
    row-gap: 12px;
    height: 100%;
    border-radius: inherit;
    color: var(--text-secondary);
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 600;
    background: radial-gradient(ellipse at 50% 45%, var(--surface-card) 18%, transparent 85%),
        linear-gradient(120deg, var(--surface-soft), var(--surface-page) 62%, var(--surface-soft));
    animation: none;
}

.campaign-placeholder::before, .campaign-placeholder::after {
    content: "";
    grid-area: 1 / 1;
    box-sizing: border-box;
    border-radius: 50%;
    align-self: center;
    aspect-ratio: 1;
}
.campaign-placeholder::before {
    width: calc(var(--mark-size) - 10px);
    background: #f7f6f3 url('/icons/product-placeholder-pencil.webp') center / 86% auto no-repeat;
    filter: var(--catalog-placeholder-filter, none);
    box-shadow: var(--shadow-soft);
}
.campaign-placeholder::after {
    width: var(--mark-size);
    border: 2px solid var(--border-subtle);
    border-top-color: var(--brand-primary);
    border-right-color: var(--brand-primary);
}
.campaign-placeholder > span { grid-area: 2 / 1; }
@media (prefers-reduced-motion: no-preference) {
    .campaign-placeholder::after { animation: campaign-orbit 1.6s linear infinite; }
    @keyframes campaign-orbit { to { transform: rotate(1turn); } }
}

.campaign-poster, .campaign-background > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.campaign-poster { opacity: 0; }
.campaign-poster.is-ready { opacity: 1; }

.campaign-background:has(> .is-ready) .campaign-media-placeholder,
.campaign-media-unavailable,
.campaign-background:not(:has(> img:not(.is-failed), > video:not(.is-failed))) .campaign-media-pending,
.campaign-background:not(:has(> img:not(.is-failed), > video:not(.is-failed))) .campaign-media-placeholder::after {
    display: none;
}

.campaign-background:not(:has(> img:not(.is-failed), > video:not(.is-failed))) .campaign-media-unavailable {
    display: inline;
}

.hero-section .campaign-slide--no-copy:has(.campaign-media-placeholder):not(:has(.is-ready)) .campaign-overlay {
    opacity: 0;
}

.hero-section .campaign-slide {
    border-radius: inherit;
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-section .campaign-slide.active.campaign-slide--image .campaign-background {
        transform: scale(1.025);
        transition: transform 8s ease-out;
    }
}

/* Layered cinematic overlay for contrast without muddying the visual */
.hero-section .campaign-slide:not(.campaign-slide--no-copy) .campaign-overlay {
    background:
        linear-gradient(
            to top,
            rgba(9, 12, 18, 0.80) 0%,
            rgba(9, 12, 18, 0.48) 34%,
            transparent 76%
        ),
        linear-gradient(
            90deg,
            rgba(9, 12, 18, 0.52) 0%,
            rgba(9, 12, 18, 0.16) 46%,
            transparent 78%
        );
}

.hero-section .campaign-slide--no-copy .campaign-overlay,
.hero-section .campaign-slide--media-only .campaign-overlay {
    background: linear-gradient(to top, rgba(9, 12, 18, 0.28) 0%, transparent 28%);
}

/* Editorial copy block & optional subtitle pill */
.hero-section .campaign-content {
    top: auto;
    bottom: 52px;
    left: 36px;
    right: 200px;
    max-width: 600px;
    transform: none;
}

.hero-section .campaign-subtitle-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-section .campaign-title {
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: #FFFFFF;
    margin: 0 0 8px;
    text-shadow: 0 2px 14px rgba(9, 12, 18, 0.36);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-section .campaign-description {
    font-size: 15px;
    line-height: 1.42;
    color: rgba(255, 255, 255, 0.90);
    margin: 0;
    max-width: 520px;
    text-shadow: 0 1px 8px rgba(9, 12, 18, 0.30);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modern Pill CTA Button */
.hero-section .campaign-button {
    right: 28px;
    bottom: 26px;
    left: auto;
    min-height: 42px;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #182234;
    border: 1px solid rgba(255, 255, 255, 0.78);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(9, 12, 18, 0.24);
}

.hero-section .campaign-liquid-blob {
    background: var(--brand-primary-solid, #3E64A8);
}

/* Desktop Frosted-Glass Navigation Arrows */
@media (min-width: 1025px) {
    .hero-section .campaign-nav-btn:not([style*="display: none"]) {
        display: inline-flex !important;
    }

    .hero-section .campaign-nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(17, 23, 34, 0.46);
        border: 1px solid rgba(255, 255, 255, 0.26);
        color: #FFFFFF;
        font-size: 15px;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 8px 20px rgba(9, 12, 18, 0.24);
        opacity: 0;
        transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
        z-index: 6;
    }

    .hero-section .campaign-slider-wrapper:hover .campaign-nav-btn,
    .hero-section .campaign-slider-wrapper:focus-within .campaign-nav-btn {
        opacity: 1;
    }

    .hero-section .campaign-nav-btn.prev {
        left: 16px;
    }

    .hero-section .campaign-nav-btn.next {
        right: 16px;
    }

    .hero-section .campaign-nav-btn:hover {
        background: var(--brand-primary-solid, #3E64A8);
        border-color: var(--brand-primary-solid, #3E64A8);
        color: #FFFFFF;
        transform: translateY(-50%) scale(1.06);
    }

    .hero-section .campaign-nav-btn:active {
        transform: translateY(-50%) scale(0.96);
    }
}

@media (max-width: 1024px) {
    .hero-section .campaign-nav-btn {
        display: none !important;
    }
}

/* Frosted-Glass Pagination Capsule */
.hero-section .campaign-dots {
    bottom: 14px;
    min-height: 24px;
    padding: 0 7px;
    gap: 2px;
    border-radius: 999px;
    background: rgba(12, 16, 26, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 14px rgba(9, 12, 18, 0.20);
}

.hero-section .campaign-dots:empty,
.hero-section .campaign-dots:not(:has(> .campaign-dot)) {
    display: none;
}

.hero-section button.campaign-dot.active::after {
    width: 20px;
    background: #FFFFFF;
}

/* Let the browser track the finger on the existing snap track. */
@media (max-width: 1024px) {
    .hero-section .campaign-slider {
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }
}

/* Quick revision checks and cached poster decodes finish before a loader is needed. */
html[data-campaign-cache] .hero-section .campaign-placeholder {
    animation: campaign-show-wait 0s 500ms backwards;
}
@keyframes campaign-show-wait { from { visibility: hidden; } to { visibility: visible; } }

/* Tablet Layout (601px - 1024px): 12:5 aspect ratio */
@media (min-width: 601px) and (max-width: 1024px) {
    .hero-section .campaign-slider {
        aspect-ratio: 12 / 5;
        min-height: 230px;
        max-height: 330px;
        border-radius: 18px;
    }

    .hero-section .campaign-content {
        left: 24px;
        right: 168px;
        bottom: 50px;
        max-width: none;
    }

    .hero-section .campaign-title {
        font-size: 22px;
    }

    .hero-section .campaign-description {
        font-size: 13.5px;
    }

    .hero-section .campaign-button {
        right: 20px;
        bottom: 20px;
        min-height: 38px;
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Compact Mobile Layout (<= 600px): 2:1 aspect ratio (~180px height on 390px screens) */
@media (max-width: 600px) {
    .hero-section {
        padding: 10px 0 6px !important;
        margin-top: 0 !important;
    }

    .hero-section .campaign-slider {
        aspect-ratio: 2 / 1;
        min-height: 168px;
        max-height: 215px;
        border-radius: 16px;
    }

    .hero-section .campaign-slide:not(.campaign-slide--no-copy) .campaign-overlay {
        background: linear-gradient(
            to top,
            rgba(9, 12, 18, 0.84) 0%,
            rgba(9, 12, 18, 0.44) 48%,
            transparent 82%
        );
    }

    .hero-section .campaign-content {
        left: 14px;
        right: 106px;
        bottom: 14px;
        top: auto;
        transform: none;
        max-width: none;
    }

    .hero-section .campaign-slide[data-button-action="none"] .campaign-content {
        right: 14px;
        bottom: 14px;
    }

    .hero-section .campaign-subtitle-pill {
        font-size: 9.5px;
        padding: 2px 8px;
        margin-bottom: 4px;
    }

    .hero-section .campaign-title {
        font-size: 15.5px;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -0.015em;
        margin-bottom: 3px;
    }

    .hero-section .campaign-description {
        font-size: 11.5px;
        line-height: 1.32;
        color: rgba(255, 255, 255, 0.90);
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-width: 100%;
    }

    .hero-section .campaign-button {
        right: 12px;
        left: auto;
        bottom: 13px;
        min-height: 30px;
        padding: 5px 12px;
        gap: 6px;
        font-size: 11.5px;
        font-weight: 700;
        border-radius: 999px;
        box-shadow: 0 5px 14px rgba(9, 12, 18, 0.24);
    }

    .hero-section .campaign-dots {
        position: static;
        transform: none;
        left: auto;
        right: auto;
        bottom: auto;
        margin: 8px auto 0;
        width: fit-content;
        min-height: 20px;
        padding: 0;
        gap: 2px;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .hero-section button.campaign-dot::after {
        background: var(--border-strong);
    }

    .hero-section button.campaign-dot.active::after {
        width: 20px;
        background: var(--brand-primary-solid, #3E64A8);
    }
}
