﻿/* =========================================================================================
   STEP E: CSS MAIN GLOBAL (main.css)
   PROYECTO: Dongfeng Schubert Auto Panamá
   DISEÑO: Dark Theme, Glassmorphism, Premium Automotive (Tesla-killer)
========================================================================================= */

/* --- 1. FONTS & ROOT VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --df-red: #DF2027;
    --df-red-hover: #C41C22;
    --df-red-light: rgba(223, 32, 39, 0.15);
    /* Backgrounds (Dark Theme) */
    --bg-body: #080C13;
    --bg-surface: #101520;
    --bg-surface-light: #1A202D;
    /* Glassmorphism */
    --bg-glass: rgba(16, 21, 32, 0.7);
    --bg-glass-light: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    /* Typography Colors */
    --text-main: #FFFFFF;
    --text-muted: #8E9BAE;
    --text-dark: #000000;
    /* Badges */
    --badge-blue: #1B4D8A;
    --badge-green: #2A5A3B;
    --badge-teal: #1A6358;
    --badge-gray: #4A5568;
    /* Structure */
    --font-family: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 50px;
    /* Z-Index Layers */
    --z-back: -1;
    --z-normal: 1;
    --z-nav: 1000;
    --z-modal: 2000;
}

/* --- 2. BASE & RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Selection */
::selection {
    background-color: var(--df-red);
    color: white;
}

/* --- 3. TYPOGRAPHY UTILITIES --- */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--df-red) !important;
}

.text-white {
    color: var(--text-main) !important;
}

.fw-light {
    font-weight: 300 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fs-sm {
    font-size: 0.85rem !important;
}

.fs-lg {
    font-size: 1.15rem !important;
}

/* --- 4. BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
    white-space: nowrap;
}

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        pointer-events: none;
    }

/* Primary (Red) */
.btn-primary {
    background-color: var(--df-red);
    color: var(--text-main);
}

    .btn-primary:hover {
        background-color: var(--df-red-hover);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(223, 32, 39, 0.3);
    }

/* Outline (Glass) */
.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--border-glass-hover);
}

    .btn-outline:hover {
        background-color: var(--bg-glass-light);
        border-color: var(--text-main);
        transform: translateY(-2px);
    }

/* Ghost (Text only) */
.btn-ghost {
    background: transparent;
    color: var(--text-main);
    padding: 8px 16px;
}

    .btn-ghost:hover {
        color: var(--df-red);
        background: rgba(223, 32, 39, 0.05);
    }

/* White (High contrast) */
.btn-white {
    background-color: var(--text-main);
    color: var(--text-dark);
    font-weight: 600;
}

    .btn-white:hover {
        background-color: #F1F1F1;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(255,255,255,0.2);
    }

/* --- 5. FORMS & INPUTS --- */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control, .form-select {
    width: 100%;
    background: var(--bg-surface-light);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

    .form-control::placeholder {
        color: #4A5568;
    }

    .form-control:focus, .form-select:focus {
        border-color: var(--df-red);
        background: rgba(255,255,255,0.05);
        box-shadow: 0 0 0 4px var(--df-red-light);
    }

/* Custom Select Dropdown Arrow */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238E9BAE' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* Ranges (Sliders) */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

    input[type=range]:focus {
        outline: none;
    }

    input[type=range]::-webkit-slider-runnable-track {
        width: 100%;
        height: 6px;
        cursor: pointer;
        background: var(--border-glass-hover);
        border-radius: 3px;
    }

    input[type=range]::-webkit-slider-thumb {
        height: 20px;
        width: 20px;
        border-radius: 50%;
        background: var(--text-main);
        cursor: pointer;
        -webkit-appearance: none;
        margin-top: -7px;
        border: 2px solid var(--df-red);
        box-shadow: 0 0 10px rgba(0,0,0,0.5);
        transition: transform 0.2s;
    }

        input[type=range]::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }

/* --- 6. GLASSMORPHISM CARDS --- */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .glass-card:hover {
        border-color: var(--border-glass-hover);
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    }

/* Glass Panels (High blur) */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
}

/* --- 7. BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-popular {
    background-color: var(--badge-blue);
    color: white;
}

.badge-eco {
    background-color: var(--badge-green);
    color: white;
}

.badge-electric {
    background-color: var(--badge-teal);
    color: white;
}

.badge-new {
    background-color: var(--badge-gray);
    color: white;
}

.badge-hybrid {
    background-color: transparent;
    border: 1px solid #4ADE80;
    color: #4ADE80;
}

.badge-ai {
    background: var(--df-red-light);
    color: #FF8A8E;
    border: 1px solid rgba(223, 32, 39, 0.3);
}

/* --- 8. ANIMATIONS & EFFECTS --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

    .fade-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* Floating WhatsApp Button */
.fab-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: var(--z-modal);
    transition: var(--transition);
}

    .fab-whatsapp:hover {
        transform: scale(1.1) translateY(-5px);
        color: white;
    }

/* Scrollbar Customization (Webkit) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: #252E3E;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }

/* --- 9. UTILITIES (Spacing & Layout) --- */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 80px 0;
}

.pt-100 {
    padding-top: 100px;
}

.pb-100 {
    padding-bottom: 100px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-40 {
    margin-bottom: 40px;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-8 {
    gap: 8px;
}

.gap-16 {
    gap: 16px;
}

.gap-24 {
    gap: 24px;
}

.gap-32 {
    gap: 32px;
}

/* Grid System basic */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 991px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: repeat(1, 1fr);
    }

    .section-padding {
        padding: 60px 0;
    }

    .container {
        padding: 0 16px;
    }
}

/* --- FIX PARA LAS OPCIONES DE LOS DROPDOWNS --- */
.form-select option {
    background-color: #101520; /* Fondo oscuro sólido (No soporta transparencia) */
    color: #FFFFFF; /* Texto blanco */
    padding: 10px;
}
