/* =============================================
   Video Reviews Widget — video-reviews.css
   Version: 1.0.2
   ============================================= */

/* ---------- Wrapper ---------- */
.vrw-wrapper {
    width: 100%;
    background-color: #fce4ec;
    padding: 48px;
    box-sizing: border-box;
    font-family: inherit;
    position: relative;
}

/* ---------- Header ---------- */
.vrw-header {
    text-align: center;
    margin-bottom: 32px;
}

.vrw-section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.2;
}

.vrw-rating-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vrw-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.vrw-rating-text {
    color: #666;
    font-size: 0.9rem;
}

/* =============================================
   CARD — TikTok 9:16 Ratio
   ============================================= */
.vrw-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
}

/* Hover Effects */
.vrw-hover-lift .vrw-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}

.vrw-hover-glow .vrw-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255,255,255,0.3), 0 8px 25px rgba(0,0,0,0.3);
}

.vrw-hover-zoom .vrw-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    z-index: 2;
}

.vrw-hover-slide .vrw-card .vrw-card-overlay {
    transform: translateY(20px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.vrw-hover-slide .vrw-card:hover .vrw-card-overlay {
    transform: translateY(0);
}

.vrw-hover-flip .vrw-card {
    perspective: 1000px;
}

.vrw-hover-flip .vrw-card:hover {
    transform: rotateY(10deg) scale(1.03);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.vrw-hover-shake .vrw-card:hover {
    animation: vrw-shake 0.5s ease;
}

@keyframes vrw-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.vrw-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%;
    overflow: hidden;
    border-radius: inherit;
}

.vrw-video,
.vrw-no-video img,
.vrw-no-video,
.vrw-youtube-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.vrw-youtube-wrapper {
    background: #000;
}

/* 🔧 FIX: YouTube poster image */
.vrw-youtube-poster {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* 🔧 FIX: YouTube player div (iframe will be injected by JS) */
.vrw-youtube-player {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    pointer-events: none;
}

.vrw-youtube-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.vrw-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    font-size: 2rem;
    color: #fff;
}

/* ---------- Overlay ---------- */
.vrw-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 10px;
    transition: background 0.2s;
    z-index: 3;
}

.vrw-card:hover .vrw-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 60%);
}

/* ---------- Play Button ---------- */
.vrw-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s;
    z-index: 4;
}

.vrw-card:hover .vrw-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
}

/* ---------- Card Footer ---------- */
.vrw-card-footer {
    width: 100%;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.vrw-caption {
    color: rgba(255,255,255,0.85);
    font-size: 0.72rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* =============================================
   CAROUSEL MODE
   ============================================= */
.vrw-mode-carousel {
    position: relative;
    overflow: visible;
}

.vrw-carousel-ui {
    position: relative;
    overflow: visible;
    width: 100%;
}

.vrw-track-clip {
    overflow: hidden;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.vrw-track {
    display: flex;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 🔧 FIX: Arrows - properly visible with solid styling */
.vrw-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    padding: 0;
    outline: none;
}

.vrw-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    background-color: #f8f8f8;
}

.vrw-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.vrw-arrow:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 3px;
}

.vrw-arrow svg {
    stroke: #333333;
    display: block;
}

.vrw-arrow-prev { left: -22px; }
.vrw-arrow-next { right: -22px; }

/* =============================================
   GRID MODE
   ============================================= */
.vrw-mode-grid {
    display: grid;
}

/* =============================================
   STORIES MODE
   ============================================= */
.vrw-mode-stories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    scrollbar-width: none;
}

.vrw-mode-stories::-webkit-scrollbar {
    display: none;
}

/* Circle Stories */
.vrw-stories-circle .vrw-card {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    scroll-snap-align: start;
    border: 3px solid #e0e0e0;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    padding: 2px;
}

.vrw-stories-circle .vrw-card:hover {
    transform: scale(1.05);
}

.vrw-stories-circle .vrw-video-wrap {
    padding-bottom: 100%;
    border-radius: 50%;
}

.vrw-stories-circle .vrw-card-overlay {
    border-radius: 50%;
}

.vrw-stories-circle .vrw-caption {
    position: absolute;
    bottom: -25px;
    color: #333;
    font-size: 0.75rem;
    text-shadow: none;
    text-align: center;
    width: 100%;
    left: 0;
}

.vrw-stories-circle .vrw-cta-btn {
    display: none;
}

.vrw-stories-circle .vrw-play-btn {
    transform: translate(-50%, -50%) scale(0.6);
}

