.single-product div.product .woocommerce-product-gallery {
    --gp-child-thumb-size: 92px;
    --gp-child-thumb-gap: 12px;
    position: relative;
}

.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    margin-bottom: 14px;
}

.single-product div.product .woocommerce-product-gallery.has-gp-child-main-nav .flex-direction-nav {
    display: none;
}

.single-product div.product .woocommerce-product-gallery .flex-direction-nav a {
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border: 1px solid #d5dae0;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 1px solid #d5dae0;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding: 0;
    z-index: 5;
}

.single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button--prev {
    left: 12px;
}

.single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button--next {
    right: 12px;
}

.single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button:hover,
.single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button:focus-visible {
    border-color: #9ca3af;
    background: #f8fafc;
}

.single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.single-product div.product .woocommerce-product-gallery .flex-direction-nav .flex-disabled {
    opacity: 0.35 !important;
    pointer-events: none;
}

.single-product div.product .woocommerce-product-gallery .gp-child-thumbs-shell {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
}

.single-product div.product .woocommerce-product-gallery .gp-child-thumbs-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--gp-child-thumb-gap);
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
    display: none;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
    float: none !important;
    width: var(--gp-child-thumb-size) !important;
    flex: 0 0 var(--gp-child-thumb-size);
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid #d9dde3;
    opacity: 1;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li:hover img,
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li:focus-within img {
    border-color: #1f2937;
    box-shadow: inset 0 0 0 1px #1f2937;
}

.single-product div.product .woocommerce-product-gallery .gp-child-thumbs-button {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border: 1px solid #d5dae0;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding: 0;
}

.single-product div.product .woocommerce-product-gallery .gp-child-thumbs-button svg,
.single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

.single-product div.product .woocommerce-product-gallery .gp-child-thumbs-button:hover,
.single-product div.product .woocommerce-product-gallery .gp-child-thumbs-button:focus-visible {
    border-color: #9ca3af;
    background: #f8fafc;
}

.single-product div.product .woocommerce-product-gallery .gp-child-thumbs-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .single-product div.product .woocommerce-product-gallery {
        --gp-child-thumb-size: 72px;
        --gp-child-thumb-gap: 10px;
    }

    .single-product div.product .woocommerce-product-gallery .gp-child-thumbs-shell {
        gap: 8px;
    }

    .single-product div.product .woocommerce-product-gallery .gp-child-thumbs-button {
        width: 28px;
        height: 28px;
    }

    .single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button {
        width: 32px;
        height: 32px;
    }

    .single-product div.product .woocommerce-product-gallery .gp-child-thumbs-button svg,
    .single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button svg {
        width: 14px;
        height: 14px;
    }

    .single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button--prev {
        left: 8px;
    }

    .single-product div.product .woocommerce-product-gallery .gp-child-main-nav-button--next {
        right: 8px;
    }
}
