/**
 * WooCommerce Product Gallery Styles
 * Ensures product images display properly in Hello Elementor theme
 */

/* Product Gallery Wrapper */
.woocommerce-product-gallery {
    position: relative;
    margin-bottom: 2em;
}

.woocommerce-product-gallery figure {
    margin: 0;
    padding: 0;
}

.woocommerce-product-gallery__wrapper {
    transition: all 0.2s ease-in-out;
}

/* Main Product Image */
.woocommerce-product-gallery__image {
    display: block;
    line-height: 0;
    overflow: hidden;
    position: relative;
    margin: 0 0 1em;
}

.woocommerce-product-gallery__image img {
    display: block;
    height: auto;
    width: 100%;
}

/* Product Thumbnails */
.flex-control-thumbs {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

.flex-control-thumbs li {
    flex: 0 0 auto;
    cursor: pointer;
    line-height: 0;
}

.flex-control-thumbs img {
    opacity: 0.5;
    transition: all 0.2s ease-in-out;
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.flex-control-thumbs .flex-active img,
.flex-control-thumbs img:hover {
    opacity: 1;
}

/* Lightbox Trigger */
.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 1em;
    right: 1em;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 3px;
    color: #333;
    cursor: pointer;
    display: block;
    font-size: 14px;
    height: 2em;
    text-align: center;
    width: 2em;
    z-index: 99;
}

.woocommerce-product-gallery__trigger:hover {
    background: #fff;
}

/* Zoom functionality */
.woocommerce-product-gallery--with-images .woocommerce-product-gallery__trigger {
    display: block;
}

.woocommerce-product-gallery--without-images .woocommerce-product-gallery__trigger {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .flex-control-thumbs img {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .flex-control-thumbs {
        gap: 0.25em;
    }
    
    .flex-control-thumbs img {
        width: 60px;
        height: 60px;
    }
}
