/*
 * WooCommerce Native Gallery Support
 * Author: Claude Code
 * Description: CSS minimo per assicurare il corretto funzionamento della gallery WooCommerce nativa
 */

/* ==========================================================================
   WOOCOMMERCE NATIVE GALLERY SUPPORT
   ========================================================================== */

/* Ensure WooCommerce gallery is properly displayed */
.woocommerce-product-gallery {
    position: relative;
    width: 100%;
    margin-bottom: 2em;
}

/* Ensure gallery wrapper is visible */
.woocommerce-product-gallery__wrapper {
    position: relative;
    width: 100%;
}

/* Ensure gallery images are properly sized */
.woocommerce-product-gallery__image {
    position: relative;
    width: 100%;
    height: auto;
}

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

/* Ensure FlexSlider works properly */
.flex-viewport {
    position: relative;
    overflow: hidden;
}

.flex-control-nav {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 1em 0 0 0;
    padding: 0;
    gap: 0.5em;
}

.flex-control-nav li {
    margin: 0;
}

.flex-control-nav li a {
    display: block;
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    text-indent: -9999px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.flex-control-nav li a.flex-active {
    background: #eeb332;
}

/* Ensure navigation arrows are visible */
.flex-direction-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.flex-direction-nav a {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.flex-direction-nav a:hover {
    background: #eeb332;
    color: #fff;
}

.flex-direction-nav .flex-prev {
    left: 10px;
}

.flex-direction-nav .flex-next {
    right: 10px;
}

/* Ensure thumbnails work properly */
.flex-control-thumbs {
    display: flex;
    list-style: none;
    margin: 1em 0 0 0;
    padding: 0;
    gap: 0.5em;
    overflow-x: auto;
}

.flex-control-thumbs li {
    flex: 0 0 auto;
    margin: 0;
}

.flex-control-thumbs li img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.flex-control-thumbs li img.flex-active {
    border-color: #eeb332;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .flex-direction-nav a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .flex-control-thumbs li img {
        width: 60px;
        height: 60px;
    }
}

/* Ensure PhotoSwipe lightbox works */
.pswp {
    z-index: 999999;
}

/* Ensure zoom functionality works */
.woocommerce-product-gallery__image img {
    cursor: zoom-in;
}

/* Ensure lightbox trigger is visible */
.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
}

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