﻿/* Home page background */
body.home-page {
    --page-main-bg-size: 100% auto;
    --page-main-bg-position: center -20%;
    --page-main-bg-mobile-size: contain;
    --page-main-bg-mobile-position: top center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* ========== HERO ========== */
.hero-section {
    position: relative;
    margin-top: calc(var(--navbar-h, 50px) - 20px);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    background: #0a0a0a;
}

.hero-section > .carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: min(800px, calc(100vw * 9 / 16));
    max-height: 800px;
    aspect-ratio: auto;
    margin: 0 auto;
    background: #0a0a0a;
}

.hero-section .carousel-inner {
    position: absolute;
    inset: 0;
    height: 100% !important;
}

.hero-section .carousel-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    overflow: hidden;
    background: transparent;
}

.hero-content {
    width: 100%;
}

.hero-actions {
    align-items: center;
}

.hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 48px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    padding: .5rem 1.6rem;
    border: 2px solid transparent;
    letter-spacing: .03em;
    position: relative;
    overflow: hidden;
    transition: background .25s ease, border-color .25s ease, color .25s ease,
        transform .25s ease, box-shadow .25s ease;
}

/* ripple layer */
.hero-actions .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background .25s ease;
    border-radius: inherit;
}

.hero-actions .btn:hover {
    transform: translateY(-2px) scale(1.03);
}

.hero-actions .btn:hover::after {
    background: rgba(255, 255, 255, .08);
}

.hero-actions .btn:active {
    transform: translateY(0) scale(.97);
    transition-duration: .1s;
}

.hero-actions .btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 161, 75, .4);
}

/* ── Play button ── */
.btn-infuse-primary {
    background: var(--infuse-orange);
    border-color: var(--infuse-orange);
    color: #111;
    box-shadow: 0 4px 18px rgba(255, 141, 28, .35);
}

.btn-infuse-primary:hover {
    background: #ffaa45;
    border-color: #ffaa45;
    color: #111;
    box-shadow: 0 6px 24px rgba(255, 141, 28, .55);
}

.btn-infuse-primary .bi-play-fill {
    font-size: 1.1em;
    transition: transform .25s ease;
}

.btn-infuse-primary:hover .bi-play-fill {
    transform: scale(1.25);
}

/* ── Detail button — matches but_detail.png pill outline style ── */
.btn-infuse-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .55);
    color: #fff;
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 0 0 var(--infuse-orange);
    transition: background .25s ease, border-color .25s ease, color .25s ease,
        transform .25s ease, box-shadow .25s ease;
}

.btn-infuse-outline:hover {
    background: transparent;
    border-color: var(--infuse-orange);
    color: var(--infuse-orange);
    box-shadow: 0 0 0 1px var(--infuse-orange),
        0 4px 18px rgba(255, 141, 28, .3);
    transform: translateY(-2px) scale(1.03);
}

.btn-infuse-outline:active {
    transform: translateY(0) scale(.97);
}

.carousel-indicators {
    bottom: 16px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: var(--border-radius);
    border: 0;
    margin: 0 6px;
}

/* ========== CONTENT SECTIONS (catalog) ========== */
/* Catalog base styles are in common.css */

/* ========== HOME RESPONSIVE ========== */

/* Desktop only: Detail left + thumbs right (same bottom row) */
@media (min-width: 992px) {
    .hero-section .hero-actions {
        position: absolute;
        left: 3rem;
        bottom: 18px;
        z-index: 7;
    }

    .hero-section .movie-detail-thumbs {
        bottom: 18px;
        right: 3rem;
        left: auto;
        transform: none;
        max-width: none;
    }

    .hero-section .hero-mute-btn,
    .hero-mute-btn {
        bottom: 5.5rem;
        right: 3rem;
    }
}

