.vcp-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    position: relative;
    font-family: var(--vcp-font);
}

.vcp-gallery.is-layout-slider {
    flex-direction: column;
}

.vcp-gallery.is-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.vcp-gallery.is-layout-masonry {
    columns: 2 16px;
    gap: 16px;
}

.vcp-gallery.is-layout-filmstrip {
    flex-direction: column;
}

/* Main Display */
.vcp-gallery__main {
    position: relative;
    border-radius: var(--vcp-radius);
    overflow: hidden;
    background: #f8fafc;
    aspect-ratio: 1 / 1;
}

.vcp-gallery__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.vcp-gallery__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1;
}

.vcp-gallery__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.vcp-gallery__zoom-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.vcp-gallery__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

/* Thumbs */
.vcp-gallery__thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 2px;
}

.vcp-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.vcp-gallery__thumb {
    flex: 0 0 calc(25% - 9px);
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: calc(var(--vcp-radius) - 2px);
    overflow: hidden;
    cursor: pointer;
    transition: var(--vcp-transition);
    opacity: 0.6;
}

.vcp-gallery__thumb.is-active,
.vcp-gallery__thumb:hover {
    opacity: 1;
    border-color: var(--vcp-primary);
}

.vcp-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Arrows */
.vcp-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--vcp-bg);
    border: 1px solid var(--vcp-border);
    color: var(--vcp-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--vcp-shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--vcp-transition);
}

.vcp-gallery__main:hover .vcp-gallery__arrow {
    opacity: 1;
    visibility: visible;
}

.vcp-gallery__arrow:hover {
    background: var(--vcp-primary);
    color: #fff;
    border-color: var(--vcp-primary);
}

.vcp-gallery__arrow--prev {
    left: 16px;
}

.vcp-gallery__arrow--next {
    right: 16px;
}

/* Dots */
.vcp-gallery__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.vcp-gallery__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--vcp-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--vcp-transition);
}

.vcp-gallery__dot.is-active {
    background: var(--vcp-primary);
    transform: scale(1.2);
}

/* Toolbar (Fullscreen, Counter, Try-on) */
.vcp-gallery__toolbar {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.vcp-gallery__counter {
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--vcp-text);
    box-shadow: var(--vcp-shadow-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.vcp-gallery__fullscreen {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--vcp-shadow-sm);
    transition: var(--vcp-transition);
    color: var(--vcp-text);
}

.vcp-gallery__fullscreen:hover {
    background: var(--vcp-primary);
    color: #fff;
}

.vcp-gallery__tryon-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--vcp-primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--vcp-shadow);
    transition: var(--vcp-transition);
}

.vcp-gallery__tryon-icon:hover {
    transform: scale(1.05);
}

/* Zoom Results */
.vcp-gallery__zoom-lens {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    display: none;
    z-index: 20;
}

.vcp-zoom-result {
    position: absolute;
    top: 0;
    left: 102%;
    width: 100%;
    height: 100%;
    background-color: #fff;
    background-repeat: no-repeat;
    border-radius: var(--vcp-radius);
    box-shadow: var(--vcp-shadow-lg);
    display: none;
    z-index: 30;
    border: 1px solid var(--vcp-border);
}

/* Mobile */
@media (max-width: 767px) {
    .vcp-gallery.is-layout-grid {
        grid-template-columns: 1fr;
    }

    .vcp-gallery.is-layout-masonry {
        columns: 1;
    }

    .vcp-gallery__arrow {
        width: 32px;
        height: 32px;
        opacity: 1;
        visibility: visible;
    }

    .vcp-gallery__thumbs {
        gap: 8px;
    }

    .vcp-gallery__thumb {
        flex: 0 0 calc(33.333% - 6px);
    }

    .vcp-zoom-result {
        display: none !important;
    }
}