/* ============================================
   MCO Motors - Galería Premium
   ============================================ */

/* === MAIN IMAGE === */
.gallery-main {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.gallery-main img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}

.gallery-main:hover img {
    transform: scale(1.02);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.gallery-overlay > * {
    pointer-events: auto;
}

.gallery-counter {
    font-size: var(--font-size-sm);
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
}

.gallery-fullscreen {
    font-size: var(--font-size-sm);
    color: #fff;
    background: rgba(0,0,0,0.5);
    border: none;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    backdrop-filter: blur(4px);
    transition: background var(--transition-fast);
}

.gallery-fullscreen:hover {
    background: rgba(0,0,0,0.7);
}

/* === THUMBNAIL TABS === */
.gallery-tabs {
    display: flex;
    gap: var(--space-xs);
    margin: var(--space-md) 0;
    flex-wrap: wrap;
}

.gallery-tab {
    padding: var(--space-xs) var(--space-md);
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-transform: capitalize;
    transition: all var(--transition-fast);
}

.gallery-tab:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.gallery-tab.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* === THUMBNAILS STRIP === */
.gallery-thumbs {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all var(--transition-fast);
}

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

.gallery-thumb.active {
    border-color: var(--accent);
    opacity: 1;
}

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

/* === LIGHTBOX === */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: var(--font-size-2xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    z-index: 3;
    backdrop-filter: blur(4px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-counter {
    position: absolute;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    z-index: 3;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    user-select: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: var(--font-size-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    backdrop-filter: blur(4px);
    z-index: 3;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: var(--space-lg);
}

.lightbox-next {
    right: var(--space-lg);
}

/* === VEHICLE INFO SIDEBAR ENHANCEMENTS === */
.vehicle-price-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.vehicle-price-main {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    margin-bottom: var(--space-xs);
}

.vehicle-price-secondary {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.vehicle-badges {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.vehicle-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.vehicle-year {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-left: var(--space-sm);
    vertical-align: middle;
}

.vehicle-description {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.8;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.vehicle-cta {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border);
    margin-top: var(--space-lg);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .gallery-main img {
        aspect-ratio: 16 / 9;
    }

    .gallery-thumb {
        width: 64px;
        height: 44px;
    }

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

    .lightbox-prev { left: var(--space-sm); }
    .lightbox-next { right: var(--space-sm); }

    .lightbox-close {
        top: var(--space-md);
        right: var(--space-md);
    }

    .vehicle-title {
        font-size: var(--font-size-xl);
    }

    .vehicle-price-main {
        font-size: var(--font-size-2xl);
    }
}
