/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    padding: 20px;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    gap: 20px; /* Spacing between slides */
}

.carousel-slide {
    /* Show 3 slides: (100% - (2 * 20px gap)) / 3 */
    min-width: calc(33.333% - 13.333px);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px; /* Slightly smaller for grid view */
}

@media (max-width: 1024px) {
    .carousel-slide {
        /* Show 2 slides: (100% - 20px gap) / 2 */
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 640px) {
    .carousel-slide {
        /* Show 1 slide */
        min-width: 100%;
    }
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: pointer; /* Indicate zoomable */
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--blue);
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-btn.hidden {
    display: none;
}

/* Indicators */
.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 15px 0 0 0;
    gap: 8px;
    flex-wrap: wrap;
}

.carousel-indicator {
    border: none;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    background: var(--border-color);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-indicator.current-slide {
    background: var(--blue);
}

/* Modal for Image Zoom */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 2002;
}

.image-modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    z-index: 2001;
    transition: color 0.2s;
}

.image-modal-btn:hover {
    color: white;
}

.image-modal-btn.prev { left: 20px; }
.image-modal-btn.next { right: 20px; }