/* Square Stories */
.vrw-stories-square .vrw-card {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 16px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.vrw-stories-square .vrw-video-wrap {
    padding-bottom: 100%;
}

/* Cards Stories */
.vrw-stories-cards .vrw-card {
    width: 160px;
    min-width: 160px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 14px;
}

.vrw-stories-cards .vrw-video-wrap {
    padding-bottom: 177.78%;
}

/* Stories Progress Bar */
.vrw-stories-progress {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    z-index: 5;
    overflow: hidden;
}

.vrw-stories-progress-bar {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    transition: width 0.1s linear;
    width: 0%;
}

/* ── CTA BUTTON ──────────────────────────────────────── */
.vrw-cta-btn {
    display: inline-block;
    padding: 9px 20px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    z-index: 5;
    white-space: nowrap;
}

.vrw-cta-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 18px rgba(0,0,0,0.22);
    opacity: 0.95;
    color: inherit;
    text-decoration: none;
}

.vrw-cta-btn:active {
    transform: scale(0.97);
    transition-duration: 0.08s;
}

/* =============================================
   LIGHTBOX
   ============================================= */
.vrw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.vrw-lightbox.vrw-lb-open {
    display: flex !important;
    animation: vrwLbFadeIn 0.22s ease;
}

.vrw-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
}

.vrw-lightbox-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    max-height: 95vh;
}

.vrw-lightbox-video-wrap {
    height: 85vh;
    width: calc(85vh * 9 / 16);
    max-width: 95vw;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.vrw-lightbox-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.vrw-lightbox-youtube {
    position: absolute;
    inset: 0;
}

.vrw-lightbox-youtube iframe {
    width: 100%;
    height: 100%;
}

.vrw-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vrw-lightbox-close:hover {
    background: rgba(255,255,255,0.4);
}

.vrw-close-icon {
    position: relative;
    width: 16px;
    height: 16px;
}

.vrw-close-icon::before,
.vrw-close-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
}

.vrw-close-icon::before { transform: translateY(-50%) rotate(45deg); }
.vrw-close-icon::after  { transform: translateY(-50%) rotate(-45deg); }

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .vrw-arrow-prev { left: -16px; }
    .vrw-arrow-next { right: -16px; }
}

@media (max-width: 767px) {
    .vrw-wrapper { padding: 28px 16px; }

    .vrw-arrow { 
        width: 36px; 
        height: 36px; 
    }
    .vrw-arrow svg {
        width: 18px;
        height: 18px;
    }
    .vrw-arrow-prev { left: 4px; }
    .vrw-arrow-next { right: 4px; }

    .vrw-lightbox-inner  { gap: 8px; }
    .vrw-lightbox-video-wrap {
        height: 80vh;
        width: calc(80vh * 9 / 16);
        max-width: 88vw;
    }
    
    .vrw-stories-circle .vrw-card {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }
    
    .vrw-stories-square .vrw-card {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
    
    .vrw-stories-cards .vrw-card {
        width: 140px;
        min-width: 140px;
    }
}

/* No video placeholder */
.vrw-no-video { background: #2a2a2a; }

/* Accessibility — Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .vrw-card,
    .vrw-track,
    .vrw-arrow,
    .vrw-cta-btn,
    .vrw-card-overlay,
    .vrw-lightbox {
        transition: none !important;
        animation: none !important;
    }
    
    .vrw-hover-lift .vrw-card:hover,
    .vrw-hover-glow .vrw-card:hover,
    .vrw-hover-zoom .vrw-card:hover,
    .vrw-hover-flip .vrw-card:hover,
    .vrw-hover-shake .vrw-card:hover {
        transform: none !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    }
}


/* ---------- YouTube Player Cover (Hides Title Bar) ---------- */
.vrw-youtube-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    overflow: hidden;
}

.vrw-youtube-poster {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

.vrw-youtube-player {
    position: absolute;
    top: -60px;          /* ⬅️ Shift up to hide YouTube title bar */
    left: 0;
    width: 100%;
    height: calc(100% + 120px);  /* ⬅️ Extra height to compensate */
    z-index: 2;
    pointer-events: none;
    clip-path: inset(60px 0 60px 0);  /* ⬅️ Crop top & bottom */
}

.vrw-youtube-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ---------- Lightbox YouTube Player ---------- */
.vrw-lightbox-youtube {
    position: absolute;
    inset: 0;
    overflow: hidden;           /* ⬅️ Crop extra area */
    border-radius: 16px;
}

.vrw-lightbox-youtube iframe {
    width: 100%;
    height: 100%;
    border: none;
}