.pc-native.single-product{
    --pc-gallery-thumb:64px;
    --pc-gallery-gap:8px;
}
@media(max-width:740px){
    .pc-native.single-product{--pc-gallery-thumb:44px;--pc-gallery-gap:6px}
}

/* Native FlexSlider controls and Blocksy's thumbnail buttons. */
.pc-native.single-product .woocommerce-product-gallery .flex-control-thumbs,
.pc-native.single-product.pc-blocksy .woocommerce-product-gallery .flexy-pills[data-type="thumbs"]>ol{
    display:flex!important;
    justify-content:center;align-items:center;flex-flow:row wrap;
    gap:var(--pc-gallery-gap);
    width:100%;max-width:100%;
    margin:10px auto 0!important;padding:0!important;
    box-sizing:border-box;list-style:none;overflow:visible;
}
.pc-native.single-product .woocommerce-product-gallery .flex-control-thumbs>li,
.pc-native.single-product.pc-blocksy .woocommerce-product-gallery .flexy-pills[data-type="thumbs"]>ol>li{
    display:block;float:none!important;
    flex:0 0 var(--pc-gallery-thumb)!important;
    width:var(--pc-gallery-thumb)!important;min-width:0!important;max-width:var(--pc-gallery-thumb)!important;
    height:var(--pc-gallery-thumb)!important;margin:0!important;padding:0!important;
    box-sizing:border-box;
}
.pc-native.single-product .woocommerce-product-gallery .flex-control-thumbs>li img,
.pc-native.single-product.pc-blocksy .woocommerce-product-gallery .flexy-pills[data-type="thumbs"] li .ct-media-container,
.pc-native.single-product.pc-blocksy .woocommerce-product-gallery .flexy-pills[data-type="thumbs"] li img{
    display:block;position:relative;inset:auto;
    width:100%;height:100%;min-width:0;max-width:100%;max-height:100%;
    margin:0;padding:0;border:0;box-sizing:border-box;
    aspect-ratio:auto;object-fit:contain;object-position:center;
}
.pc-native.single-product .woocommerce-product-gallery .flex-control-thumbs>li img,
.pc-native.single-product.pc-blocksy .woocommerce-product-gallery .flexy-pills[data-type="thumbs"] li img{
    background:var(--paper,#fafafa);
    outline:1px solid var(--line,#ddd);outline-offset:-1px;
    opacity:1;
}
.pc-native.single-product .woocommerce-product-gallery .flex-control-thumbs>li img.flex-active,
.pc-native.single-product.pc-blocksy .woocommerce-product-gallery .flexy-pills[data-type="thumbs"] li.active img{
    outline:2px solid var(--ink,#444);outline-offset:-2px;
}

.pc-native.single-product.pc-kadence .woocommerce-product-gallery .flex-control-thumbs{
    inset:auto;transform:none;max-width:100%;
}
.pc-native.single-product.pc-kadence .woocommerce-product-gallery .flex-control-thumbs>li img{
    border:0;opacity:1;
}

/* Woostify keeps its native Flickity navigation and variation gallery. */
.pc-native.single-product.pc-woostify .product-gallery.horizontal-style .product-thumbnail-images{
    margin:10px 0 0;
}
.pc-native.single-product.pc-woostify .product-gallery.horizontal-style .product-thumbnail-images-container{
    width:min(100%,calc(5 * (var(--pc-gallery-thumb) + var(--pc-gallery-gap)) + 4px));min-width:0;max-width:100%;margin:0 auto;
}
.pc-native.single-product.pc-woostify .product-gallery.horizontal-style .thumbnail-item{
    width:var(--pc-gallery-thumb);
    height:var(--pc-gallery-thumb);
    margin:0 calc(var(--pc-gallery-gap) / 2);
}
.pc-native.single-product.pc-woostify .product-gallery.horizontal-style .thumbnail-item img{
    display:block;width:100%;height:100%;
    aspect-ratio:auto;object-fit:contain;object-position:center;
    background:var(--paper,#fafafa);
}
@media(min-width:768px){
    /* Reserve the native side strip's former 80px + 20px so the main gallery keeps its exact width. */
    .pc-native.single-product.pc-woostify .product-gallery.horizontal-style.has-product-thumbnails>:is(.product-images,.product-thumbnail-images){
        width:calc(100% - 100px);margin-inline-start:100px;
    }
}
