/**
 * Foxbow Product Image Zoom - Background Image Method
 * CSS simple et robuste pour la technique background-image
 */

/* Container du zoom */
.product-cover {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    display: block;
}

/* État de chargement */
.product-cover.foxbow-zoom-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(113, 176, 44, 0.2);
    border-top-color: #71b02c;
    border-radius: 50%;
    animation: foxbow-zoom-spin 0.8s linear infinite;
    z-index: 10;
    pointer-events: none;
}

@keyframes foxbow-zoom-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Overlay de chargement */
.product-cover.foxbow-zoom-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 5;
    pointer-events: none;
}

/* État zoom actif - CLEF du système */
.product-cover.foxbow-zoom-active {
    cursor: zoom-in;

    /* Le background sera l'image HD en taille native (auto) */
    /* background-image: défini par JS */
    /* background-size: auto; défini par JS = TAILLE NATIVE = PAS DE FLOU */
    /* background-position: défini par JS selon la souris */
}

/* Image normale - visible par défaut */
.js-qv-product-cover {
    cursor: zoom-in !important;
    max-width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.2s ease;
}

/* Responsive */
@media (max-width: 480px) {
    .product-cover {
        cursor: default !important;
    }

    .js-qv-product-cover {
        cursor: default !important;
    }
}
