.product-gallery {
    position: relative;
}

.product-gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    border: 0;
    touch-action: pan-y;
    user-select: none;
}

.product-gallery-main img {
    width: 100%;
    height: auto;
    object-fit: initial;
    display: block;
    cursor: grab;
    transition: transform 0.2s ease;
}

.product-gallery-main:hover img {
    transform: scale(1.04);
}

.product-gallery-main img.is-dragging {
    cursor: grabbing;
    transform: scale(1.02);
}

.product-gallery-thumbs-wrap {
    position: relative;
    margin-top: 12px;
    padding: 0 36px;
}

.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.product-gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.product-gallery-thumbs::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
}

.product-gallery-thumbs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    z-index: 2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.product-gallery-thumbs-nav.prev {
    left: 0;
}

.product-gallery-thumbs-nav.next {
    right: 0;
}

.product-gallery-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    flex: 0 0 72px;
}

.product-gallery-thumb.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.12);
}

.product-gallery-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.product-gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

.product-gallery-lightbox.is-open {
    display: flex;
}

.product-gallery-lightbox-inner {
    position: relative;
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery-lightbox img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    background: #fff;
}

.product-gallery-lightbox-close,
.product-gallery-lightbox-nav {
    position: absolute;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery-lightbox-close {
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.product-gallery-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    font-size: 20px;
}

.product-gallery-lightbox-nav.prev {
    left: -56px;
}

.product-gallery-lightbox-nav.next {
    right: -56px;
}

@media (max-width: 768px) {
    .product-gallery-lightbox {
        padding: 16px;
    }

    .product-gallery-lightbox-nav.prev {
        left: 8px;
    }

    .product-gallery-lightbox-nav.next {
        right: 8px;
    }

    .product-gallery-lightbox-close {
        top: 8px;
        right: 8px;
    }
}
