* {
    box-sizing: border-box;
}

/* CONTAINER */
.gallery-container {
    margin: auto;
    width: 100%;
}

/* LAYOUT */
.gallery-slider {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* MAIN IMAGE */
.main-image-wrapper {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

#mainImage {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9; /* ✅ FIX: responsive height */
    object-fit: cover;
    display: block;
}

/* NAV BUTTONS */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    z-index: 2;
}

.slider-nav.prev { left: 10px; }
.slider-nav.next { right: 10px; }

/* THUMBNAILS */
.thumbnails-wrapper {
	width: 160px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-right: 5px;
    aspect-ratio: 2.4 / 9;
}

/* Scrollbar */
.thumbnails-wrapper::-webkit-scrollbar {
    width: 6px;
}
.thumbnails-wrapper::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 10px;
}

/* THUMBNAIL */
.thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.thumbnail img {
    width: 100%;
    height: 131px;
    object-fit: cover;
    display: block;
}

.thumbnail.active {
    border-color: #C4A47C;
}

/* ========================= */
/* 📱 TABLET RESPONSIVE */
/* ========================= */
@media (max-width: 1024px) {

    .thumbnails-wrapper {
        width: 120px;
		height: 350px;
    }

    .thumbnail img {
        height: 80px;
    }
}

/* ========================= */
/* 📱 MOBILE RESPONSIVE */
/* ========================= */
@media (max-width: 767px) {

    .gallery-slider {
        flex-direction: column;
    }

    /* Main image full width */
    .main-image-wrapper {
        width: 100%;
    }

    #mainImage {
        aspect-ratio: 16/9;
    }

    /* Thumbnails horizontal */
    .thumbnails-wrapper {
        width: 100%; height:auto;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px; aspect-ratio: auto;
        padding: 10px 0;
    }

    .thumbnail {
        min-width: 120px;
		height: auto;
    }

    .thumbnail img {
        height: 70px;
    }

    /* Smaller arrows */
    .slider-nav {
        width: 35px;
        height: 35px;
    }
}