/* ============================================
   COLOR CONFIGURATOR - ANIMACIONES ESPECTACULARES
   ============================================ */

.ccc-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #f8f8f8;
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ========== CONTENEDOR IMAGENES ========== */
.ccc-image-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

/* Cada imagen ocupa toda la posicion, una encima de la otra */
.ccc-img-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    pointer-events: none;
}

.ccc-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* La activa se ve, las demas estan ocultas detras */
.ccc-img-wrap.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    pointer-events: auto;
}

/* ========== BOTONES ========== */
.ccc-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 24px 20px;
}

.ccc-buttons.ccc-vertical {
    flex-direction: column;
    align-items: center;
}

.ccc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(0,0,0,0.04);
    cursor: pointer;
    transition: all 0.25s ease;
}

.ccc-btn:hover {
    background: rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.ccc-btn.active {
    border-color: #333;
    background: rgba(0,0,0,0.06);
}

.ccc-color-dot {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.25s ease;
}

.ccc-btn:hover .ccc-color-dot {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ccc-btn.active .ccc-color-dot {
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.2);
}

.ccc-label {
    font-size: 12px;
    color: #555;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ccc-btn.active .ccc-label {
    color: #111;
    font-weight: 600;
}

/* ============================================
   1. FADE SUAVE
   ============================================ */
.ccc-anim-fade .ccc-img-wrap {
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

/* ============================================
   2. SLIDE IZQUIERDA
   ============================================ */
.ccc-anim-slide-left .ccc-img-wrap {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
}
.ccc-anim-slide-left .ccc-img-wrap.active {
    transform: translateX(0);
}
.ccc-anim-slide-left .ccc-img-wrap.exit-left {
    transform: translateX(-100%);
}

/* ============================================
   3. SLIDE DERECHA
   ============================================ */
.ccc-anim-slide-right .ccc-img-wrap {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%);
}
.ccc-anim-slide-right .ccc-img-wrap.active {
    transform: translateX(0);
}
.ccc-anim-slide-right .ccc-img-wrap.exit-right {
    transform: translateX(100%);
}

/* ============================================
   4. SLIDE ARRIBA
   ============================================ */
.ccc-anim-slide-up .ccc-img-wrap {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%);
}
.ccc-anim-slide-up .ccc-img-wrap.active {
    transform: translateY(0);
}
.ccc-anim-slide-up .ccc-img-wrap.exit-up {
    transform: translateY(-100%);
}

/* ============================================
   5. SLIDE ABAJO
   ============================================ */
.ccc-anim-slide-down .ccc-img-wrap {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-100%);
}
.ccc-anim-slide-down .ccc-img-wrap.active {
    transform: translateY(0);
}
.ccc-anim-slide-down .ccc-img-wrap.exit-down {
    transform: translateY(100%);
}

/* ============================================
   6. ZOOM ENTRADA
   ============================================ */
.ccc-anim-zoom-in .ccc-img-wrap {
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(0.3);
    opacity: 0;
}
.ccc-anim-zoom-in .ccc-img-wrap.active {
    transform: scale(1);
    opacity: 1;
}

/* ============================================
   7. ZOOM SALIDA
   ============================================ */
.ccc-anim-zoom-out .ccc-img-wrap {
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(2);
    opacity: 0;
}
.ccc-anim-zoom-out .ccc-img-wrap.active {
    transform: scale(1);
    opacity: 1;
}

/* ============================================
   8. FLIP HORIZONTAL
   ============================================ */
.ccc-anim-flip-horizontal .ccc-image-container {
    transform-style: preserve-3d;
}
.ccc-anim-flip-horizontal .ccc-img-wrap {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateY(90deg);
    opacity: 0;
}
.ccc-anim-flip-horizontal .ccc-img-wrap.active {
    transform: rotateY(0deg);
    opacity: 1;
}

/* ============================================
   9. FLIP VERTICAL
   ============================================ */
.ccc-anim-flip-vertical .ccc-image-container {
    transform-style: preserve-3d;
}
.ccc-anim-flip-vertical .ccc-img-wrap {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateX(90deg);
    opacity: 0;
}
.ccc-anim-flip-vertical .ccc-img-wrap.active {
    transform: rotateX(0deg);
    opacity: 1;
}