/* Phone + tablet (< desktop): full-width hero, desktop-like control layout */
@media (max-width: 991.98px) {
    .hero-section {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
    }

    .hero-section > .carousel {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
    }

    .home-page .hero-overlay {
        padding: 0;
        background:
            linear-gradient(180deg, rgba(0, 0, 0, .08) 0%, rgba(0, 0, 0, .12) 50%, rgba(0, 0, 0, .5) 100%);
    }

    .home-page .hero-overlay > .container-fluid {
        padding: 0 !important;
        margin: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        position: relative;
    }

    /* Detail — left, same bottom line as thumbs (desktop-style) */
    .home-page .hero-section .hero-actions {
        position: absolute !important;
        left: 0.75rem !important;
        bottom: 0.55rem !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        z-index: 8;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: auto;
    }

    .home-page .hero-section .hero-actions .btn,
    .home-page .hero-actions .btn {
        min-width: 4.5rem;
        min-height: 2rem;
        height: 2rem;
        padding: 0 0.9rem;
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1;
        border-width: 2px;
        border-radius: 999px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    }

    /* Mute — right side, ABOVE the thumbnail strip */
    .home-page .hero-section .hero-mute-btn,
    .home-page #heroMuteBtn {
        position: absolute !important;
        bottom: 3.7rem !important;
        right: 0.75rem !important;
        top: auto !important;
        left: auto !important;
        z-index: 20;
        width: 2rem !important;
        height: 2rem !important;
        font-size: 0.85rem !important;
        border-width: 2px;
    }

    /* Thumbs — RIGHT side like desktop (~5px larger for readability) */
    .home-page .hero-section .movie-detail-thumbs {
        bottom: 0.45rem !important;
        right: 0.55rem !important;
        left: auto !important;
        transform: none !important;
        /* Side padding leaves room for prev/next OUTSIDE the strip */
        padding: 4px 26px !important;
        border-radius: 8px;
        max-width: none;
        width: auto;
        box-sizing: border-box;
        white-space: nowrap;
        z-index: 6;
        display: flex;
        align-items: center;
    }

    .home-page .hero-section .movie-detail-thumbs__strip {
        width: auto !important;
        max-width: 265px !important;
        gap: 5px !important;
        overflow: hidden;
        align-items: center;
    }

    .home-page .hero-section .movie-detail-thumbs__item {
        width: 53px !important;
        height: 35px !important;
        flex-shrink: 0;
        border-radius: 4px !important;
        border-width: 1.5px !important;
    }

    /* Arrows sit in the side padding — vertically centered on thumbs */
    .home-page .hero-section .hero-thumb-nav {
        top: 50%;
        bottom: auto;
        height: auto;
        width: 23px;
        font-size: 0.95rem;
        line-height: 1;
        z-index: 3;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-50%);
        padding: 0;
    }

    .home-page .hero-section .hero-thumb-nav i {
        display: block;
        line-height: 1;
    }

    .home-page .hero-section .hero-thumb-nav--prev {
        left: 2px;
    }

    .home-page .hero-section .hero-thumb-nav--next {
        right: 2px;
    }

    .catalog-track {
        gap: 1rem;
        padding-bottom: .65rem;
    }

    .catalog-tail-loader__grid {
        gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .home-page .hero-section .hero-actions {
        left: 0.55rem !important;
        bottom: 0.4rem !important;
    }

    .home-page .hero-section .hero-actions .btn,
    .home-page .hero-actions .btn {
        min-width: 4rem;
        min-height: 1.75rem;
        height: 1.75rem;
        padding: 0 0.75rem;
        font-size: 0.68rem;
    }

    .home-page .hero-section .hero-mute-btn,
    .home-page #heroMuteBtn {
        bottom: 3.2rem !important;
        right: 0.55rem !important;
        width: 1.75rem !important;
        height: 1.75rem !important;
        font-size: 0.75rem !important;
    }

    .home-page .hero-section .movie-detail-thumbs {
        bottom: 0.35rem !important;
        right: 0.4rem !important;
        padding: 3px 24px !important;
    }

    .home-page .hero-section .movie-detail-thumbs__strip {
        max-width: 225px !important;
        gap: 4px !important;
    }

    .home-page .hero-section .movie-detail-thumbs__item {
        width: 47px !important;
        height: 31px !important;
        border-radius: 4px !important;
    }

    .home-page .hero-section .hero-thumb-nav {
        width: 21px;
        font-size: 0.88rem;
    }

    .catalog-loading-text {
        font-size: .88rem;
    }

    .catalog-track {
        gap: .75rem;
        padding-bottom: .5rem;
    }

    .section-head {
        margin-bottom: .85rem;
    }

    .catalog-section .section-head {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
    }

    .catalog-section .section-title {
        flex: 1 1 auto;
        min-width: 0;
    }

    .catalog-section .section-head>div {
        width: auto;
        margin-left: auto;
        flex: 0 0 auto;
    }

    .catalog-section .view-more-link {
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
    }

    .catalog-section {
        margin-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .home-page .hero-section .hero-actions {
        left: 0.4rem !important;
        bottom: 0.3rem !important;
    }

    .home-page .hero-section .hero-actions .btn,
    .home-page .hero-actions .btn {
        min-width: 3.6rem;
        min-height: 1.55rem;
        height: 1.55rem;
        padding: 0 0.65rem;
        font-size: 0.62rem;
    }

    .home-page .hero-section .hero-mute-btn,
    .home-page #heroMuteBtn {
        bottom: 2.85rem !important;
        right: 0.4rem !important;
        width: 1.55rem !important;
        height: 1.55rem !important;
        font-size: 0.68rem !important;
    }

    .home-page .hero-section .movie-detail-thumbs {
        right: 0.3rem !important;
        padding: 3px 22px !important;
    }

    .home-page .hero-section .movie-detail-thumbs__strip {
        max-width: 195px !important;
    }

    .home-page .hero-section .movie-detail-thumbs__item {
        width: 41px !important;
        height: 27px !important;
    }

    .home-page .hero-section .hero-thumb-nav {
        width: 19px;
        font-size: 0.8rem;
    }
}

/* ========== VIEW MORE MODAL ========== */
/* Moved to common.css */

/* ========== MOVIE DETAIL PAGE ========== */

.movie-detail-page {
    background: #171717;
}

.movie-detail-screen {
    background:
        linear-gradient(90deg, rgba(95, 36, 8, 0.55) 0%, rgba(23, 23, 23, 0) 8%, rgba(23, 23, 23, 0) 92%, rgba(95, 36, 8, 0.55) 100%),
        #171717;
    color: #f4efe9;
    min-height: 100vh;
}

