/* Gallery Wrapper */
.vs-gallery-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Gallery Grid - Airbnb Style */
.vs-gallery-grid.airbnb {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
}

/* Main Image */
.vs-gallery-grid.airbnb .vs-gallery-main {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

/* Gallery Items */
.vs-gallery-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    margin: 0;
    padding: 0;
}

.vs-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    margin: 0;
    padding: 0;
    display: block;
}

/* Remove hover zoom effect */
.vs-gallery-item:hover img {
    transform: none;
}

/* Show More Button */
.vs-gallery-more {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.vs-gallery-more:hover {
    background: #f7f7f7;
}

/* Modal */
.vs-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
}

.vs-gallery-modal.active {
    display: block;
}

.vs-gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vs-gallery-modal-images {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vs-gallery-modal-images img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100% - 120px);
    max-height: calc(100% - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.vs-gallery-modal-images img.active {
    opacity: 1;
    pointer-events: auto;
}

/* Navigation Arrows */
.vs-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.vs-gallery-prev {
    left: 20px;
}

.vs-gallery-next {
    right: 20px;
}

.vs-gallery-nav:hover {
    background: #f7f7f7;
}

/* Close Button */
.vs-gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 9999;
    pointer-events: auto;
}

.vs-gallery-close:hover {
    background: #f7f7f7;
}

/* Responsive */
@media (max-width: 768px) {
    .vs-gallery-wrapper {
        margin: 0;
        padding: 0;
    }

    .vs-gallery-grid.airbnb {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        height: auto;
        border-radius: 8px;
        margin: 0;
        padding: 0;
    }

    .vs-gallery-grid.airbnb .vs-gallery-main {
        grid-column: 1 / 3;
        grid-row: 1;
        margin: 0;
        padding: 0;
    }

    .vs-gallery-grid.airbnb .vs-gallery-item {
        margin: 0;
        padding: 0;
    }

    .vs-gallery-grid.airbnb .vs-gallery-item:nth-child(n+4) {
        display: none;
    }

    .vs-gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        margin: 0;
        padding: 0;
    }

    .vs-gallery-more {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 6px;
    }

    /* Modal adjustments for mobile */
    .vs-gallery-modal-images img {
        max-width: calc(100% - 40px);
        max-height: calc(100% - 120px);
    }

    .vs-gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .vs-gallery-prev {
        left: 10px;
    }

    .vs-gallery-next {
        right: 10px;
    }

    .vs-gallery-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .vs-gallery-wrapper {
        margin: 0;
        padding: 0;
    }

    .vs-gallery-grid.airbnb {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .vs-gallery-grid.airbnb .vs-gallery-main,
    .vs-gallery-grid.airbnb .vs-gallery-item,
    .vs-gallery-grid.airbnb .vs-gallery-item:not(.vs-gallery-main) {
        width: 100%;
        aspect-ratio: unset;
        height: auto;
    }

    .vs-gallery-item img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .vs-gallery-grid.airbnb .vs-gallery-item:nth-child(n+3) {
        display: none;
    }

    .vs-gallery-modal-images img {
        max-width: calc(100% - 20px);
        max-height: calc(100% - 100px);
    }

    .vs-gallery-nav {
        width: 32px;
        height: 32px;
        font-size: 18px;
        background: rgba(255, 255, 255, 0.8);
    }

    .vs-gallery-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
        background: rgba(255, 255, 255, 0.8);
    }
} 