/**
 * MM Attribute Gallery Frontend CSS
 */

/* Gallery wrapper */
.woocommerce-product-gallery__wrapper {
    position: relative;
    width: 100% !important;
    transform: none !important;
    min-height: 400px; /* Ensure wrapper has height even when images are absolute */
}

/* Fix for Flexslider */
.woocommerce-product-gallery .flex-viewport {
    margin-bottom: 10px;
    overflow: hidden;
    height: auto !important;
}

/* Gallery images - stacked layout using position absolute */
.woocommerce-product-gallery__image {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    height: auto;
    opacity: 0;
    z-index: 1;
    float: none !important;
    margin: 0 !important;
    /* Important: Keep all images visible for Wombat plugin */
    display: block !important;
    visibility: visible !important;
}

/* Show the active image */
.woocommerce-product-gallery__image.flex-active-slide {
    position: relative !important;
    opacity: 1;
    z-index: 10;
}

/* Ensure thumbnails are properly sized */
.woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* Style for thumbnails */
.woocommerce-product-gallery ol.flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;
}

.woocommerce-product-gallery ol.flex-control-thumbs li {
    width: 20%;
    padding: 5px;
    box-sizing: border-box;
    cursor: pointer;
}

.woocommerce-product-gallery ol.flex-control-thumbs li img {
    width: 100%;
    height: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.woocommerce-product-gallery ol.flex-control-thumbs li img.flex-active,
.woocommerce-product-gallery ol.flex-control-thumbs li img:hover {
    opacity: 1;
}

/* Fix for lcp-wrap - ensure it works with Wombat plugin */
.lcp-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 999;
}

.lcp-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lcp-content {
    opacity: 1;
}

.lcp-content-zoom {
    opacity: 0;
}

/* Ensure Wombat logo is visible */
.lcp-content .lcp-img {
    pointer-events: none;
    z-index: 1000;
    display: block !important;
    visibility: visible !important;
} 