/* RentalAjay - slider foto produk
   Satu foto per slide, swipe di HP, tombol prev/next, thumbnail horizontal. */

.product-gallery {
    position: relative;
    overflow: hidden;
}

.product-gallery-track {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y pinch-zoom;
}

.product-gallery-track::-webkit-scrollbar {
    display: none;
}

.product-gallery-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: grid;
    place-items: center;
    background: var(--surface-2, #f5f7fb);
}

.product-gallery-slide .detail-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(66vh, 620px);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 0 !important;
    background: var(--surface-2, #f5f7fb);
}

.product-gallery-nav {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 999px;
    background: rgba(9, 18, 36, .72);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.product-gallery-nav span {
    display: block;
    line-height: 1;
    font-size: 2rem;
    transform: translateY(-1px);
}

.product-gallery-prev { left: 12px; }
.product-gallery-next { right: 12px; }

.product-gallery-nav:hover,
.product-gallery-nav:focus-visible {
    background: rgba(24, 91, 255, .92);
    outline: none;
}

.product-gallery-count {
    position: absolute;
    z-index: 5;
    top: 12px;
    right: 12px;
    min-width: 46px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(9, 18, 36, .76);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    scrollbar-width: none;
    background: var(--surface, #fff);
}

.product-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.product-gallery-thumbs button {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    opacity: .7;
}

.product-gallery-thumbs button.is-active {
    border-color: #2f63ff;
    opacity: 1;
}

.product-gallery-thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}

@media (max-width: 720px) {
    .product-gallery-slide .detail-image {
        max-height: 430px !important;
        aspect-ratio: 1 / 1;
        object-fit: contain;
    }

    .product-gallery-nav {
        width: 38px;
        height: 38px;
    }

    .product-gallery-nav span {
        font-size: 1.7rem;
    }

    .product-gallery-prev { left: 8px; }
    .product-gallery-next { right: 8px; }

    .product-gallery-count {
        top: 8px;
        right: 8px;
        padding: 5px 9px;
    }

    .product-gallery-thumbs {
        gap: 6px;
        padding: 8px;
    }

    .product-gallery-thumbs button {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        border-radius: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-gallery-track {
        scroll-behavior: auto;
    }
}
