/* ============================================================
   RELATED VIDEOS  (per-product, inside .product-content)
   Renders only when a product has videos in Data/product-videos.json
   ============================================================ */
.product-videos {
    max-width: 1200px;
    margin: 3.5rem auto 0;
    padding: 0 1rem 1rem;
}

.product-videos-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.4rem;
}

.product-videos-title::after {
    content: '';
    display: block;
    width: 46px;
    height: 4px;
    margin: 0.7rem auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transform: skewX(-24deg);
}

/* Language filter - only rendered when a product has 2+ languages */
.product-videos-filter {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.4rem 0 0.4rem;
    flex-wrap: wrap;
}

.video-filter-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 0.4rem 1.05rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.video-filter-pill:hover {
    background: rgba(255, 255, 255, 0.18);
}

.video-filter-pill.active {
    background: #fff;
    border-color: #fff;
    color: #14263f;
}

.product-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-top: 1.75rem;
}

.video-card {
    margin: 0;
    text-align: left;
}

/* Click-to-play thumbnail. No video bytes are fetched until this is pressed. */
.video-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background-color: #12233d;
    background-size: cover;
    background-position: center;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}

/* Fallback wash for videos with no poster image yet */
.video-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, .55), rgba(139, 92, 246, .55));
    opacity: 1;
    transition: opacity 0.35s ease;
}

.video-thumb[style*="background-image"]::before {
    background: linear-gradient(180deg, rgba(8, 20, 38, .15), rgba(8, 20, 38, .60));
}

.video-card:hover .video-thumb {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #14263f;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    padding-left: 4px;
}

.video-card:hover .video-play {
    transform: translate(-50%, -50%) scale(1.12);
    background: #fff;
}

.video-duration,
.video-lang {
    position: absolute;
    bottom: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #fff;
    background: rgba(8, 20, 38, 0.78);
    padding: 3px 9px;
    border-radius: 6px;
}

.video-duration { right: 10px; }
.video-lang     { left: 10px; }

.video-soon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #14263f;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 9px;
    border-radius: 6px;
}

.video-card.is-placeholder .video-thumb {
    cursor: default;
    opacity: 0.72;
}

.video-card.is-placeholder:hover .video-thumb {
    transform: none;
}

.video-title {
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.45;
    margin-top: 0.85rem;
}

/* ---------- Video lightbox ---------- */
.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.video-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 14, 28, 0.86);
    backdrop-filter: blur(4px);
    animation: videoFade 0.25s ease;
}

.video-lightbox-inner {
    position: relative;
    width: 100%;
    max-width: 1000px;
    animation: videoRise 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-lightbox-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border-radius: 14px;
    background: #000;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
    outline: none;
}

.video-lightbox-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin: 1rem 0 0;
}

.video-lightbox-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

.video-lightbox-close:hover {
    background: #fff;
    color: #14263f;
}

@keyframes videoFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes videoRise {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
    .video-lightbox { padding: 1rem 0.75rem; }
    .video-lightbox-close { top: -42px; }
}

.video-card[hidden] { display: none; }

@media (max-width: 992px) {
    .product-videos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .product-videos-grid { grid-template-columns: 1fr; }
}
