/**
 * Template Builder — Frontend gallery fix.
 *
 * WooCommerce's flexslider creates an <ol class="flex-control-thumbs"> for the
 * thumbnail strip. The list items need list-style: none and float: left to render
 * as a horizontal row. Some themes override those rules with higher-specificity
 * selectors (e.g. .product ol li { list-style: decimal }), causing the thumbnails
 * to appear as a numbered vertical column.
 *
 * These rules use .woocommerce-product-gallery as the scoping ancestor (always
 * present on the WooCommerce gallery wrapper) so they apply everywhere regardless
 * of the outer template wrapper, and !important ensures they win over theme resets.
 */

/* Thumbnail strip container */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
    list-style: none !important;
    padding: 0 !important;
    margin: 6px 0 0 !important;
    overflow: hidden !important;
    zoom: 1;
    display: block !important;
}

/* Individual thumbnail items — width is overridden by JS to match exact count */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li {
    list-style: none !important;
    float: left !important;
    width: 25% !important;     /* fallback; JS recalculates to 100%/n */
    margin: 0 !important;
    padding: 2px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

/* Thumbnail images */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li img {
    width: 100% !important;
    display: block !important;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

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

/* ── Attribute swatches — shortcode [product_swatches] ── */
.wcvt-swatches {
    margin: 0 0 18px;
}
.wcvt-swatches__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}
.wcvt-swatches__items {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
}
.wcvt-swatches__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 90px;
}
.wcvt-swatches__swatch {
    width: 70px;
    height: 70px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.wcvt-swatches__swatch--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wcvt-swatches__swatch--color {
    border: 1px solid rgba(0, 0, 0, .15);
}
.wcvt-swatches__swatch--text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: #f5f5f5;
    color: #333;
}
.wcvt-swatches__name {
    font-size: 11px;
    text-align: center;
    line-height: 1.3;
    color: #555;
    word-break: break-word;
}
