/* Carousel Container */
.property-gallery-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 140px auto 40px;
    /* Top margin for fixed header */
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Main Display Area */
.gallery-main {
    position: relative;
    width: 100%;
    max-width: 100%;
    /* Prevent overflow */
    height: 600px;
    /* Adjust based on preference */
    overflow: hidden;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    height: 100%;
    width: 100%;
    /* Constrain width */
}

.gallery-slide {
    min-width: 100%;
    max-width: 100%;
    /* Prevent overflow */
    height: 100%;
    position: relative;
}

.gallery-slide img {
    width: 100%;
    max-width: 100%;
    /* Prevent overflow */
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Navigation Buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-nav svg {
    width: 24px;
    height: 24px;
    fill: #000;
}

/* Thumbnails (Optional strip at bottom) */
.gallery-thumbs {
    display: flex;
    gap: 10px;
    padding: 16px;
    overflow-x: auto;
    background: #111;
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
    max-width: 100%;
    /* Prevent overflow */
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    overflow: hidden;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover {
    opacity: 0.9;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .property-gallery-container {
        margin: 100px 8px 20px;
        /* Mobile margins */
        border-radius: 12px;
        max-width: calc(100vw - 16px);
        /* Prevent overflow */
    }

    .gallery-main {
        height: 350px;
        max-width: 100%;
        overflow: hidden;
    }

    .gallery-track {
        max-width: 100%;
    }

    .gallery-slide {
        max-width: 100%;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .gallery-thumb {
        width: 60px;
        height: 45px;
    }

    .gallery-thumbs {
        padding: 12px;
        max-width: 100%;
    }
}