/* xZoom Customização para iArremate */

/* Estilos gerais do xZoom */
.xzoom-container {
    position: relative;
    z-index: 9999;
}

.xzoom-loading {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.9);
}

/* Lente do zoom - Desktop */
.xzoom-lens {
    position: absolute;
    border: 2px solid #888;
    background: rgba(255, 255, 255, 0.3);
    cursor: crosshair;
    display: none;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

/* Preview do zoom - Desktop */
.xzoom-preview {
    position: absolute;
    display: none;
    z-index: 10002;
    overflow: hidden;
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.xzoom-preview img {
    position: absolute;
    max-width: none !important;
    max-height: none !important;
}

/* Imagem principal com xZoom */
.xzoom {
    display: block;
    cursor: crosshair;
    transition: opacity 0.3s;
}

.xzoom:hover {
    opacity: 0.95;
}

/* Galeria de imagens adicionais */
.xzoom-gallery {
    cursor: pointer;
    opacity: 0.65;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.xzoom-gallery:hover {
    opacity: 1;
    border-color: #999;
    transform: scale(1.05);
}

.xzoom-gallery.xactive {
    opacity: 1;
    border-color: #333;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* Estilos para mobile */
@media (max-width: 1000px) {
    .xzoom {
        cursor: pointer;
    }
    
    .xzoom-lens {
        width: 120px !important;
        height: 120px !important;
        border: 3px solid #fff;
        background: rgba(0, 0, 0, 0.3);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    }
    
    .xzoom-preview {
        width: 100% !important;
        height: auto !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%);
        max-width: 90%;
        max-height: 90%;
        border-radius: 8px;
    }
}

/* Animações suaves */
@keyframes xzoom-fadein {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.xzoom-preview.xzoom-active {
    animation: xzoom-fadein 0.2s ease;
}

/* Integração com o layout existente do iArremate */
.container.productFeature .xzoom {
    max-width: 100%;
    height: auto;
}

.img_adicionais .xzoom-gallery {
    margin: 5px;
    border-radius: 4px;
}

