/*==================================================
COMPONENT: PRODUCT GALLERY
==================================================*/

.sidv-product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidv-product-gallery.is-ready {
    opacity: 1;
    transform: translateY(0);
}

/*==================================================
VIEWER & MAIN CONTAINER
==================================================*/

.sidv-product-gallery__viewer {
    position: relative;
    width: 100%;
}

.sidv-product-gallery__main {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    margin: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--sidv-color-bg-card, #FFFFFF);
    border: 1px solid var(--sidv-color-border, #E8EDF3);
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(13, 33, 55, 0.05);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sidv-product-gallery__main:hover {
    border-color: var(--sidv-color-border-hover, #D1D5DB);
    box-shadow: 0 16px 40px rgba(13, 33, 55, 0.08);
}

/*==================================================
IMAGE
==================================================*/

.sidv-product-gallery__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease;
    will-change: transform, opacity;
}

.sidv-product-gallery__main:hover .sidv-product-gallery__image {
    transform: scale(1.05);
}

.sidv-product-gallery__image.is-loading {
    opacity: 0.2;
    filter: blur(2px);
}

/*==================================================
LIGHTBOX / ZOOM TRIGGER BUTTON
==================================================*/

.sidv-product-gallery__trigger-lightbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--sidv-color-border-light, rgba(255, 255, 255, 0.6));
    border-radius: 50%;
    background-color: var(--sidv-color-bg-glass, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--sidv-color-heading, #0D2137);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 33, 55, 0.08);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s ease, 
                transform 0.25s ease, 
                background-color 0.2s ease, 
                color 0.2s ease;
    z-index: 2;
}

.sidv-product-gallery__main:hover .sidv-product-gallery__trigger-lightbox {
    opacity: 1;
    transform: scale(1);
}

.sidv-product-gallery__trigger-lightbox:hover {
    background-color: var(--sidv-color-heading, #0D2137);
    color: #FFFFFF;
    border-color: var(--sidv-color-heading, #0D2137);
}

.sidv-product-gallery__trigger-lightbox:focus-visible {
    outline: 2px solid var(--sidv-color-accent, #FF9800);
    outline-offset: 2px;
    opacity: 1;
}

/*==================================================
THUMBNAILS CONTAINER
==================================================*/

.sidv-product-gallery__thumbs {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.25rem 0;
}

.sidv-product-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

/*==================================================
RESPONSIVE
==================================================*/

@media (max-width: 768px) {
    .sidv-product-gallery {
        gap: 0.875rem;
    }

    .sidv-product-gallery__main {
        padding: 1.25rem;
        border-radius: 18px;
    }

    .sidv-product-gallery__trigger-lightbox {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        opacity: 1;
        transform: scale(1);
    }

    .sidv-product-gallery__trigger-lightbox svg {
        width: 16px;
        height: 16px;
    }
}