/* Vehicle Detail Page - Variant Selector Styles */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Variant Selector Styles */
.variant-selector {
    margin: 12px 0 14px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}
.variant-selector-title {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.variant-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 130px;
}
.variant-option:hover {
    border-color: rgba(201, 158, 88, 0.5);
    background: rgba(201, 158, 88, 0.08);
}
.variant-option.active {
    border-color: var(--color-primary, #C99E58);
    background: rgba(201, 158, 88, 0.12);
}
.variant-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.variant-option.active .variant-color-swatch {
    border-color: var(--color-primary, #C99E58);
    box-shadow: 0 0 0 2px rgba(201, 158, 88, 0.25), 0 1px 4px rgba(0,0,0,0.2);
}
.variant-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.3;
}
.variant-color-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #000;
}
.variant-price {
    font-size: 0.8rem;
    color: var(--color-primary, #C99E58);
    font-weight: 500;
}
.variant-price.promo {
    color: #ff6b00;
    font-weight: 600;
}
.variant-price-original {
    font-size: 0.7rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}
.variant-stock {
    font-size: 0.65rem;
    color: #888;
}
.variant-stock.in-stock {
    color: #22c55e;
}
.variant-stock.request {
    color: #f59e0b;
}
.variant-stock.arriving {
    color: #3b82f6;
}

@media (max-width: 768px) {
    .variant-selector {
        padding: 10px;
        margin: 10px 0 12px;
    }
    .variant-options {
        gap: 6px;
    }
    .variant-option {
        min-width: 100%;
        padding: 8px 10px;
    }
    .vehicle-cta-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .vehicle-cta-buttons .btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .variant-option {
        min-width: 100%;
    }
}

/* ========== GALLERY NAVIGATION & LIGHTBOX ========== */

/* Gallery Navigation */
.gallery-main {
    position: relative; /* Ensure relative positioning for absolute children */
}

.gallery-main-image {
    cursor: zoom-in;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex; /* Hidden by default via JS if 1 image, but flex for layout */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0; /* Hidden by default, shown on hover */
}

.gallery-main:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: var(--color-primary, #C99E58);
    color: #000;
}

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

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    z-index: 10000;
    display: none; /* Hidden by default */
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    transition: color 0.2s ease;
    z-index: 10002;
}

.lightbox-close:hover {
    color: var(--color-primary, #C99E58);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10002;
}

.lightbox-nav:hover {
    background: var(--color-primary, #C99E58);
    color: #000;
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .gallery-nav {
        opacity: 1; /* Always visible on mobile if present */
        width: 36px;
        height: 36px;
    }
    
    .lightbox-nav {
        width: 44px;
        height: 44px;
    }
    
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}
