﻿
.property-gallery {
    width: 100%;
    max-width: 1450px;
    margin: 30px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* MAIN IMAGE */

.gallery-main {
    width: 100%;
    height: 570px;
    background: #171c22;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* MAIN IMAGE ARROWS */

.main-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,0.95);
    color: #ff9900;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.main-prev {
    left: 15px;
}

.main-next {
    right: 15px;
}

.main-arrow:hover,
.thumb-arrow:hover {
    background: #ff9900;
    color: white;
}

/* IMAGE COUNTER */

.image-counter {
    position: absolute;
    bottom: 15px;
    right: 20px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 13px;
}

/* THUMBNAIL CONTAINER */

.gallery-thumbnails-wrapper {
    margin-top: 20px;
    position: relative;
}

.gallery-thumbnails {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

    .gallery-thumbnails::-webkit-scrollbar {
        display: none;
    }

/* FOUR THUMBNAILS */

.gallery-thumb {
    flex: 0 0 calc((100% - 60px) / 4);
    height: 195px;
    border-radius: 14px;
    background: #202930;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    scroll-snap-align: start;
    border: 3px solid transparent;
    transition: border-color 0.2s ease;
}

    .gallery-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .gallery-thumb.active {
        border-color: #ff9900;
    }

    .gallery-thumb:hover {
        border-color: #ff9900;
    }

/* THUMBNAIL ARROWS */

.thumb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: white;
    color: #ff9900;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.thumb-prev {
    left: -22px;
}

.thumb-next {
    right: -22px;
}

/* TABLET */

@media (max-width: 991px) {
    .gallery-main {
        height: 430px;
    }

    .gallery-thumb {
        flex-basis: calc((100% - 20px) / 2);
        height: 170px;
    }
}

/* MOBILE */

@media (max-width: 576px) {
    .property-gallery {
        margin: 15px auto;
        padding: 0 12px;
    }

    .gallery-main {
        height: 270px;
        border-radius: 10px;
    }

    .gallery-thumbnails {
        gap: 10px;
    }

    .gallery-thumb {
        flex-basis: calc((100% - 10px) / 2);
        height: 110px;
        border-radius: 8px;
    }

    .main-arrow {
        width: 34px;
        height: 34px;
    }

    .thumb-arrow {
        width: 35px;
        height: 35px;
    }

    .thumb-prev {
        left: -8px;
    }

    .thumb-next {
        right: -8px;
    }
}
