/* image-zoom.css - Versión profesional */

/* Contenedor de imagen */
/* Imagen dentro del contenedor */
.product-image-thumb {
    width: 100%;
    height: 100%;
}

.product-image-container:hover .product-image-thumb {
    transform: scale(1.05);
}

/* Botón lupa profesional - Esquina superior derecha */
.img-zoom-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Mostrar botón al hover en desktop */
.product-image-container:hover .img-zoom-btn {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* En móviles siempre visible pero semi-transparente */
@media (hover: none) and (pointer: coarse) {
    .img-zoom-btn {
        opacity: 0.5;
        visibility: visible;
        transform: scale(1.5);
        background: rgb(0 0 0 / 4%);;
        backdrop-filter: blur(12px);
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
    }
    
    .img-zoom-btn:active {
        transform: scale(0.95);
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Hover efecto en desktop */
.img-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.img-zoom-btn i {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.img-zoom-btn:hover i {
    transform: scale(1.1);
}

/* Modal de imagen - Estilo profesional */
.image-zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.image-zoom-modal.active {
    display: block;
    opacity: 1;
}

.image-zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
}

.image-zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

/* Botón cerrar */
.image-zoom-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
}

.image-zoom-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Imagen ampliada */
.image-zoom-img {
    max-width: 90%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* Footer del modal */
.image-zoom-footer {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 30px;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
    pointer-events: none;
}

.image-zoom-footer::before {
    content: "✨ ";
}

.image-zoom-footer::after {
    content: " ✨";
}

/* Animaciones */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .img-zoom-btn {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
    
    .img-zoom-btn i {
        font-size: 16px;
    }
    
    .image-zoom-close {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    
    .image-zoom-footer {
        bottom: 24px;
        font-size: 12px;
        padding: 8px 16px;
        white-space: nowrap;
    }
    
    .image-zoom-img {
        max-width: 95%;
        max-height: 80%;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .img-zoom-btn {
        opacity: 0.9;
        visibility: visible;
        background: rgba(0, 0, 0, 0.6);
    }
    
    .product-image-container:hover .img-zoom-btn {
        opacity: 1;
    }
}

/* Soporte para reduce motion */
@media (prefers-reduced-motion: reduce) {
    .product-image-thumb,
    .img-zoom-btn,
    .image-zoom-modal,
    .image-zoom-img {
        transition: none;
        animation: none;
    }
}
