/* --- CONTENEDOR PRINCIPAL DEL BLOQUE --- */
.vs3d-slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    /*overscroll-behavior: none;*/
    color: #fff;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin-bottom: 2rem;
}

.ambient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.carousel-container {
    margin-top: 50px;
    padding: 20px;
    position: relative;
    width: 100%;
    height: 65vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 500px !important;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.carousel-container:active {
    cursor: grabbing;
}

/* --- TARJETAS (ITEMS) --- */
.carousel-item {
    position: absolute;
    aspect-ratio: 9/16;
    width: 280px;
    height: 500px;
    background: #000;
    border-radius: 0px;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.5s, z-index 0s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;
    z-index: 0;
    -webkit-user-drag: none;
}

/* Modificadores del Editor */
.vs3d-slider-wrapper-editor {
    margin-bottom: 20px;
}

.carousel-item-editor video {
    display: none;
}

.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    transition: background 0.5s;
    pointer-events: none;
}

.video-info {
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 20px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.2s;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.video-info h3 {
    margin: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: #fff;
}

.video-info p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: #ddd;
}

/* --- ESTADOS 3D --- */
.carousel-item.active {
    opacity: 1;
    z-index: 10;
    transform: translateX(0) scale(1) rotateY(0deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-item.active::after {
    background: transparent;
}

.carousel-item.active .video-info {
    opacity: 1;
    transform: translateY(0);
}

.carousel-item.prev-1 {
    opacity: 0.8;
    z-index: 5;
    transform: translateX(-80%) scale(0.85) rotateY(25deg);
}

.carousel-item.next-1 {
    opacity: 0.8;
    z-index: 5;
    transform: translateX(80%) scale(0.85) rotateY(-25deg);
}

.carousel-item.prev-2 {
    opacity: 0.5;
    z-index: 1;
    transform: translateX(-150%) scale(0.7) rotateY(35deg);
}

.carousel-item.next-2 {
    opacity: 0.5;
    z-index: 1;
    transform: translateX(150%) scale(0.7) rotateY(-35deg);
}

.carousel-item.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

/* --- MODAL FULLSCREEN --- */
.expanded-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.expanded-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.expanded-video-container {
    width: 100%;
    height: 100%;
    max-width: 800px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.expanded-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

/* Botón de Cierre Nuevo */
.vs3d-slider-wrapper .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    z-index: 2001;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.4) !important;

}

/* --- BOTONES DE NAVEGACIÓN --- */
.nav-buttons {
    bottom: -5%;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 20;
    padding-bottom: 20px;
    padding-top: 30px;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 25px;
    border-radius: 0px;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background: white;
    color: black;
    font-weight: bold;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .carousel-item {
        width: 75vw;
        height: 55vh;
    }

    .carousel-item.prev-1 {
        transform: translateX(-55%) scale(0.85) rotateY(15deg);
    }

    .carousel-item.next-1 {
        transform: translateX(55%) scale(0.85) rotateY(-15deg);
    }

    .carousel-item.prev-2,
    .carousel-item.next-2 {
        opacity: 0;
        pointer-events: none;
    }

    body.admin-bar .close-btn {
        top: 70px;
    }
}