/* Full page only — offset the fixed navbar. Not applied in the modal partial. */
.movie-detail-page .movie-detail-screen {
    margin-top: 0px;
}

/* ===== HERO / CAROUSEL ===== */
.movie-detail-screen__hero {
    position: relative;
    z-index: 1;
}

.movie-detail-carousel {
    position: relative;
    height: 560px;
    overflow: hidden;
}

.movie-detail-carousel .carousel-inner,
.movie-detail-carousel .carousel-item {
    height: 100%;
}

.movie-detail-carousel__image {
    position: absolute;
    inset: 0;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
}

.movie-detail-carousel__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.22) 18%, rgba(0, 0, 0, 0.34) 50%, rgba(23, 23, 23, 0.75) 86%, rgba(23, 23, 23, 0.96) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.04) 28%, rgba(0, 0, 0, 0.04) 72%, rgba(0, 0, 0, 0.35) 100%);
}

/* ===== TOP FLOAT BAR ===== */
.movie-detail-screen__topbar {
    position: absolute;
    top: calc(var(--navbar-h, 80px) + 16px);
    left: 42px;
    right: 42px;
    z-index: 5;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    padding: 0 18px;
}

.movie-detail-screen__hero-title {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    pointer-events: none;
}

.movie-detail-screen__icon {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    text-decoration: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-detail-screen__icon:hover {
    opacity: 1;
    transform: scale(1.04);
    color: #fff;
}

/* ===== CAROUSEL NAV ===== */
.movie-detail-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 62px;
    height: 92px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 3.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
    opacity: 0.95;
}

.movie-detail-carousel__nav:hover {
    opacity: 1;
}

.movie-detail-carousel__nav:active {
    transform: translateY(-50%) scale(0.96);
}

.movie-detail-carousel__nav--prev {
    left: 14px;
}

.movie-detail-carousel__nav--next {
    right: 14px;
}

/* ===== BODY ===== */
.movie-detail-screen__body {
    position: relative;
    z-index: 2;
    background: #1a1a1a;
    padding-bottom: 52px;
}

/* ===== MAIN LAYOUT ===== */
.movie-detail-main {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

/* ── Play Trailer shared button styles ── */
.movie-detail-hero-play,
.movie-detail-hero-play-mobile {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .55);
    color: #fff;
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 0 0 var(--infuse-orange);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .25s ease, border-color .25s ease, color .25s ease,
        transform .25s ease, box-shadow .25s ease;
}

.movie-detail-hero-play:hover,
.movie-detail-hero-play:focus-visible,
.movie-detail-hero-play-mobile:hover,
.movie-detail-hero-play-mobile:focus-visible {
    background: transparent;
    border-color: var(--infuse-orange);
    color: var(--infuse-orange);
    box-shadow: 0 0 0 1px var(--infuse-orange),
        0 4px 18px rgba(255, 141, 28, .3);
    transform: translateY(-2px) scale(1.03);
}

.movie-detail-hero-play:focus-visible,
.movie-detail-hero-play-mobile:focus-visible {
    outline: none;
}

.movie-detail-hero-play:active,
.movie-detail-hero-play-mobile:active {
    transform: translateY(0) scale(.97);
}

/* ── Play Trailer: tablet + desktop (≥768px) ── */
/* Hidden on mobile, shown on tablet/desktop */
.movie-detail-hero-play-wrap--desktop {
    display: none;
    /* hidden by default (mobile-first) */
    position: absolute;
    bottom: 20px; /* match .movie-detail-thumbs bottom */
    left: 0;
    right: 0;
    z-index: 20;
    align-items: flex-end;
    padding-left: calc(260px + 34px + 3rem);
    /* poster + gap + px-lg-5 */
    pointer-events: none;
}

.movie-detail-hero-play {
    pointer-events: all;
    font-size: 0.85rem;
    padding: 10px 22px;
}

/* ── Play Trailer: mobile only (<768px) ── */
/* Wrapper: sits beside poster, under the small hero thumbs */
.movie-detail-mobile-play-wrap {
    display: flex;
    /* visible by default (mobile-first) */
    margin-top: 12px;
}

.movie-detail-hero-play-mobile {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    padding: 9px 18px;
}

/* At 768px+: flip visibility */
@media (min-width: 768px) {
    .movie-detail-hero-play-wrap--desktop {
        display: flex;
        /* show desktop button */
    }

    .movie-detail-mobile-play-wrap {
        display: none;
        /* hide mobile button */
    }
}

.movie-detail-main__poster-col {
    width: 100%;
    min-width: 0;
}

/* poster-row: transparent wrapper on desktop; on mobile becomes poster | play */
.movie-detail-main__poster-row {
    display: contents;
    /* no effect on desktop layout */
}

.movie-detail-main__media-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.movie-detail-main__poster-wrap {
    width: 100%;
    max-width: 260px;
    margin-top: -190px;
    position: relative;
    z-index: 10;
    animation: posterLiftIn 0.8s ease;
    flex-shrink: 0;
}

.movie-detail-main__poster {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
    background: #222;
    border-radius: var(--border-radius);
}

