/* ============================================
   ELITE MOTORS — Estilos
   ============================================ */

/* --- Custom Font --- */
@font-face {
    font-family: "myfont";
    src: url(/uploads/mifuente.ttf);
}

/* --- Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: rgba(5, 5, 5, 1);
}

/* ============================================
   1. NAVBAR
   ============================================ */
.navbar {
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 320px;
    border-bottom: 0.5px solid rgb(255 255 255 / 0.1);
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(6px);
}

.logo {
    font-family: 'Syne', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.6px;
    text-transform: uppercase;
    color: white;
}

.menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.menu a {
    color: rgba(156, 163, 175, 1);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.menu a:hover {
    color: white;
}

.menu a.activo {
    color: white;
}

/* FIX: Boton hamburguesa oculto en desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
}

.menu-toggle .material-symbols-outlined {
    font-size: 28px;
}

/* ============================================
   2. HERO SECTION
   ============================================ */
.hero {
    height: 100vh;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 60px;
    background:
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 1) 80%,
            rgba(5, 5, 5, 1) 100%),
        url(/uploads/fondo2.jpg);
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    color: white;
    font-size: 4.3rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    letter-spacing: -0.6px;
    text-transform: uppercase;
    margin-top: -120px;
}

.hero-content span {
    color: white;
    font-size: 4.3rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    letter-spacing: -0.6px;
    text-transform: uppercase;
}

.hero-content p {
    color: rgb(196, 196, 196);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 1.35rem;
    margin-top: 10px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.btn-catalogo {
    background-color: #ffffff;
    color: black;
    font-weight: 600;
    padding: 19px 31px;
    border-radius: 50px;
    font-size: 17px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 10px;
    margin-right: 3px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: black;
}

.btn-catalogo:hover {
    background-color: rgb(201, 201, 201);
    transform: scale(1.05);
}

.btn-contacto {
    background-color: transparent;
    color: rgb(255, 255, 255);
    font-weight: 500;
    padding: 19px 31px;
    border-radius: 50px;
    font-size: 17px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 10px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.205);
    transition: all 0.3s ease;
}

.btn-contacto:hover {
    background-color: rgba(255, 255, 255, 0.205);
}

/* ============================================
   3. SHOWROOM / CATÁLOGO
   ============================================ */
