/* Custom styles for Drift Zoom Pane */
.acs-drift-pane {
    position: absolute;
    width: 400px;
    /* Default size, can be adjusted */
    height: 400px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    overflow: hidden;
    pointer-events: none;
}

.acs-drift-pane.is-active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* 
 * CRITICAL FIX: Prevent theme CSS (like max-width: 100%) from affecting the Drift image.
 * This ensures the zoomed image maintains its natural aspect ratio and is not stretched.
 */
.acs-drift-pane img {
    max-width: none !important;
    max-height: none !important;
    width: auto !important;
    height: auto !important;
    position: absolute !important;
    /* Drift requires absolute positioning to pan */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
    opacity: 1 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Style the bounding box on the image */
.drift-bounding-box {
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .acs-drift-pane {
        display: none !important;
        /* Disable separate pane on mobile logic usually handled in JS too */
    }
}