﻿/* ==========================================================================
   VARIABLES LOCALES
   ========================================================================== */

:root {
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-weak: #dbeafe;
    --accent: #f59e0b;
    --shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
    --r-lg: 18px;
    --r-md: 14px;
    --r-sm: 12px;
    --gap: 16px;
    --max: 1100px;
}


/* ==========================================================================
   LAYOUT GENERAL
   ========================================================================== */

.hero {
    margin-top: 35px;
    margin-bottom: 35px;
    text-align: center;
}

.section {
    margin-top: 25px;
}

.section-2 {
    margin-top: 35px;
    margin-bottom: 35px;
}

.card {
    padding: 0;
    border: 0;
}

.hr-resalte {
    margin: 15px auto 25px;
    padding: 0;
}


/* ==========================================================================
   TÍTULOS / TEXTO
   ========================================================================== */

h1 {
    font-size: clamp(1.4rem, 1.2vw, 2rem);
    line-height: clamp(1.7rem, 1.4vw, 2.2rem);
}

.h1 {
    margin: 16px 0 8px;
    color: var(--color-tenue);
    font-size: clamp(2rem, 1.8vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: center !important;
}

.h2 {
    margin: 0;
    font-size: clamp(1.3rem, 1.1vw, 1.8rem);
    letter-spacing: -0.01em;
}

.p-guia {
    margin: 30px 0 8px;
    color: #374151;
    font-size: clamp(1.9rem, 1.7vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: center;
}

.lead-title {
    margin: 0;
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1.93rem;
}

.muted {
    color: var(--muted);
}

.subtexto {
    font-size: 1.5rem;
    line-height: 1.93rem;
}


/* ==========================================================================
   CABECERAS DE SECCIÓN
   ========================================================================== */

.section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--line);
}

.section__head--stack {
    display: block;
    padding: 0 0 12px;
    border-bottom: 0;
}


/* ==========================================================================
   FORMULARIOS / BOTONES
   ========================================================================== */

.brandSearch {
    min-width: 240px;
}

.input,
.select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
}

    .input:focus,
    .select:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    }

.btn {
    height: 42px;
    padding: 0 14px;
    color: #111827;
    background: var(--accent);
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

    .btn:hover {
        filter: brightness(0.98);
    }

    .btn:active {
        transform: translateY(1px);
    }

.btn--soft {
    color: #1e40af;
    background: var(--primary-weak);
}


/* ==========================================================================
   ACCESIBILIDAD
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}


/* ==========================================================================
   BREADCRUMB
   ========================================================================== */

.breadcrumb {
    margin: 16px 0 6px;
    color: var(--muted);
    font-size: 14px;
}

    .breadcrumb a {
        color: #1f2937;
    }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

.sep {
    margin: 0 8px;
    color: #9ca3af;
}


/* ==========================================================================
   MARCAS
   ========================================================================== */

.brandsGrid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
}

.brandChip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 90px;
    padding: 14px 10px;
    color: inherit;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

    .brandChip:hover {
        border-color: #c7d2fe;
        box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
        transform: translateY(-1px);
    }

    .brandChip.is-active {
        position: relative;
        border-color: #60a5fa;
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10);
    }

.brandChip__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 40px;
}

.brandChip__name {
    font-weight: 650;
    letter-spacing: -0.01em;
}

.brandChip__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 26px;
    margin-left: auto;
    color: #111827;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}


/* ==========================================================================
   FILTROS
   ========================================================================== */

.filters {
    margin-bottom: 16px;
    padding: 14px;
}

.filters__row {
    display: grid;
    grid-template-columns: 180px 160px 220px 1fr 120px;
    align-items: center;
    gap: 10px;
}


/* ==========================================================================
   GRID DE VEHÍCULOS
   ========================================================================== */

.vehiclesGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}

    .vehiclesGrid > * {
        height: 100%;
    }


/* ==========================================================================
   TARJETA DE VEHÍCULO
   ========================================================================== */

.vehicleCard {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

.vehicleCard__media {
    display: block;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: #f3f4f6;
}

    .vehicleCard__media img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.18s ease;
    }

.vehicleCard:hover .vehicleCard__media img {
    transform: scale(1.02);
}

.vehicleCard__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 12px;
}

.vehicleCard__title {
    margin: 0;
    font-size: 16px;
    letter-spacing: -0.01em;
}

    .vehicleCard__title a {
        color: #0f172a;
    }

        .vehicleCard__title a:hover {
            text-decoration: underline;
        }

.vehicleCard__meta--center {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 6px 0;
    text-align: center;
}

.vehicleCard__yearColor,
.vehicleCard__entrada {
    color: var(--muted);
    font-size: 1.4rem;
}

.vehicleCard__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
}

.vehicleCard__photos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #222;
    font-size: 1rem;
}

.vehicleCard__photosIcon,
.vehicleCard__photosNum {
    font-size: 1.05rem;
}


/* ==========================================================================
   DETALLE DE VEHÍCULO
   ========================================================================== */

.vehiculo-wrap {
    background: #fff;
    border: 1px solid var(--color-border, #e7eaf0);
    border-radius: var(--radius-md, 14px);
    box-shadow: var(--shadow-1, 0 10px 25px rgba(2, 6, 23, 0.06));
}

.vehiculo-sub {
    color: var(--color-muted, #64748b);
    font-weight: 600;
}

.font-labels,
.font-labels-valor {
    color: var(--color-muted, #64748b);
    font-size: clamp(1.1rem, 1.1vw, 1.3rem) !important;
}

.font-labels-valor {
    color: var(--color-text, #0f172a);
    font-weight: 700;
}

.vehiculo-info {
    background: var(--color-bg-soft, #f7f7f7);
    border: 1px solid var(--color-border, #e7eaf0);
}

.vehiculo-photos-title {
    color: var(--color-text-2, #334155);
    font-weight: 800;
}

.vehiculo-no-fotos {
    background: #f7f7f7;
    border-radius: 12px;
}


/* ==========================================================================
   CARDS DE PRODUCTO
   ========================================================================== */

.custom-col {
    display: flex;
}

.product__card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.product__card--content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.product__card--footer {
    margin-top: auto;
}

.product__card--thumbnail {
    position: relative;
    width: 100%;
    height: clamp(170px, 18vw, 260px);
    overflow: hidden;
    border-radius: 12px;
}

.product__card--thumbnail__link {
    display: block;
    width: 100%;
    height: 100%;
}

.product__card--thumbnail__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.product__primary--img {
    opacity: 1;
}

.product__secondary--img {
    opacity: 0;
}

.product__card:hover .product__secondary--img {
    opacity: 1;
}

.product__card:hover .product__primary--img {
    opacity: 0;
}

.row-modelos-photos img.vehiculo-img {
    display: block !important;
    width: 100% !important;
    height: 160px !important;
    object-fit: cover !important;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1400px) {
    .vehiclesGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .brandsGrid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .filters__row {
        grid-template-columns: 1fr 1fr;
    }

        .filters__row .btn {
            grid-column: 1 / -1;
        }

    .vehiclesGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .section__head {
        flex-direction: column;
        align-items: stretch;
    }

    .brandSearch {
        min-width: 0;
    }

    .brandsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vehiclesGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-resalte {
        margin: 8px auto 20px;
    }
}

@media (max-width: 576px) {
    .vehiclesGrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .vehicleCard__media {
        height: 200px;
    }
}
