.product-gallery [data-gallery-zoom-target] {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}
.product-gallery [data-gallery-zoom-target] img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.product-gallery [data-gallery-main-image] {
    display: block;
    width: 100%;
    height: 100%;
}

.product-gallery [data-gallery-zoom-overlay] {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    transition: opacity 0.12s ease-out;
}

.product-gallery [data-gallery-main-image] {
    transition: opacity 0.12s ease-out;
}

@media (hover: hover) and (pointer: fine) {
    .product-gallery-item[data-gallery-media-type="image"] [data-gallery-zoom-target] {
        cursor: zoom-in;
    }

    .product-gallery-item[data-gallery-media-type="image"] [data-gallery-zoom-target].is-zoom-active [data-gallery-zoom-overlay] {
        opacity: 1;
    }

    .product-gallery-item[data-gallery-media-type="image"] [data-gallery-zoom-target].is-zoom-active [data-gallery-main-image] {
        opacity: 0;
    }
}

/* ── Thumbnail carousel ───────────────────────────────────────── */
.thumb-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    width: 100%;
}

.thumb-carousel-track-outer {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.product-gallery-navigation {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    transition: transform 0.3s ease;
}

.product-gallery-navigation .product-gallery-nav {
    flex-shrink: 0;
}

.thumb-carousel-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(224, 224, 224, 0.86);
    border-radius: var(--radius-circle, 50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
    color: var(--text-dark, #333333);
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.thumb-carousel-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    pointer-events: none;
}

.thumb-carousel-btn:hover:not(:disabled) {
    background: #ffffff;
    border-color: color-mix(in srgb, var(--brand-color) 28%, var(--border-color, #e0e0e0));
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    color: var(--brand-color);
    transform: scale(1.04);
}

.thumb-carousel-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--brand-color) 70%, #ffffff);
    outline-offset: 3px;
}

.thumb-carousel-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.thumb-carousel-btn.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 767px) {
    .thumb-carousel-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}

/* ── Shipping calculator ─────────────────────────────────────── */
.calculator-input #input-postal-code {
    flex: 1;
}