.showroom {
    max-width: 1300px;
    margin: 80px auto 60px;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

.showroom-h2 {
    color: #ffffff;
    font-size: 3rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    letter-spacing: -0.6px;
    text-transform: uppercase;
}

.showroom-p {
    color: rgba(156, 163, 175, 1);
    font-size: 1.1rem;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

/* FIX: Header del catalogo (titulo a la izq, boton filtros a la der) */
.catalogo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.catalogo-header h2 {
    color: #ffffff;
    font-size: 3rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    letter-spacing: -0.6px;
    text-transform: uppercase;
}

.catalogo-subtitulo {
    color: rgba(156, 163, 175, 1);
    font-size: 1.05rem;
    margin-top: 6px;
}

.catalogo-page {
    margin-top: 120px;
}

/* --- Grid de Autos --- */
.grid-autos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* --- Tarjeta de Auto --- */
/* FIX: Se quitaron width y height fijos para que el grid funcione */
.card {
    background: #141414;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #1b1b1b;
}

.card:hover {
    border: 1px solid #3a3a3a;
}

.card-img {
    height: 320px;
    background-size: cover;
    background-position: center;
    filter: brightness(0.9) contrast(1.1);
    transition: all 0.7s ease;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-info {
    padding: 25px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.marca {
    font-family: 'Syne', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: -0.6px;
    text-transform: uppercase;
    color: #aaa;
}

.modelo {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.6px;
    text-transform: uppercase;
    color: white;
    margin: -5px 0;
}

.price {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.6px;
    color: #e63946;
}

.specs {
    font-weight: 200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 25px;
    color: #ccc;
}

/* FIX: Estilos para iconos dentro de specs */
.specs span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.specs .material-symbols-outlined {
    font-size: 1rem;
    color: #666;
}

.spec-item:hover i {
    color: #e63946;
}

.btn-details {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
    padding: 15px 30px;
    margin-top: 10px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 16px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.btn-details:hover {
    background-color: #fff;
    color: #0a0a0a;
}

/* Estado vacio */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-state p {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 15px;
}

.empty-state a {
    color: #4a9eff;
    font-weight: 600;
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* ============================================
   4. FOOTER
   ============================================ */
.footer {
    background: rgba(5, 5, 5, 1);
    padding: 29px;
    text-align: center;
    margin-top: 80px;
    border-top: 0.5px solid rgb(255 255 255 / 0.1);
}

.footer-item {
    flex: 1;
    min-width: 250px;
}

.footer-item p {
    color: rgba(156, 163, 175, 1);
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 1.15rem;
    margin-bottom: 10px;
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
}

/* ============================================
   5. ADMIN PANEL
   ============================================ */
.admin-title {
    font-family: "myfont";
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
    letter-spacing: 2px;
}

.admin-container {
    max-width: 600px;
    margin: 50px auto;
    border: 1px solid #252525;
    background: #0f0f0f;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 100px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #c5c2c2;
    font-weight: 400;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #363636;
    background-color: #1b1b1b;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 400;
    color: #757474;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #ffffff;
    color: black;
    border-radius: 50px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 10px;
    margin-right: 3px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: black;
}

.btn-submit:hover {
    background-color: rgb(201, 201, 201);
    transform: scale(1.05);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
}

/* ============================================
   6. LOGIN
   ============================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.login-box {
    background: #0f0f0f;
    border: 1px solid #1f1f1f;
    padding: 50px 40px;
    border-radius: 16px;
    text-align: center;
    width: 100%;
    max-width: 380px;
}

.login-logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #555;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.login-box h2 {
    color: white;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.login-error {
    color: #e63946;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 16px;
}

.login-box input {
    padding: 14px;
    width: 100%;
    border: 1px solid #2a2a2a;
    background: #1a1a1a;
    color: white;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.login-box input:focus {
    outline: none;
    border-color: #4a9eff;
}

.login-box button {
    padding: 14px;
    width: 100%;
    background: white;
    color: black;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-box button:hover {
    background: rgb(220, 220, 220);
    transform: scale(1.03);
}

/* ============================================
   7. FILTROS COLAPSABLES (Catálogo)
   ============================================ */

/* Boton toggle "Filtros" */
.filtro-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #141414;
    color: #fff;
    border: 1px solid #2a2a2a;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filtro-toggle-btn:hover {
    background: #1f1f1f;
    border-color: #3a3a3a;
}

.filtro-toggle-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Panel de filtros (oculto por defecto) */
.filtros-panel {
    display: none;
    margin-bottom: 35px;
    padding: 30px;
    background: #0f0f0f;
    border: 1px solid #1f1f1f;
    border-radius: 14px;
}

.filtros-panel.abierto {
    display: block;
}

/* Header del panel: titulo + boton cerrar */
.filtros-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.filtros-header h3 {
    color: white;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.filtros-cerrar {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.3s;
}

.filtros-cerrar:hover {
    color: white;
}

/* Grid de campos de filtro: 3 columnas */
.filtros-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filtro-grupo label {
    font-size: 0.8rem;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filtro-grupo select,
.filtro-grupo input {
    padding: 12px 14px;
    border: 1px solid #2a2a2a;
    background-color: #1a1a1a;
    color: #ccc;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.filtro-grupo select {
    appearance: none;
    cursor: pointer;
}

.filtro-grupo select:focus,
.filtro-grupo input:focus {
    outline: none;
    border-color: #4a9eff;
}

/* Botones: Aplicar + Limpiar */
.filtros-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-filtrar-aplicar {
    flex: 1;
    padding: 14px 28px;
    background: white;
    color: black;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filtrar-aplicar:hover {
    background: rgb(220, 220, 220);
    transform: scale(1.02);
}

.btn-filtrar-limpiar {
    padding: 14px 24px;
    background: transparent;
    color: #999;
    border: 1px solid #2a2a2a;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-filtrar-limpiar:hover {
    color: white;
    border-color: #3a3a3a;
}

/* ============================================
   8. RESPONSIVE
   ============================================ */

/* --- Tablets (= 1024px) --- */
@media (max-width: 1024px) {
    .navbar {
        padding: 18px 30px;
    }

    .hero-content h1,
    .hero-content span {
        font-size: 3rem;
    }

    .showroom h2,
    .contacto h2,
    .catalogo-header h2 {
        font-size: 2.4rem;
    }

    .grid-autos {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacto-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ficha {
        grid-template-columns: 1fr;
    }

    .ficha-specs {
        grid-template-columns: repeat(3, 1fr);
    }

    .filtros-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Móvil (= 768px) --- */
@media (max-width: 768px) {
    .navbar {
        padding: 16px 20px;
    }

    .menu-toggle {
        display: block;
    }

    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 20px 30px;
        gap: 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu.menu-open {
        display: flex;
    }

    .hero-content h1,
    .hero-content span {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .btn-catalogo,
    .btn-contacto {
        padding: 14px 24px;
        font-size: 14px;
    }

    .showroom,
    .contacto {
        padding: 0 20px;
    }

    .showroom h2,
    .contacto h2,
    .catalogo-header h2 {
        font-size: 2rem;
    }

    .grid-autos {
        grid-template-columns: 1fr;
    }

    .card-img {
        height: 200px;
    }

    .contacto-grid {
        grid-template-columns: 1fr;
    }

    .ficha {
        margin-top: 90px;
    }

    .ficha-modelo {
        font-size: 1.6rem;
    }

    .ficha-precio {
        font-size: 1.5rem;
    }

    .ficha-specs {
        grid-template-columns: 1fr;
    }

    .filtros-grid {
        grid-template-columns: 1fr;
    }

    .catalogo-header {
        flex-direction: column;
        gap: 16px;
    }

    .admin-container {
        margin-top: 90px;
        padding: 25px 20px;
        margin-left: 15px;
        margin-right: 15px;
    }

    .catalogo-page {
        margin-top: 100px;
    }
}

/* --- Móvil pequeño (= 480px) --- */
@media (max-width: 480px) {

    .hero-content h1,
    .hero-content span {
        font-size: 1.8rem;
    }

    .hero-content {
        margin-top: -40px;
    }

    .showroom h2,
    .contacto h2,
    .catalogo-header h2 {
        font-size: 1.6rem;
    }

    .btn-catalogo,
    .btn-contacto {
        display: block;
        width: 100%;
        text-align: center;
    }

    .login-box {
        padding: 35px 25px;
    }
}