/* ==========================================================================
   GT&AR STUDIO — VITRINE AUTOMOTIVA LUXURY & PRO
   ========================================================================== */

:root {
    --bg-primario: #0b0d10;
    --bg-tarjeta: #14181f;
    --bg-elevado: #1c222b;
    --borde-metalico: #2a323f;
    --texto-principal: #f4f6f9;
    --texto-secundario: #9ba3b0;
    --acento-principal: #ff5500;
    --acento-verde: #16a34a;
}

body.tema-oro_ejecutivo { --acento-principal: #d4af37; }
body.tema-platino_azul { --acento-principal: #38bdf8; }
body.tema-esmeralda_pro { --acento-principal: #10b981; }
body.tema-rojo_sport { --acento-principal: #ef4444; }
body.tema-carbono_naranja { --acento-principal: #ff5500; }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-primario);
    color: var(--texto-principal);
    padding-top: 140px;
    padding-bottom: 20px;
}

/* HEADER DE 3 NIVELES */
.header-principal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(11, 13, 16, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--borde-metalico);
    padding: 10px 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-nivel-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* CONTENEDOR DE LOGOTIPO LIBRE (Sin recuadros limitantes, adaptable a cualquier proporción) */
.logo-concesionario {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: transparent;
    border: none;
    padding: 0;
    height: 48px;
    max-width: 180px;
}

.logo-concesionario img {
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
    display: block;
}

.btn-whatsapp-header {
    background: var(--acento-verde);
    color: #ffffff;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-nivel-2 { text-align: center; }
.header-nivel-2 h1 {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: none;
    border: none;
}

.header-nivel-3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-bottom: 2px;
}
.header-nivel-3 p {
    font-size: 11px;
    color: var(--texto-secundario);
    font-style: italic;
    background: none;
    border: none;
}

.btn-icon-search {
    background: var(--bg-elevado);
    border: 1px solid var(--borde-metalico);
    color: var(--texto-principal);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* BUSCADOR DESPLEGABLE */
.search-bar-box {
    position: fixed;
    top: 135px;
    left: 0;
    right: 0;
    background: var(--bg-tarjeta);
    padding: 10px;
    border-bottom: 1px solid var(--borde-metalico);
    z-index: 999;
}
.search-bar-box input {
    width: 100%;
    background: var(--bg-primario);
    border: 1px solid var(--borde-metalico);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

/* CONTENEDOR PRINCIPAL */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

/* HERO MEDIA */
.hero-banner {
    position: relative;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--borde-metalico);
    margin-bottom: 24px;
    background: var(--bg-tarjeta);
}
.hero-banner video, .hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 13, 16, 0.9) 0%, rgba(11, 13, 16, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}
.hero-overlay h2 { font-size: 16px; font-weight: 800; margin-bottom: 4px; color: #ffffff; }
.hero-overlay p { font-size: 12px; color: var(--texto-secundario); }

/* PARED DE MARCAS */
.brand-wall-section { margin-bottom: 24px; }
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-header-row h2 { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.stock-counter {
    font-size: 11px;
    color: var(--texto-secundario);
    background: var(--bg-elevado);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid var(--borde-metalico);
}
.brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.brand-btn {
    background: linear-gradient(145deg, #181d26, #11141a);
    border: 1px solid var(--borde-metalico);
    color: var(--texto-secundario);
    padding: 10px 6px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.brand-btn svg { color: currentColor; transition: transform 0.2s ease; }
.brand-btn:hover, .brand-btn.activo {
    border-color: var(--acento-principal);
    background: #1f2633;
    color: #ffffff;
}
.brand-btn:hover svg, .brand-btn.activo svg {
    color: var(--acento-principal);
    transform: scale(1.08);
}

/* ESCAPARATE DE DESTACADOS */
.escaparate-section { margin-bottom: 28px; }
.escaparate-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}
.vehicle-card-featured {
    background: var(--bg-tarjeta);
    border: 1px solid var(--borde-metalico);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.vehicle-card-featured:hover { border-color: var(--acento-principal); }
.featured-thumb {
    position: relative;
    width: 100%;
    height: 190px;
    background: #000;
}
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--acento-principal);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.featured-info { padding: 16px; }
.featured-info h3 { font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.featured-specs { font-size: 13px; color: var(--texto-secundario); margin-bottom: 12px; }
.featured-bottom { display: flex; justify-content: space-between; align-items: center; }
.featured-price { font-size: 20px; font-weight: 800; color: #fff; }
.btn-featured-ver {
    background: var(--acento-principal);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

/* BOTÓN MAESTRO DE ACCESO AL STOCK */
.cta-stock-container { text-align: center; margin: 30px 0 20px 0; }
.btn-stock-completo {
    background: linear-gradient(135deg, var(--acento-principal), #b93c00);
    color: #fff;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.3);
    transition: transform 0.2s ease;
}
.btn-stock-completo:hover { transform: translateY(-2px); }

/* LISTADO DE VEHÍCULOS COMPACTO */
.vehiculos-grid { display: flex; flex-direction: column; gap: 12px; }
.vehicle-card-compact {
    background: var(--bg-tarjeta);
    border: 1px solid var(--borde-metalico);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.vehicle-card-compact:hover { border-color: #424f63; background: #181d26; }
.card-thumb {
    position: relative;
    width: 120px;
    height: 85px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-badge-mini {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--acento-principal);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}
.card-info {
    flex: 1;
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 3px; color: var(--texto-principal); line-height: 1.2; }
.card-specs-mini { font-size: 12px; color: var(--texto-secundario); margin-bottom: 8px; }
.card-bottom-row { display: flex; align-items: center; justify-content: space-between; }
.card-price-mini { font-size: 17px; font-weight: 800; color: #ffffff; }
.btn-mini-ver {
    background: rgba(22, 163, 74, 0.15);
    color: #22c55e;
    border: 1px solid rgba(22, 163, 74, 0.3);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* PAGINACIÓN */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 12px 0;
    border-top: 1px solid var(--borde-metalico);
}
.btn-page {
    background: var(--bg-elevado);
    color: var(--texto-principal);
    border: 1px solid var(--borde-metalico);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.btn-page:disabled { opacity: 0.4; cursor: not-allowed; }
.page-indicator { font-size: 13px; color: var(--texto-secundario); font-weight: 600; }

/* FOOTER INSTITUCIONAL */
.footer-institucional {
    background: var(--bg-tarjeta);
    border-top: 1px solid var(--borde-metalico);
    padding: 24px 16px 80px 16px;
    margin-top: 40px;
    color: var(--texto-secundario);
    font-size: 12px;
}
.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}
.footer-content h3 { color: var(--texto-principal); font-size: 14px; font-weight: 700; }
.footer-powered {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--borde-metalico);
    font-size: 11px;
    color: #64748b;
}

/* NAVEGACIÓN INFERIOR */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(11, 13, 16, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--borde-metalico);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}
.nav-item {
    color: var(--texto-secundario);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}
.nav-item.active, .nav-item:hover { color: var(--acento-principal); }

/* VISOR MODAL */
.visor-modal {
    position: fixed;
    inset: 0;
    background: var(--bg-primario);
    z-index: 2000;
    display: none;
    flex-direction: column;
}
.visor-modal.activo { display: flex; }
.visor-header {
    height: 52px;
    background: var(--bg-tarjeta);
    border-bottom: 1px solid var(--borde-metalico);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}
.btn-voltar-visor {
    background: var(--bg-elevado);
    color: var(--texto-principal);
    border: 1px solid var(--borde-metalico);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.visor-iframe { flex: 1; width: 100%; border: none; background: #000; }