/* ============================================
   10. ROTACION 360
   ============================================ */
.ccc-anim-rotate .ccc-img-wrap {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(-360deg) scale(0.5);
    opacity: 0;
}
.ccc-anim-rotate .ccc-img-wrap.active {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

/* ============================================
   11. ESCALA + ROTACION
   ============================================ */
.ccc-anim-scale-rotate .ccc-img-wrap {
    transition: all 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(0) rotate(180deg);
    opacity: 0;
}
.ccc-anim-scale-rotate .ccc-img-wrap.active {
    transform: scale(1) rotate(0deg);
    opacity: 1;
}

/* ============================================
   12. BLUR DESENFOQUE
   ============================================ */
.ccc-anim-blur .ccc-img-wrap {
    transition: all 0.7s ease;
    filter: blur(20px);
    transform: scale(1.2);
    opacity: 0;
}
.ccc-anim-blur .ccc-img-wrap.active {
    filter: blur(0);
    transform: scale(1);
    opacity: 1;
}

/* ============================================
   13. LIQUID MORPH (ESPECTACULAR)
   ============================================ */
.ccc-anim-liquid .ccc-img-wrap {
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(0px) saturate(1);
    transform: scale(1) skewX(0deg);
    opacity: 0;
}
.ccc-anim-liquid .ccc-img-wrap.active {
    animation: ccc-liquid-in 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes ccc-liquid-in {
    0% {
        opacity: 0;
        filter: blur(30px) saturate(3);
        transform: scale(1.3) skewX(-10deg);
    }
    40% {
        opacity: 0.6;
        filter: blur(15px) saturate(2);
        transform: scale(0.95) skewX(5deg);
    }
    70% {
        opacity: 0.9;
        filter: blur(5px) saturate(1.3);
        transform: scale(1.02) skewX(-2deg);
    }
    100% {
        opacity: 1;
        filter: blur(0px) saturate(1);
        transform: scale(1) skewX(0deg);
    }
}

/* ============================================
   14. GLITCH CYBERPUNK (ESPECTACULAR)
   ============================================ */
.ccc-anim-glitch .ccc-img-wrap {
    transition: none;
    opacity: 0;
}
.ccc-anim-glitch .ccc-img-wrap.active {
    animation: ccc-glitch-in 0.6s steps(1) forwards;
}

@keyframes ccc-glitch-in {
    0% {
        opacity: 0;
        clip-path: inset(50% 0 50% 0);
        transform: translate(0);
    }
    10% {
        opacity: 1;
        clip-path: inset(20% 0 60% 0);
        transform: translate(-5px, 2px);
        filter: hue-rotate(90deg) saturate(2);
    }
    20% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(5px, -2px);
        filter: hue-rotate(-90deg) brightness(1.3);
    }
    30% {
        clip-path: inset(10% 0 40% 0);
        transform: translate(-3px, 1px);
        filter: hue-rotate(45deg);
    }
    40% {
        clip-path: inset(40% 0 20% 0);
        transform: translate(3px, -1px);
        filter: hue-rotate(-45deg);
    }
    50% {
        clip-path: inset(0% 0 0% 0);
        transform: translate(0);
        filter: none;
    }
    60% {
        clip-path: inset(30% 0 30% 0);
        transform: translate(-2px, 0);
        filter: hue-rotate(180deg);
    }
    70% {
        clip-path: inset(0% 0 0% 0);
        transform: translate(0);
        filter: none;
    }
    80% {
        clip-path: inset(10% 0 10% 0);
        transform: translate(1px, -1px);
        filter: saturate(1.5);
    }
    100% {
        opacity: 1;
        clip-path: inset(0% 0 0% 0);
        transform: translate(0);
        filter: none;
    }
}

/* ============================================
   15. PIXELATE DIGITAL (ESPECTACULAR)
   ============================================ */
.ccc-anim-pixelate .ccc-img-wrap {
    transition: all 0.1s steps(6);
    opacity: 0;
}
.ccc-anim-pixelate .ccc-img-wrap.active {
    animation: ccc-pixelate-in 0.8s steps(8) forwards;
}

@keyframes ccc-pixelate-in {
    0% {
        opacity: 0;
        filter: blur(0px) contrast(1);
        image-rendering: pixelated;
        transform: scale(0.1);
    }
    20% {
        opacity: 0.3;
        filter: blur(0px) contrast(3);
        transform: scale(0.3);
    }
    40% {
        opacity: 0.6;
        filter: blur(0px) contrast(2);
        transform: scale(0.6);
    }
    60% {
        opacity: 0.8;
        filter: blur(0px) contrast(1.5);
        transform: scale(0.85);
    }
    80% {
        opacity: 0.95;
        filter: blur(0px) contrast(1.1);
        transform: scale(0.97);
    }
    100% {
        opacity: 1;
        filter: blur(0px) contrast(1);
        transform: scale(1);
    }
}

/* ============================================
   16. RIPPLE ONDA (ESPECTACULAR)
   ============================================ */
.ccc-anim-ripple .ccc-img-wrap {
    transition: all 0.1s;
    opacity: 0;
    transform: scale(1.5);
    filter: blur(20px);
}
.ccc-anim-ripple .ccc-img-wrap.active {
    animation: ccc-ripple-in 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes ccc-ripple-in {
    0% {
        opacity: 0;
        transform: scale(1.5);
        filter: blur(30px) brightness(2);
    }
    30% {
        opacity: 0.5;
        transform: scale(0.9);
        filter: blur(10px) brightness(1.5);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
        filter: blur(5px) brightness(1.2);
    }
    70% {
        opacity: 0.95;
        transform: scale(0.98);
        filter: blur(2px) brightness(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px) brightness(1);
    }
}

/* ============================================
   17. SHUFFLE CORTINAS (ESPECTACULAR)
   ============================================ */
.ccc-anim-shuffle .ccc-image-container {
    overflow: hidden;
}
.ccc-anim-shuffle .ccc-img-wrap {
    transition: none;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
}
.ccc-anim-shuffle .ccc-img-wrap.active {
    animation: ccc-shuffle-in 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes ccc-shuffle-in {
    0% {
        opacity: 1;
        clip-path: inset(0 100% 0 0);
    }
    50% {
        clip-path: inset(0 0% 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0% 0 0);
    }
}

/* ============================================
   18. CUBE 3D (ESPECTACULAR)
   ============================================ */
.ccc-anim-cube .ccc-image-container {
    transform-style: preserve-3d;
    perspective: 1000px;
}
.ccc-anim-cube .ccc-img-wrap {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateY(-90deg) translateZ(200px);
    opacity: 0;
}
.ccc-anim-cube .ccc-img-wrap.active {
    transform: rotateY(0deg) translateZ(0);
    opacity: 1;
}

/* ============================================
   19. SWING PENDULO
   ============================================ */
.ccc-anim-swing .ccc-img-wrap {
    transition: all 0.1s;
    opacity: 0;
    transform-origin: top center;
}
.ccc-anim-swing .ccc-img-wrap.active {
    animation: ccc-swing-in 0.8s ease forwards;
}

@keyframes ccc-swing-in {
    0% {
        opacity: 0;
        transform: rotateX(-70deg);
    }
    20% {
        opacity: 1;
        transform: rotateX(30deg);
    }
    40% {
        transform: rotateX(-20deg);
    }
    60% {
        transform: rotateX(10deg);
    }
    80% {
        transform: rotateX(-5deg);
    }
    100% {
        opacity: 1;
        transform: rotateX(0deg);
    }
}

/* ============================================
   20. ELASTIC REBOTE
   ============================================ */
.ccc-anim-elastic .ccc-img-wrap {
    transition: all 0.1s;
    opacity: 0;
}
.ccc-anim-elastic .ccc-img-wrap.active {
    animation: ccc-elastic-in 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes ccc-elastic-in {
    0% {
        opacity: 0;
        transform: scale(0) translateY(100px);
    }
    40% {
        opacity: 1;
        transform: scale(1.1) translateY(-20px);
    }
    60% {
        transform: scale(0.95) translateY(10px);
    }
    80% {
        transform: scale(1.02) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .ccc-image-container {
        height: 400px !important;
    }

    .ccc-color-dot {
        width: 32px;
        height: 32px;
    }

    .ccc-label {
        font-size: 10px;
    }

    .ccc-buttons {
        gap: 8px;
        padding: 16px 12px;
    }
}
