/* Variant Slider Styles */

/* Common Wrapper Styles */
.variant-image-wrapper {
    position: relative;
    display: block;
    width: 100%;
    /* Overflow hidden is handled by the added card classes (premium-card-image / minimal-card-image) */
}

/* VARIANT IMAGES - Always Absolute and Stacked */
.variant-image-wrapper img.variant-img {
    position: absolute !important;
    /* Force absolute to ensure stacking */
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    /* Allow clicks to pass through to link */
}

/* Active State for Variants */
.variant-image-wrapper img.variant-img.active {
    opacity: 1;
    z-index: 3;
}

/* === MAIN IMAGE HANDLING BY CONTEXT === */

/* 1. Premium Card Context (index.php) 
   - Uses padding-top hack for aspect ratio
   - Main image MUST be absolute
*/
.premium-card-image.variant-image-wrapper img.main-img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    z-index: 1;
    display: block;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* 2. Minimal Card Context (products.php)
   - Uses relative image to set container height
   - Main image MUST be relative
*/
.minimal-card-image.variant-image-wrapper img.main-img {
    position: relative !important;
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Circles Container */
.variant-circles {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
    z-index: 10;
    position: relative;
}

/* Circle Styles */
.variant-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #333;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Active Circle */
.variant-circle.active {
    background: #333;
    transform: scale(1.1);
}

/* Hover effect */
.variant-circle:hover {
    background: rgba(51, 51, 51, 0.5);
}