.shimmer{ position: relative; overflow: hidden; }
.shimmer::before{
    content: ""; position: absolute; top:0; left:-150%; height:100%; width:50%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 1.2s infinite; transform: skewX(-15deg);
}
@keyframes shimmer { 0%{ left:-150%; } 100%{ left:150%; } }

.reels-prev, .reels-next{
    width:40px;
    height:40px;
    border-radius:50px;
    border:1px solid var(--text_1);
    transition: background .2s ease, color .2s ease,
    opacity .2s ease;
    background:var(--background_2);
    color:var(--text_1);
}
.reels-prev:hover, .reels-next:hover{
    background:var(--background_1);
    color:var(--text_2);
}
/* .reels-prev:not(.swiper-button-disabled), .reels-next:not(.swiper-button-disabled){ background:#3b82f6; color:#fff; }
.reels-prev.swiper-button-disabled, .reels-next.swiper-button-disabled{ background:#f5f5f5; color:#9ca3af; } */
.reels-prev i, .reels-next i{ pointer-events:none; }
.fade-frame{ transition: opacity .25s ease, transform .25s ease; will-change: opacity, transform; }
.play-badge{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:auto; color: var(--text_2);}
.play-badge span{ font-size:48px; color:#fff; background:rgba(0,0,0,.45); width:72px; height:72px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
.modal-arrow{ position:absolute; top:50%; transform:translateY(-50%); width:44px; height:44px; border-radius:9999px; border:none; background:var(--background_6); color:var(--text_2); display:flex; align-items:center; justify-content:center; z-index:11; }
.modal-arrow-left{ left:-100%; }
.modal-arrow-right{ right:-100%; }
.share-fav-btns{
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0px;
    bottom: 50%;
    gap: 10px;
    font-size: 20px;
    z-index: 260;
}

.rtl .share-fav-btns{
    left: 0px !important;
    right: auto !important;
}
.share-fav-btns .share-btn, .share-fav-btns .fav-btn{
    background: rgba(0,0,0,.16);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bottom-6{
    bottom: 6% !important;
}

#productReelModal .product-img{
    width:95px;
    height:100%;
    object-fit:contain;
    border-radius: 8px 0px 0px 8px;
}
#productReelModal .product-link{
    position: absolute;
    right: 8px;
    bottom: 8px;
}
.rtl #productReelModal .product-img{
    border-radius: 0px 8px 8px 0px;
}
.rtl #productReelModal .product-link{
        left: 8px;
        right: auto !important;
}

#productReelModal,
#productReelModal .modal-dialog,
#productReelModal .modal-content,
#productReelModal .modal-body{
    overflow: hidden;
}

.iframe-container{
    width:360px;
    max-width:100vw;
    z-index:1;
}
.iframe-container .player-controls{
    display: none !important;
}
/* Prevent YouTube hover UI and ensure our overlay captures all interactions */
.iframe-container iframe{
    pointer-events: none !important;
    position: relative;
    z-index: 1;
}

@media screen and (max-width: 576px) {
    .iframe-container{
        width:100%;
    }
}

/* Custom Video Controls */
.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 120;
    background: transparent;
    cursor: pointer;
}
/* Mask YouTube title/controls overlays on hover */
.iframe-overlay::before{
    content:"";
    position:absolute;
    top:0; left:0; right:0;
    height:56px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
    pointer-events:none;
}
.iframe-overlay::after{
    content:"";
    position:absolute;
    bottom:0; left:0; right:0;
    height:56px;
    background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0));
    pointer-events:none;
}

.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    width: 70px;
    height: 70px;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    pointer-events: none; /* Let clicks pass to overlay */
    transition: opacity 0.3s ease;
}

.custom-progress-container {
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    z-index: 300; /* Above product card if needed, or ensure product card is moved */
    cursor: pointer;
}

.custom-progress-bar {
    height: 100%;
    background: #fff; /* or var(--text_2) */
    width: 0%;
    transition: width 0.1s linear;
}

/* Ensure controls are above everything else inside iframe-container */
.custom-controls-wrapper {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 240;
}

.custom-controls-wrapper > * {
    pointer-events: auto;
}
