/* ==========================================================================
   SISTEMA DE DISEÑO DE ALTA GAMA - VA DEL VALLE AUTOMOTORES
   Inspirado en L'Effort (Premium Dark Architecture)
   ========================================================================== */

:root {
    --text-dark: #111111;
    --text-muted-custom: #8e8e93;
}

/* ==========================================================================
   CONFIGURACIÓN DE TEMAS DINÁMICOS (Premium & Albiceleste)
   ========================================================================== */

/* 💎 TEMA POR DEFECTO: Premium Dark & Crimson Red (Estilo L'Effort Original) */
body.theme-default {
    --primary-color: #e11d48; /* Rojo Deportivo Premium (Estilo Brembo) */
    --bg-main: #0b0b0c; /* Fondo general ultra oscuro */
    --bg-card: #141416; /* Fondo de tarjeta gris estudio */
    --border-color: #232326; /* Líneas divisorias sutiles */
    --text-main: #ffffff; /* Tipografía principal */
    --text-muted: #8e8e93; /* Subtítulos y fichas técnicas */
    --btn-hover-text: #000000;
    --badge-bg-hover: #e11d48;
    --badge-bg: #e11d48;
    --badge-text: #ffffff;
}

/* 🇦🇷 TEMA SELECCIÓN: Albiceleste Premium (Mismo layout, mística de Campeón) */
body.theme-argentina {
    --primary-color: #74ACDF; /* Celeste AFA */
    --bg-main: #0d141b; /* Azul noche de la indumentaria alternativa */
    --bg-card: #17222d; /* Tarjeta adaptada al azul noche */
    --border-color: #243443; /* Líneas de acento azuladas */
    --text-main: #ffffff;
    --text-muted: #a0b2c6;
    --btn-hover-text: #0d233a;
    --badge-bg-hover: #F6B426; /* Dorado de campeón mundial */
    --badge-bg: #F6B426;
    --badge-text: #0d141b; /* Texto oscuro sobre el sol dorado */
}

/* ==========================================================================
   CONFIGURACIONES NATIVAS DE ASP.NET CORE (Optimizadas y Responsivas)
   ========================================================================== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main) !important; /* Ahora el fondo muta según el tema */
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease;
}

/* Rediseño de focos: Anillo nítido premium */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus,
.form-check-input:focus, .form-select:focus {
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* TIPOGRAFÍA */
h1, h2, h3, h4, h5, h6, .logo-premium {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* FONDOS UTILITIES DENSOS */
.bg-black-premium {
    background-color: var(--bg-main) !important;
    transition: background-color 0.5s ease;
}

/* NAVBAR (Navegación de Alta Gama) */
.logo-premium {
    letter-spacing: 3px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main) !important;
}

.nav-link-premium {
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--text-muted) !important;
    transition: color 0.3s ease;
}

    .nav-link-premium:hover {
        color: var(--primary-color) !important;
    }

.header-border {
    border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   BOTONES CON CARÁCTER
   ========================================================================== */
.btn-premium-sm {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    background: transparent;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

    .btn-premium-sm:hover {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
        transform: scale(1.02);
    }

.btn-action-dark {
    background: var(--primary-color) !important;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

    .btn-action-dark:hover {
        background: #ffffff !important;
        color: var(--btn-hover-text) !important;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

/* ==========================================================================
   TARJETAS DE VEHÍCULOS (Efecto L'Effort Premium Showroom)
   ========================================================================== */
.showroom-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .showroom-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
        border-color: var(--primary-color) !important; /* El borde se ilumina con el color del tema */
    }

/* Contenedor e Imagen del Auto (Relación 16:9 limpia) */
.img-container-premium {
    overflow: hidden;
    position: relative;
    background-color: #000;
    aspect-ratio: 16 / 9;
}

    .img-container-premium img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    }

.showroom-card:hover .img-container-premium img {
    transform: scale(1.04);
    opacity: 0.95;
}

/* Botón de Consulta de Ancho Completo (Estilo L'Effort Interactivo) */
.btn-leffort-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.showroom-card:hover .btn-leffort-action {
    background-color: var(--primary-color);
    color: var(--bg-main);
    border-color: var(--primary-color);
}

/* ==========================================================================
   BADGES MINIMALISTAS (Ubicados de forma elegante sobre la foto)
   ========================================================================== */
.badge-premium-dark {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7 rem;
    letter-spacing: 1px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 3;
    transition: all 0.3s ease;
}

.showroom-card:hover .badge-premium-dark {
    background: var(--badge-bg-hover);
    color: var(--bg-main);
}

/* Las tres estrellas doradas (Modo Selección) */
.stars-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #F6B426;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    box-shadow: 0 0 10px rgba(246, 180, 38, 0.3);
    z-index: 3;
}

/* ==========================================================================
   ACCIONES INTERNAS DEL PANEL DE STOCK (Botones Premium)
   ========================================================================== */
.btn-group-premium {
    display: inline-flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.btn-view {
    background-color: #2196F3;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

    .btn-view:hover {
        background-color: #0b7dda;
        transform: translateY(-1px);
    }

.btn-edit {
    background-color: #D4AF37;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.2);
}

    .btn-edit:hover {
        background-color: #AA7C11;
        transform: translateY(-1px);
    }

.btn-delete {
    background-color: #e74c3c;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

    .btn-delete:hover {
        background-color: #c0392b;
        transform: translateY(-1px);
    }

/* ==========================================================================
   FIX DE CONTRASTE Y PANTALLAS ADMINISTRATIVAS
   ========================================================================== */
.card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}

    .card text-muted, .text-secondary {
        color: var(--text-muted) !important;
    }

.form-control-premium {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}

/* ==========================================================================
   ANIMACIONES EFECTOS ESPECIALES (CONFIDENCIAL AFA)
   ========================================================================== */
body.theme-argentina .pelota-mundialista {
    display: block;
}

body:not(.theme-argentina) .pelota-mundialista {
    display: none;
}

.pelota-mundialista {
    position: fixed;
    bottom: 90px;
    right: 25px;
    font-size: 2.8rem;
    z-index: 9999;
    pointer-events: none;
    animation: bouncePelota 1.4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

@keyframes bouncePelota {
    0%, 100% {
        transform: translateY(0) scaleX(1) scaleY(1);
    }

    45% {
        transform: translateY(-70px) scaleX(1) scaleY(1);
    }

    90% {
        transform: translateY(0) scaleX(1) scaleY(1);
    }

    95% {
        transform: translateY(3px) scaleX(1.15) scaleY(0.85);
    }
}
