/* Product image thumbnails: single row with optional arrow controls. */
.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery {
    --cdf-pg-thumb-gap: 10px;
    --cdf-pg-thumb-width: calc((100% - 30px) / 4);
    --cdf-pg-arrow-size: 38px;
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs {
    margin-top: 12px;
    position: relative;
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs.is-scrollable {
    padding-left: calc(var(--cdf-pg-arrow-size) + 10px);
    padding-right: calc(var(--cdf-pg-arrow-size) + 10px);
}

.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--cdf-pg-thumb-gap);
    list-style: none;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs::-webkit-scrollbar {
    display: none;
}

.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs li {
    flex: 0 0 var(--cdf-pg-thumb-width) !important;
    float: none !important;
    margin: 0 !important;
    max-width: var(--cdf-pg-thumb-width);
    scroll-snap-align: start;
    width: var(--cdf-pg-thumb-width) !important;
}

.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs img {
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    cursor: pointer;
    display: block !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: cover;
    opacity: .72;
    transition: opacity .18s ease, transform .18s ease;
    width: 100% !important;
}

.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs img:hover,
.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs img.flex-active {
    opacity: 1;
}

.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs img:hover {
    transform: translateY(-1px);
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs__arrow {
    align-items: center;
    background: #20404e;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(32, 64, 78, .18);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 24px;
    font-weight: 700;
    height: var(--cdf-pg-arrow-size);
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background .18s ease, opacity .18s ease, transform .18s ease;
    width: var(--cdf-pg-arrow-size);
    z-index: 3;
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs__arrow:hover {
    background: #cf6952;
    transform: translateY(-50%) scale(1.03);
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs__arrow:focus-visible {
    outline: 3px solid #f5d87f;
    outline-offset: 3px;
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs__arrow[disabled] {
    cursor: default;
    opacity: .36;
    pointer-events: none;
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs__arrow[hidden] {
    display: none !important;
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs__arrow--prev {
    left: 0;
}

.single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs__arrow--next {
    right: 0;
}

@media (max-width: 767px) {
    .single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery {
        --cdf-pg-thumb-gap: 8px;
        --cdf-pg-thumb-width: calc((100% - 16px) / 3);
        --cdf-pg-arrow-size: 34px;
    }

    .single-product .elementor-widget-woocommerce-product-images .cdf-product-gallery-thumbs.is-scrollable {
        padding-left: calc(var(--cdf-pg-arrow-size) + 8px);
        padding-right: calc(var(--cdf-pg-arrow-size) + 8px);
    }
}
