/* ========== GALLERY CSS - DARK THUMBNAILS & LIGHTBOX ========== */

/* Product Gallery Container */
.product-gallery-container {
    position: relative;
    width: 100%;
    background: #000000;
    overflow: hidden;
}

/* Main Image Area */
.gallery-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    cursor: pointer;
}

.main-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-main-image:hover .main-product-img {
    transform: scale(1.05);
}

/* Expand Button */
.expand-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .expand-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

.expand-btn:hover {
    background: var(--tesla-red);
    transform: scale(1.1);
}

/* Image Counter Badge */
.image-counter-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 15;
    color: white;
}

@media (min-width: 768px) {
    .image-counter-badge {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

.image-counter-badge i {
    margin-right: 5px;
    color: var(--tesla-red);
}

/* Thumbnail Strip */
.thumbnail-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.7);
    position: relative;
}

@media (min-width: 768px) {
    .thumbnail-strip {
        gap: 12px;
        padding: 12px 15px;
    }
}

.thumbnail-strip::-webkit-scrollbar {
    height: 3px;
}

.thumbnail-strip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: var(--tesla-red);
    border-radius: 10px;
}

/* Thumbnail Items */
.thumbnail-item {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .thumbnail-item {
        width: 80px;
        height: 80px;
        border-radius: 12px;
    }
}

.thumbnail-item.active {
    border-color: var(--tesla-red);
    box-shadow: 0 0 12px rgba(220, 20, 60, 0.5);
}

.thumbnail-item:hover {
    transform: translateY(-3px);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.lightbox-modal.active {
    visibility: visible;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--tesla-red);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 15px;
}

@media (min-width: 768px) {
    .lightbox-prev {
        left: 30px;
    }
}

.lightbox-next {
    right: 15px;
}

@media (min-width: 768px) {
    .lightbox-next {
        right: 30px;
    }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 30px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

.lightbox-close:hover {
    background: var(--tesla-red);
    transform: scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: white;
    font-weight: 600;
}

@media (min-width: 768px) {
    .lightbox-counter {
        bottom: 25px;
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}