.movie-detail-main__content {
    padding-top: 26px;
    animation: contentFadeUp 0.8s ease;
}

.movie-detail-main__title {
    margin: 0 0 8px;
    color: #e7cdb5;
    font-size: 3.2rem;
    line-height: 1.08;
    font-weight: 300;
    letter-spacing: -0.03em;
}

.movie-detail-main__meta {
    margin-bottom: 18px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
}

.movie-detail-main__genres {
    margin: 0 0 12px;
    color: #e7cdb5;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
}

.movie-detail-main__genres .genre-link-btn {
    color: #e7cdb5;
    font-weight: 700;
    text-decoration-color: rgba(231, 205, 181, 0.45);
}

.movie-detail-main__genres .genre-link-btn:hover,
.movie-detail-main__genres .genre-link-btn:focus-visible {
    color: #e7cdb5;
    text-decoration-color: rgba(231, 205, 181, 0.9);
}

.movie-detail-main__synopsis {
    max-width: 880px;
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.90);
    font-size: 0.98rem;
    line-height: 1.55;
}

.movie-detail-main__facts {
    margin: 0;
    display: grid;
    gap: 10px;
}

.movie-detail-main__fact {
    display: grid;
    grid-template-columns: 215px 1fr;
    gap: 8px;
    align-items: start;
}

.movie-detail-main__fact-reviews {
    grid-template-columns: 215px 1fr;
    gap: 8px;
    align-items: start;
}

.movie-detail-main__fact dt {
    margin: 0;
    color: #d9b38a;
    font-size: 0.95rem;
    font-weight: 700;
}

.movie-detail-main__fact-reviews dt {
    margin: 0px auto 10px auto;
    color: #d9b38a;
    font-size: 0.95rem;
    font-weight: 700;
}

.movie-detail-main__fact dd {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

.movie-detail-main__fact-reviews dd {
    margin: 0 auto 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

.movie-detail-main__highlights {
    margin: 0;
    padding-left: 1.4rem;
}

.movie-detail-main__highlights li+li {
    margin-top: 0.75rem;
}

.movie-detail-main__fact--full dd {
    max-width: 850px;
}

/* Genre link buttons inside fact row */
.genre-link-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    transition: color 0.2s, text-decoration-color 0.2s;
}

.genre-link-btn:hover,
.genre-link-btn:focus-visible {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.8);
    outline: none;
}

/* ===== WHERE TO WATCH ===== */
.where-watch {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 100%);
    box-sizing: border-box;
    overflow: hidden;
}

.where-watch__title {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.where-watch__list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 8px;
    padding-right: 2px;
}

.where-watch__list::-webkit-scrollbar {
    display: none;
}

.where-watch__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.where-watch__item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
    color: inherit;
    text-decoration: none;
}

