.carousel-wrapper {
    width: 75%;
    padding: 60px 0;
    margin: 0 auto;
}

.carousel-container {
    position: relative;
    height: 500px;
    perspective: 2000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.carousel-slide {
    position: absolute;
    width: 600px;
    height: 400px;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #ef7f16, #d66c0d, #a04e00);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    filter: blur(20px);
}

.carousel-slide.active::before {
    opacity: 0.6;
}

.slide-inner {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.carousel-slide.active .slide-inner {
    box-shadow: 
        0 35px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.carousel-slide:hover .slide-inner {
    transform: scale(1.02);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease;
}

.carousel-slide.active img {
    filter: brightness(1.1);
}

/* Posiciones del carrusel 3D */
.carousel-slide.active {
    transform: translate(-50%, -50%) translateZ(0) scale(1);
    opacity: 1;
    z-index: 3;
}

.carousel-slide.next {
    transform: translate(-50%, -50%) translateX(450px) translateZ(-300px) rotateY(-35deg) scale(0.75);
    opacity: 0.5;
    z-index: 2;
}

.carousel-slide.prev {
    transform: translate(-50%, -50%) translateX(-450px) translateZ(-300px) rotateY(35deg) scale(0.75);
    opacity: 0.5;
    z-index: 2;
}

.carousel-slide.hidden-next {
    transform: translate(-50%, -50%) translateX(600px) translateZ(-500px) rotateY(-45deg) scale(0.5);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.carousel-slide.hidden-prev {
    transform: translate(-50%, -50%) translateX(-600px) translateZ(-500px) rotateY(45deg) scale(0.5);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
    left: 30px;
}

.carousel-btn.next {
    right: 30px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.indicator {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.4s ease;
}

.indicator.active {
    background: rgba(255, 255, 255, 0.3);
}

.indicator.active::before {
    width: 100%;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scaleX(1.1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 70%;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 
        0 0 100px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.lightbox-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ef7f16;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    z-index: 1003;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.lightbox-btn-container {
    position: absolute;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    z-index: 1002;
}

.lightbox-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 32px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.lightbox-close:hover {
    background: rgba(255, 86, 86, 0.3);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 86, 86, 0.5);
}

.lightbox-counter {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 30px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 1024px) {
    .carousel-slide {
        width: 500px;
        height: 350px;
    }

    .carousel-slide.next {
        transform: translate(-50%, -50%) translateX(350px) translateZ(-250px) rotateY(-35deg) scale(0.7);
    }

    .carousel-slide.prev {
        transform: translate(-50%, -50%) translateX(-350px) translateZ(-250px) rotateY(35deg) scale(0.7);
    }
}

@media (max-width: 768px) {
    .carousel-wrapper {
        width: 100%;
        overflow: hidden;
    }

    .carousel-container {
        height: 400px;
    }

    .carousel-slide {
        width: 225px;
        height: 400px;
    }

    .carousel-slide.next {
        transform: translate(-50%, -50%) translateX(250px) translateZ(-200px) rotateY(-30deg) scale(0.65);
    }

    .carousel-slide.prev {
        transform: translate(-50%, -50%) translateX(-250px) translateZ(-200px) rotateY(30deg) scale(0.65);
    }

    .carousel-btn-container {
        position: absolute;
        bottom: -80px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 20px;
    }

    .carousel-btn {
        position: static;
        transform: none;
    }
}