.kb-film-detail {
    --kb-film-radius: var(--wp--custom--kb--button-radius, 8px);
    --kb-film-border: rgba(0, 0, 0, 0.14);
    --kb-film-bg: rgba(255, 255, 255, 0.55);
    --kb-film-bg-2: rgba(255, 255, 255, 0.75);

    color: #111111;
}

/* Hero */
.kb-film-detail__hero {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.kb-film-detail__heroMedia {
    height: clamp(260px, 42vh, 520px);
    background-image: var(--kb-film-hero);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.kb-film-detail__heroMedia--empty {
    background: rgba(0, 0, 0, 0.15);
}

.kb-film-detail__heroShade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.20) 40%, rgba(0,0,0,0) 85%);
    pointer-events: none;
}

.kb-film-detail__heroInner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 24px;
    color: #ffffff;
}

.kb-film-detail__title {
    margin: 0;
    line-height: 1.05;
}

.kb-film-detail__meta {
    margin-top: 6px;
    opacity: 0.95;
}

/* Grid */
.kb-film-detail__grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 24px;
    padding: 24px;
}

@media (max-width: 900px) {
    .kb-film-detail__grid {
        grid-template-columns: 1fr;
    }
}

.kb-film-detail__h2 {
    margin: 0 0 12px 0;
    font: inherit;
    font-weight: 700;
}

/* Left */
.kb-film-detail__desc :first-child {
    margin-top: 0;
}

/* Facts (quiet DL list) */
.kb-film-detail__facts {
    margin: 18px 0 0 0;
    padding: 14px 0 0 0;

    border-top: 1px solid var(--kb-film-border);

    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 16px;

    line-height: 1.5;
}

@media (max-width: 600px) {
    .kb-film-detail__facts {
        grid-template-columns: 1fr;
    }
}

.kb-film-detail__factLabel {
    margin: 0;
    padding: 0;

    font-weight: 400;
    opacity: 0.85;
}

.kb-film-detail__factValue {
    margin: 0;
    padding: 0;

    font-weight: 400;
}

/* Right box */
.kb-film-detail__showsBox {
    background: var(--kb-film-bg);
    border: 1px solid var(--kb-film-border);
    border-radius: var(--kb-film-radius);
    padding: 14px;

    color: #111111;
}

.kb-film-detail__showsHead {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kb-film-detail__bookingBtn {
    text-decoration: none;
    padding: 10px 12px;
    border-radius: var(--kb-film-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Days (legacy - kept for compatibility) */
.kb-film-detail__day {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.kb-film-detail__day:first-child {
    border-top: 0;
    padding-top: 0;
}

.kb-film-detail__dayLabel {
    display: grid;
    gap: 2px;
    line-height: 1.1;
}

.kb-film-detail__dayShort {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.kb-film-detail__dayDate {
    opacity: 0.75;
    font-size: 0.9em;
}

/* Times (legacy - kept for compatibility) */
.kb-film-detail__times {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.kb-film-detail__time {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 10px;
    border-radius: var(--kb-film-radius);
    border: 1px solid rgba(0,0,0,0.14);

    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.75);
}

.kb-film-detail__time:hover {
    background: var(--kb-film-bg-2);
}

.kb-film-detail__time.is-active {
    outline: 2px solid rgba(0,0,0,0.55);
    outline-offset: 1px;
    font-weight: 800;
}

.kb-film-detail__time--empty {
    opacity: 0.6;
    padding: 8px 10px;
    border-radius: var(--kb-film-radius);
    border: 1px dashed rgba(0,0,0,0.18);
}

/* small per-time booking link (legacy) */
.kb-film-detail__timeBooking {
    font-size: 0.85em;
    opacity: 0.85;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kb-film-detail__bookingHint {
    margin-top: 12px;
    font-size: 0.95em;
    opacity: 0.8;
}

/* =========================================================
   Next Shows (scoped, minimal flex layout)
   ========================================================= */

.kb-film-detail__showsBox .kb-next-shows__day {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;

    padding: 10px 0;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.kb-film-detail__showsBox .kb-next-shows__day:first-child {
    border-top: 0;
    padding-top: 0;
}

.kb-film-detail__showsBox .kb-next-shows__date {
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.kb-film-detail__showsBox .kb-next-shows__times {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.kb-film-detail__showsBox .kb-show-btn.is-disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.kb-film-detail__showsBox .kb-show-btn.is-selected {
    outline: 3px solid rgba(255, 122, 0, 0.95);
    outline-offset: 2px;
}

/* Mobile: allow wrap; date stays left, times can flow nicely */
@media (max-width: 600px) {
    .kb-film-detail__showsBox .kb-next-shows__day {
        flex-wrap: wrap;
    }

    .kb-film-detail__showsBox .kb-next-shows__times {
        justify-content: flex-start;
        width: 100%;
    }
}

/* =========================================================
   Film Gallery (scoped)
   ========================================================= */

.kb-film-gallery {
    background: #000000;
    padding-top: 24px;
    padding-bottom: 24px;

    color: #ffffff;
}

.kb-film-gallery__stage {
    padding-left: 24px;
    padding-right: 24px;
}

@media (max-width: 600px) {
    .kb-film-gallery__stage {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.kb-film-gallery__ratio {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    border-radius: 6px;
}

.kb-film-gallery__ratio iframe,
.kb-film-gallery__ratio img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.kb-film-gallery__ratio img {
    object-fit: contain;
}

.kb-film-gallery__empty {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.06);
}

.kb-film-gallery__thumbs {
    padding-left: 24px;
    padding-right: 24px;
    margin-top: 12px;

    display: flex;
    gap: 10px;

    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
    .kb-film-gallery__thumbs {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.kb-film-gallery__thumb {
    flex: 0 0 auto;
    width: 110px;
    aspect-ratio: 16 / 9;

    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;

    background: rgba(255,255,255,0.06);
    cursor: pointer;

    position: relative;
    overflow: hidden;
}

.kb-film-gallery__thumb.is-active {
    border-color: #ffffff;
}

.kb-film-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.95;
}

.kb-film-gallery__thumbFallback {
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.08);
}

/* trailer play overlay */
.kb-film-gallery__thumbPlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.kb-film-gallery__thumbPlay::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.35);
}

.kb-film-gallery__thumbPlay::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-42%, -50%);
    width: 0;
    height: 0;
    border-left: 12px solid rgba(255,255,255,0.92);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}