.where-watch__logo {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.where-watch__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.where-watch__name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.where-watch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 34px;
    padding: 0 14px;
    margin-left: auto;
    border: 1px solid #ffffff;
    border-radius: 999px;
    background: #ffffff;
    color: #111111;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.where-watch__item:hover .where-watch__btn {
    background: #f3f3f3;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* ===== RELATED ===== */
.movie-related {
    margin-top: 52px;
}

.movie-related__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.movie-related__card {
    display: block;
    text-decoration: none;
    color: #fff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-related__card:hover {
    transform: translateY(-3px);
    color: #fff;
}

.movie-related__thumb {
    width: 100%;
    overflow: hidden;
    background: #222;
    margin-bottom: 8px;
}

.movie-related__thumb img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.movie-related__category {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.72rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.movie-related__title {
    color: #f4efe9;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
}

/* ===== ANIMATIONS ===== */
@keyframes posterLiftIn {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes contentFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TABLET ===== */
@media (max-width: 1199.98px) {
    .movie-detail-carousel {
        height: 510px;
    }

    .movie-detail-main {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 28px;
    }

    .movie-detail-main__poster-wrap {
        max-width: 220px;
        margin-top: -160px;
    }

    .movie-detail-main__title {
        font-size: 2.6rem;
    }

    .movie-detail-main__fact {
        grid-template-columns: 180px 1fr;
    }

    .where-watch__list {
        max-height: 310px;
    }

    .movie-detail-hero-play-wrap--desktop {
        padding-left: calc(220px + 28px + 3rem);
        /* 220px poster + 28px gap + px-lg-5 */
    }
}

/* ===== SMALL TABLET ===== */
@media (max-width: 991.98px) {
    .movie-detail-screen__topbar {
        left: 20px;
        right: 20px;
    }

    .movie-detail-carousel {
        height: 460px;
    }

    .movie-detail-main {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 22px;
    }

    .movie-detail-main__poster-wrap {
        max-width: 190px;
        margin-top: -140px;
    }

    .movie-detail-main__title {
        font-size: 2.2rem;
    }

    .movie-detail-main__fact {
        grid-template-columns: 150px 1fr;
    }

    .movie-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .where-watch__list {
        max-height: 285px;
    }

    .movie-detail-hero-play-wrap--desktop {
        padding-left: calc(190px + 22px + 1.5rem);
        /* 190px poster + 22px gap + px-4 */
    }
}

/* ===== MOBILE ===== */
@media (max-width: 767.98px) {
    .movie-detail-screen {
        --movie-detail-mobile-poster-width: 170px;
        --movie-detail-mobile-gap: 14px;
        --movie-detail-mobile-side-pad: 24px;
    }

    .movie-detail-carousel {
        height: 330px;
    }

    .movie-detail-screen__topbar {
        top: calc(var(--navbar-h, 80px) + 12px);
        left: 12px;
        right: 12px;
        height: 46px;
        padding: 0 10px;
    }

    .movie-detail-screen__hero-title {
        font-size: 0.74rem;
        letter-spacing: 0.06em;
    }

    .movie-detail-carousel__nav {
        width: 44px;
        height: 64px;
        font-size: 2.2rem;
    }

    .movie-detail-thumbs {
        left: calc(var(--movie-detail-mobile-side-pad) + var(--movie-detail-mobile-poster-width) + var(--movie-detail-mobile-gap));
        right: 12px;
        bottom: 14px;
        overflow: hidden;
    }

    .movie-detail-thumbs__strip {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        padding-left: 0;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 0;
    }

    .movie-detail-thumbs__strip::-webkit-scrollbar {
        display: none;
    }

    .movie-detail-thumbs__item {
        width: 46px;
        height: 32px;
        border-radius: 7px;
        scroll-snap-align: center;
    }

    .movie-detail-main {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .movie-detail-main__poster-col {
        width: 100%;
        max-width: none;
    }

    .movie-detail-main__poster-wrap {
        width: var(--movie-detail-mobile-poster-width);
        max-width: var(--movie-detail-mobile-poster-width);
        margin-top: -110px;
        flex-shrink: 0;
    }

    /* Poster left; Play Trailer in the column under the small thumbs */
    .movie-detail-main__poster-row {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: var(--movie-detail-mobile-gap);
        width: 100%;
        max-width: 100%;
    }

    .movie-detail-mobile-play-wrap {
        flex: 1;
        min-width: 0;
        width: auto;
        margin-top: 2px;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        position: relative;
    }

    /* Default: one-line “Play Trailer” beside poster when space allows */
    .movie-detail-hero-play-mobile {
        width: auto;
        max-width: 100%;
        min-height: 42px;
        height: auto;
        padding: 9px 14px;
        border-radius: 50px;
        font-size: 0.78rem;
        letter-spacing: 0.05em;
        gap: 0.35rem;
        flex-direction: row;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .movie-detail-hero-play-mobile .movie-detail-hero-play__row {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }

    .movie-detail-hero-play-mobile .movie-detail-hero-play__word {
        display: inline;
    }

    .movie-detail-hero-play-mobile .bi-play-fill {
        margin: 0;
        font-size: 1em;
        line-height: 1;
    }

    /* Mid fit: icon + Play on first row, Trailer on second */
    .movie-detail-hero-play-mobile.is-stacked {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        padding: 8px 12px;
        border-radius: 18px;
        min-height: 0;
        white-space: normal;
        line-height: 1.15;
        letter-spacing: 0.04em;
    }

    .movie-detail-hero-play-mobile.is-stacked .movie-detail-hero-play__word--trailer {
        display: block;
        text-align: center;
    }

    /* Last resort: full unbroken label under the main poster */
    .movie-detail-main__poster-row.is-play-below {
        flex-direction: column;
        align-items: flex-start;
        width: var(--movie-detail-mobile-poster-width);
        max-width: var(--movie-detail-mobile-poster-width);
        gap: 12px;
    }

    .movie-detail-main__poster-row.is-play-below .movie-detail-mobile-play-wrap {
        flex: none;
        width: 100%;
        margin-top: 0;
        justify-content: center;
    }

    .movie-detail-main__poster-row.is-play-below .movie-detail-hero-play-mobile {
        width: 100%;
        max-width: 100%;
        flex-direction: row;
        white-space: nowrap;
        border-radius: 50px;
        padding: 9px 14px;
    }

    .movie-detail-main__poster-row.is-play-below .movie-detail-hero-play-mobile.is-stacked {
        flex-direction: row;
        gap: 0.35rem;
        border-radius: 50px;
        line-height: inherit;
    }

    .movie-detail-main__poster-row.is-play-below .movie-detail-hero-play-mobile .movie-detail-hero-play__word--trailer {
        display: inline;
    }

    .movie-detail-main__content {
        padding-top: 6px;
    }

    .movie-detail-main__title {
        font-size: 1.75rem;
        line-height: 1.12;
    }

    .movie-detail-main__meta,
    .movie-detail-main__synopsis,
    .movie-detail-main__fact dt,
    .movie-detail-main__fact dd {
        font-size: 0.9rem;
    }

    .movie-detail-main__fact {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .movie-related__grid {
        grid-template-columns: 1fr;
    }

    .movie-related__thumb img {
        height: 150px;
    }

    .where-watch {
        width: 100%;
        max-width: 100%;
        margin-top: 16px;
        padding: 0;
        border: none;
        background: transparent;
        border-radius: 0;
        overflow: visible;
    }

    .where-watch__title {
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 700;
    }

    .where-watch__list {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        gap: 16px;
        padding: 4px 2px 12px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .where-watch__list::-webkit-scrollbar {
        display: none;
    }

    .where-watch__item {
        flex: 0 0 74px;
        min-width: 74px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        padding: 0;
        border: none;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        scroll-snap-align: start;
    }

    .where-watch__item:hover {
        transform: none;
        background: transparent;
        border-color: transparent;
    }

    .where-watch__logo {
        width: 64px;
        height: 64px;
        min-width: 64px;
        border-radius: 50%;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .where-watch__name {
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 12px;
        line-height: 1.3;
        font-weight: 600;
        max-width: 72px;
        word-break: break-word;
        color: rgba(255, 255, 255, 0.9);
    }

    .where-watch__btn {
        display: none;
    }

    .movie-detail-thumbs {
        bottom: 12px;
        right: 12px;
    }

    .movie-detail-thumbs__item {
        width: 44px;
        height: 30px;
    }

    .movie-detail-thumbs__item--more {
        min-width: 44px;
        font-size: 0.8rem;
    }

    .movie-images-modal__thumb {
        width: 56px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .movie-detail-screen {
        --movie-detail-mobile-poster-width: 150px;
        --movie-detail-mobile-gap: 10px;
        --movie-detail-mobile-side-pad: 20px;
    }

    .movie-detail-carousel {
        height: 290px;
    }

    .movie-detail-screen__topbar {
        top: calc(var(--navbar-h, 80px) + 12px);
        left: 10px;
        right: 10px;
        height: 42px;
        padding: 0 8px;
    }

    .movie-detail-screen__hero-title {
        font-size: 0.68rem;
        letter-spacing: 0.04em;
    }

    .movie-detail-thumbs {
        left: calc(var(--movie-detail-mobile-side-pad) + var(--movie-detail-mobile-poster-width) + var(--movie-detail-mobile-gap));
        right: 10px;
        bottom: 10px;
    }

    .movie-detail-thumbs__strip {
        gap: 5px;
        padding-bottom: 1px;
        padding-left: 0;
        scroll-padding-inline: 0;
    }

    .movie-detail-thumbs__item {
        width: 40px;
        height: 28px;
        border-width: 1.5px;
    }

    .movie-detail-main__poster-wrap {
        width: var(--movie-detail-mobile-poster-width);
        max-width: var(--movie-detail-mobile-poster-width);
        margin-top: -92px;
    }

    .movie-detail-main__poster-row {
        align-items: flex-start;
        gap: var(--movie-detail-mobile-gap);
        width: 100%;
        max-width: 100%;
    }

    .movie-detail-hero-play-mobile {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }

    .movie-detail-hero-play-mobile.is-stacked {
        padding: 7px 10px;
        font-size: 0.7rem;
    }

    .movie-detail-main__poster-row.is-play-below .movie-detail-hero-play-mobile {
        padding: 8px 12px;
        font-size: 0.72rem;
    }

    .movie-detail-main__content {
        padding-top: 2px;
    }

    .movie-detail-main__title {
        font-size: 1.45rem;
        margin-bottom: 6px;
    }

    .movie-detail-main__meta,
    .movie-detail-main__synopsis,
    .movie-detail-main__fact dt,
    .movie-detail-main__fact dd {
        font-size: 0.84rem;
    }

    .movie-detail-main__synopsis {
        line-height: 1.45;
        margin-bottom: 12px;
    }

    .movie-detail-main__facts {
        gap: 8px;
    }

    .where-watch {
        margin-top: 12px;
    }

    .where-watch__title {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .where-watch__list {
        gap: 14px;
    }

    .where-watch__item {
        flex-basis: 68px;
        min-width: 68px;
    }

    .where-watch__logo {
        width: 56px;
        height: 56px;
        min-width: 56px;
        border-radius: 50%;
    }

    .where-watch__name {
        font-size: 11px;
        max-width: 66px;
    }
}

/* ===== HERO: THUMBNAIL STRIP (RIGHT-BOTTOM, SHOWS 3, SLIDEABLE) ===== */
.hero-section .movie-detail-thumbs {
    position: absolute;
    bottom: 18px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(0, 0, 0, .35);
    border-radius: 10px;
    padding: 5px 28px;
    backdrop-filter: blur(6px);
}

.hero-section .movie-detail-thumbs__strip {
    /* 4 thumbs × 80px + 3 gaps × 6px = 338px */
    width: 338px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    scroll-behavior: smooth;
}

.hero-section .movie-detail-thumbs__strip::-webkit-scrollbar {
    display: none;
}

/* Override the shared thumb size for the hero strip */
.hero-section .movie-detail-thumbs__item {
    width: 80px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, .25);
    transition: border-color .2s ease, transform .2s ease;
}

.hero-section .movie-detail-thumbs__item:hover {
    border-color: rgba(255, 255, 255, .7);
    transform: scale(1.04);
    box-shadow: none;
}

.hero-section .movie-detail-thumbs__item.active {
    border-color: var(--infuse-orange, #ff8d1c);
    box-shadow: 0 0 0 1px var(--infuse-orange, #ff8d1c);
    transform: none;
}

/* Prev / Next arrows - sit inside the padded container, over the strip edges */
.hero-thumb-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 26px;
    border: none;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: color .2s ease;
    padding: 0;
}

.hero-thumb-nav:hover {
    color: var(--infuse-orange, #ff8d1c);
}

.hero-thumb-nav--prev {
    left: 2px;
}

.hero-thumb-nav--next {
    right: 2px;
}

/* ===== MOVIE DETAIL: THUMBNAIL STRIP (RIGHT-BOTTOM) ===== */
.movie-detail-thumbs {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 6;
    display: flex;
    justify-content: flex-end;
}

.movie-detail-thumbs__strip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    scrollbar-width: none !important;
}

.movie-detail-thumbs__item {
    width: 56px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 0;
    background-color: #222;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.movie-detail-thumbs__item:hover {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.movie-detail-thumbs__item.active {
    border-color: var(--infuse-orange, #ff8d1c);
    box-shadow: 0 0 0 1px var(--infuse-orange, #ff8d1c);
}

.movie-detail-thumbs__item--more {
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
}

.movie-detail-thumbs__item--more:hover {
    background: rgba(0, 0, 0, 0.85);
    color: var(--infuse-orange, #ff8d1c);
}

/* ===== MOVIE IMAGES MODAL ===== */
.movie-images-modal-dialog {
    max-width: none;
    margin: 0;
    height: 100vh;
}

.movie-images-modal-content {
    background: #0d0d0d;
    min-height: 100vh;
    height: 100%;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.movie-images-modal__close-wrap {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.movie-images-modal__close {
    opacity: 0.9;
}

.movie-images-modal__close:hover {
    opacity: 1;
}

.movie-images-modal__carousel-wrap {
    flex: 1;
    position: relative;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
}

.movie-images-modal__carousel-wrap .carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.movie-images-modal__carousel-wrap .carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
    min-height: 280px;
}

.movie-images-modal__carousel-wrap .carousel-item {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.movie-images-modal__carousel-wrap .carousel-item .movie-images-modal__slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #111;
}

.movie-images-modal__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.movie-images-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.movie-images-modal__nav:hover {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.movie-images-modal__nav--prev {
    left: 16px;
}

.movie-images-modal__nav--next {
    right: 16px;
}

.movie-images-modal__thumbs-wrap {
    flex-shrink: 0;
    padding: 16px;
    display: flex;
    justify-content: center;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
}

.movie-images-modal__thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 12px;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    max-width: 100%;
    justify-content: center;
}

.movie-images-modal__thumbs::-webkit-scrollbar {
    height: 6px;
}

.movie-images-modal__thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.movie-images-modal__thumbs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.movie-images-modal__thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    padding: 0;
    background-color: #222;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.movie-images-modal__thumb:hover {
    border-color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.movie-images-modal__thumb.active {
    border-color: var(--infuse-orange, #ff8d1c);
    box-shadow: 0 0 0 1px var(--infuse-orange, #ff8d1c);
}


/* ========== HERO DETAIL PANEL ========== */
/* ========== HERO DETAIL PANEL (centered modal) ========== */
.hero-detail-panel {
    position: fixed;
    inset: 0;
    z-index: 1060;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
}

.hero-detail-panel.is-open {
    pointer-events: auto;
    visibility: visible;
}

.hero-detail-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.35s ease;
}

.hero-detail-panel.is-open .hero-detail-panel__backdrop {
    background: rgba(0, 0, 0, 0.72);
}

.hero-detail-panel__drawer {
    position: relative;
    z-index: 1;
    width: 90%;
    max-height: 92vh;
    background: #151515;
    border-radius: .5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

.hero-detail-panel.is-open .hero-detail-panel__drawer {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-detail-panel__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.86);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-detail-panel__close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    transform: scale(1.04);
}

@media (max-width: 767.98px) {
    .hero-detail-panel__close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

.hero-detail-panel__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 90vh;
}

/* Hide the topbar back/close nav inside the panel - panel has its own close */
.hero-detail-panel__body .movie-detail-screen__topbar {
    display: none;
}

.hero-detail-panel__loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.hero-detail-panel__spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, .15);
    border-top-color: var(--infuse-orange, #ff8d1c);
    border-radius: 50%;
    animation: panel-spin 0.8s linear infinite;
}

@keyframes panel-spin {
    to {
        transform: rotate(360deg);
    }
}

body.detail-panel-open {
    overflow: hidden;
}

/* ========== HERO VIDEO LAYER ========== */

/* Both image and video layers stack on top of each other */
.hero-slide--image,
.hero-slide--video {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Image layer: full width, center-cropped to 16:9 container */
.hero-slide--image {
    z-index: 1;
    background-size: cover;
}

/* Video layer sits above image, hidden until playing */
.hero-slide--video {
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide--video.is-playing {
    opacity: 1;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Full width, vertically center-cropped when needed */
    object-fit: cover;
    object-position: center center;
}

/* Overlay must sit above both layers */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding-top: 2rem;
    padding-bottom: 80px;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .28) 42%, rgba(0, 0, 0, .60) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .48) 100%);
}

/* ========== HERO MUTE BUTTON ========== */
.hero-mute-btn {
    position: absolute;
    bottom: 5.5rem;
    /* sits just above the thumbnail strip */
    right: 1.25rem;
    z-index: 20;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    background: rgba(0, 0, 0, .45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
}

.hero-mute-btn:hover {
    background: rgba(255, 141, 28, .8);
    border-color: transparent;
    transform: scale(1.08);
}

/* ========== TRAILER MODAL ========== */
/* Must sit above the hero-detail-panel (z-index: 1060) */
#heroTrailerModal {
    z-index: 1080;
}

#heroTrailerModal~.modal-backdrop,
.modal-backdrop:has(+ #heroTrailerModal) {
    z-index: 1079;
}

.trailer-modal-dialog {
    width: min(90%, 95vw);
    max-width: min(90%, 95vw);
    height: 90vh;
    max-height: 90vh;
    margin: auto;
}

.trailer-modal-content {
    background: #000;
    border: 0;
    border-radius: .5rem;
    overflow: hidden;
    height: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* trailer-modal__header replaced by .modal-topbar */

.trailer-modal__body {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* ========== CUSTOM VIDEO PLAYER ========== */
.trailer-player {
    position: relative;
    background: #000;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    user-select: none;
    display: flex;
    flex-direction: column;
}

.trailer-player__video {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}


/* -- Video loader -- */
.trailer-player__loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.trailer-player__loader.is-visible {
    opacity: 1;
    pointer-events: none;
}

.trailer-player__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, .15);
    border-top-color: var(--infuse-orange, #ff8d1c);
    border-radius: 50%;
    animation: trailer-spin .8s linear infinite;
}

@keyframes trailer-spin {
    to {
        transform: rotate(360deg);
    }
}

/* -- Tap zones: each exactly 33.33% -- */
.trailer-player__tap-zones {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 52px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    z-index: 3;
}

.trailer-player__tap-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.trailer-player__tap-ripple {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #fff;
    font-size: 1.6rem;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(2px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
    pointer-events: none;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .15s ease, transform .15s ease;
}

.trailer-player__tap-ripple span {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
}

.trailer-player__tap-ripple.is-flash {
    opacity: 1;
    transform: scale(1);
    transition: opacity .05s ease, transform .05s ease;
}

/* Bottom controls bar */
.trailer-player__controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 0 12px 10px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.trailer-player__controls.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Progress / seek */
.trailer-player__progress-wrap {
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    cursor: pointer;
}

.trailer-player__progress-bg {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, .2);
    border-radius: 2px;
    pointer-events: none;
}

.trailer-player__progress-buffered {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 255, 255, .3);
    border-radius: 2px;
    transition: width .4s linear;
}

.trailer-player__progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--infuse-orange, #ff8d1c);
    border-radius: 2px;
}

.trailer-player__progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--infuse-orange, #ff8d1c);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(0, 0, 0, .5);
    transition: transform .15s ease;
}

.trailer-player__progress-wrap:hover .trailer-player__progress-thumb {
    transform: translate(-50%, -50%) scale(1.3);
}

.trailer-player__seek {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

/* Controls bar: left | center | right */
.trailer-player__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 4px;
}

.trailer-player__bar-left {
    display: flex;
    align-items: center;
    gap: 2px;
}

.trailer-player__bar-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.trailer-player__bar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

/* Buttons */
.trailer-player__btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .85);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: color .15s ease, background .15s ease;
    flex-shrink: 0;
}

.trailer-player__btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

/* Center play/pause - slightly larger */
.trailer-player__bar-center .trailer-player__btn {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
}

.trailer-player__btn--speed {
    font-size: .8rem;
    font-weight: 700;
    width: auto;
    padding: 0 8px;
    letter-spacing: .02em;
}

/* Volume */
.trailer-player__volume-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
}

.trailer-player__volume {
    width: 72px;
    height: 4px;
    accent-color: var(--infuse-orange, #ff8d1c);
    cursor: pointer;
}

/* Time display */
.trailer-player__time {
    color: rgba(255, 255, 255, .75);
    font-size: .78rem;
    white-space: nowrap;
    padding: 0 4px;
    font-variant-numeric: tabular-nums;
}

/* Speed menu */
.trailer-player__speed-wrap {
    position: relative;
}

.trailer-player__speed-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: rgba(20, 20, 20, .96);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    padding: 4px 0;
    min-width: 80px;
    display: none;
    flex-direction: column;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.trailer-player__speed-menu.is-open {
    display: flex;
}

.trailer-player__speed-menu button {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, .8);
    font-size: .82rem;
    padding: 6px 14px;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.trailer-player__speed-menu button:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.trailer-player__speed-menu button.active {
    color: var(--infuse-orange, #ff8d1c);
    font-weight: 700;
}

/* Fullscreen */
/* -- Fullscreen -- */
#trailerVideoWrap:fullscreen {
    width: 100vw;
    height: 100vh;
}

/* Mobile */
@media (max-width: 575.98px) {
    .trailer-player__volume {
        width: 48px;
    }

    .trailer-player__time {
        font-size: .7rem;
    }

    .trailer-player__btn {
        width: 30px;
        height: 30px;
        font-size: .95rem;
    }

    .trailer-player__bar-center .trailer-player__btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}
