
/* ==========================================
   CONFIGURACIÓN GENERAL
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #202735;
    background: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

button, select {
    font-family: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.section-padding {
    padding: 85px 0;
}


/* ==========================================
   CABECERA
========================================== */

.header {
    background: #302d51;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    min-height: 78px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    color: white;
    justify-self: start;
}

.logo img {
    width: 300px;
    height: 80px;
    object-fit: contain;
    display: block;
}

.logo i {
    color: #f85906;
    margin-right: 7px;
}

.logo span {
    color: #f85906;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.nav-menu a {
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s;
}

.nav-menu a:hover {
    color: #f85906;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.header-schedule {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd2dc;
    font-size: 12px;
    font-weight: 500;
    margin-right: 5px;
}

.header-schedule i {
    color: #f85906;
    font-size: 14px;
}

/* BOTÓN DE FAVORITOS */

.btn-cart {
    border: 1px solid #f85906;
    padding: 11px 18px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    position: relative;
}

.btn-cart:hover {
    background: #f85906;
    color: #ffffff;
}

/* CONTADOR DE FAVORITOS */

.fav-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    background: #f85906;
    color: #ffffff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    position: absolute;
    top: -8px;
    right: -9px;
}

.btn-login {
    border: 1px solid #f85906;
    padding: 11px 18px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

.btn-login:hover {
    background: #f85906;
    color: #ffffff;
}

.menu-toggle {
    display: none;
    color: white;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}


/* ==========================================
   PORTADA
========================================== */

.hero {
    height: 590px;
    position: relative;
    display: flex;
    align-items: center;
    background: url("images/portada.jpeg") center 55% / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(31, 29, 56, 0.94),
        rgba(31, 29, 56, 0.60),
        rgba(31, 29, 56, 0.12)
    );
}

.hero-content {
    position: relative;
    color: white;
    z-index: 1;
    padding-bottom: 40px;
}

.hero-tag,
.section-tag {
    color: #f85906;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 58px);
    max-width: 650px;
    line-height: 1.15;
    margin: 22px 0;
    font-weight: 800;
}

.hero h1 span {
    color: #f85906;
}

.hero p {
    font-size: 15px;
    max-width: 490px;
    line-height: 1.8;
    color: #e2e7ed;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-outline,
.btn-dark,
.btn-small,
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-primary {
    background: #f85906;
    color: #ffffff;
    padding: 15px 23px;
}

.btn-primary:hover {
    background: #fb7a38;
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid white;
    color: white;
    padding: 14px 23px;
}

.btn-outline:hover {
    background: white;
    color: #302d51;
    transform: translateY(-2px);
}


/* ==========================================
   BUSCADOR DE VEHÍCULOS
========================================== */

.search-container {
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.search-box {
    background: white;
    padding: 22px;
    border-radius: 9px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.14);
    display: grid;
    grid-template-columns: repeat(3, 1fr) 160px;
    gap: 20px;
    align-items: end;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-field label {
    font-size: 12px;
    font-weight: 700;
}

.search-field select {
    width: 100%;
    border: 1px solid #dfe3e9;
    border-radius: 5px;
    padding: 13px;
    background: #fff;
    color: #555;
    outline: none;
}

.btn-search {
    background: #302d51;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 14px;
    cursor: pointer;
    font-weight: 700;
}

.btn-search:hover {
    background: #f85906;
    color: #ffffff;
}

.search-message {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 600;
    color: #302d51;
    margin-bottom: -5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-message i {
    color: #f85906;
    font-size: 14px;
}


/* ==========================================
   TÍTULOS
========================================== */

.section-heading {
    text-align: center;
    margin-bottom: 45px;
}

.section-heading h2 {
    font-size: 34px;
    margin: 13px 0;
    color: #302d51;
}

.section-heading p {
    color: #777;
    font-size: 14px;
    line-height: 1.7;
}


/* ==========================================
   CATEGORÍAS
========================================== */

.categories {
    padding-top: 125px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.category-card {
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    color: white;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(31, 29, 56, 0.95),
        transparent
    );
}

.category-info {
    position: absolute;
    bottom: 25px;
    left: 28px;
    z-index: 2;
}

.category-info > i {
    font-size: 25px;
    color: #f85906;
}

.category-info h3 {
    font-size: 25px;
    margin: 9px 0;
}

.category-info p {
    font-size: 13px;
    margin-bottom: 15px;
}

.category-info span {
    color: #f85906;
    font-size: 12px;
    font-weight: 700;
}


/* ==========================================
   VEHÍCULOS
========================================== */

.featured {
    background: #f5f7fa;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.car-card {
    background: white;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    transition: 0.3s;
}

.car-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.car-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #f85906;
    color: #ffffff;
    padding: 7px 11px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
}

/* CORAZÓN DE FAVORITOS */

.favorite {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 16px;
}

.favorite.active {
    color: #e33c3c;
}

.car-info {
    padding: 22px;
}

.car-category {
    font-size: 11px;
    color: #999;
}

.car-info h3 {
    margin: 9px 0 17px;
    font-size: 19px;
}

.car-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #777;
    font-size: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.car-details i {
    color: #f85906;
}

.car-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 17px;
}

.car-footer strong {
    color: #302d51;
    font-size: 21px;
}

.btn-small {
    background: #302d51;
    color: white;
    padding: 11px 14px;
    font-size: 11px;
}

.btn-small:hover {
    background: #f85906;
    color: #ffffff;
}

.center-button {
    text-align: center;
    margin-top: 40px;
}

.btn-dark {
    background: #302d51;
    color: white;
    padding: 15px 25px;
}

.btn-dark:hover {
    background: #f85906;
    color: #ffffff;
}


/* ==========================================
   RECAMBIOS - SECCIÓN INICIO
========================================== */

.parts-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.parts-text h2 {
    font-size: 35px;
    line-height: 1.3;
    margin: 18px 0;
    color: #302d51;
}

.parts-text p {
    color: #777;
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 20px;
}

.parts-text ul {
    list-style: none;
    margin-bottom: 27px;
}

.parts-text li {
    margin: 15px 0;
    font-size: 13px;
    font-weight: 600;
}

.parts-text li i {
    color: #f85906;
    margin-right: 10px;
}


/* ==========================================
   GALERÍA DE IMÁGENES
========================================== */

.parts-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 370px;
}

.stacked-gallery-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.stacked-gallery {
    position: relative;
    width: 100%;
    height: 370px;
    overflow: hidden;
    border-radius: 10px;
    background: #302d51;
}

.stacked-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition:
        transform 0.9s cubic-bezier(0.65, 0, 0.35, 1),
        opacity 0.9s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform, opacity;
}

.stacked-card.is-active {
    opacity: 1;
    transform: translateX(0);
    z-index: 3;
}

.stacked-card.is-leaving {
    opacity: 0;
    transform: translateX(-100%);
    z-index: 2;
}

.stacked-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stacked-card .card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 22px;
    background: linear-gradient(
        to top,
        rgba(31, 29, 56, 0.95),
        transparent
    );
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.stacked-gallery-link:hover .card-info {
    transform: translateY(0);
}

.card-info h3 {
    margin: 0 0 4px;
    font-size: 1.3rem;
    color: #f85906;
    font-weight: 800;
}

.card-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #e2e7ed;
}


/* ==========================================
   FAMILIAS DE RECAMBIOS
========================================== */

.familias {
    background: #f5f7fa;
    border-top: 1px solid #e5e8ed;
}

.familias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 35px;
}

.familia-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 190px;
    padding: 25px 20px;
    background: #ffffff;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.familia-card i {
    font-size: 35px;
    margin-bottom: 15px;
    color: #f85906;
}

.familia-card h3 {
    font-size: 18px;
    color: #222222;
    margin-bottom: 12px;
}

.familia-card span {
    font-size: 14px;
    color: #f85906;
}

.familia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.10);
}

.hidden-family {
    display: none !important;
}


/* ==========================================
   BOTÓN VER MÁS / VER MENOS
========================================== */

.familias-toggle-wrapper {
    text-align: center;
    margin-top: 40px;
}

.btn-text-toggle {
    background: transparent;
    border: none;
    color: #f85906;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    position: relative;
    transition: color 0.3s ease;
}

.btn-text-toggle::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #f85906;
    transition: width 0.3s ease;
}

.btn-text-toggle:hover::after {
    width: 80%;
}

.btn-text-toggle:hover {
    color: #302d51;
}

.btn-text-toggle i {
    font-size: 12px;
    transition: transform 0.4s ease;
}

.btn-text-toggle.is-expanded i {
    transform: rotate(180deg);
}


/* ==========================================
   CONTACTO
========================================== */

.contact {
    background: #302d51;
    color: white;
}

.contact-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.contact h2 {
    font-size: 29px;
    margin: 14px 0;
}

.contact p {
    color: #c4ccd6;
    font-size: 13px;
}

.btn-whatsapp {
    background: #20bd64;
    color: white;
    padding: 17px 23px;
    white-space: nowrap;
}

.btn-whatsapp:hover {
    background: #159b50;
}


/* ==========================================
   FOOTER
========================================== */

.footer {
    background: #1f1d38;
    color: white;
    padding-top: 55px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 45px;
    padding-bottom: 45px;
}

.footer-grid h3 {
    font-size: 15px;
    margin-bottom: 20px;
}

.footer-grid p,
.footer-grid > div > a:not(.logo) {
    display: block;
    font-size: 12px;
    color: #aab4c1;
    line-height: 2.3;
}

.footer-grid p {
    margin-top: 10px;
}

.footer-grid i {
    margin-right: 7px;
    color: #f85906;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
}

.footer-bottom {
    border-top: 1px solid #3f3b66;
    padding: 20px;
    text-align: center;
    color: #8995a5;
    font-size: 11px;
}


/* ==========================================
   WHATSAPP FLOTANTE
========================================== */

.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #20bd64;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 29px;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}


/* ==========================================
   BOTONES DE RECAMBIOS
========================================== */

.part-footer {
    display: flex !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 17px;
    padding-top: 14px;
    border-top: 1px solid #edf0f3;
}

.part-footer > .btn-contact,
.part-footer .btn-contact {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 5px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: #302d51;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

.part-footer .btn-contact:hover {
    background: #f85906;
    color: #ffffff;
}


/* ==========================================
   CABECERA DE FAVORITOS
========================================== */

.cart-header {
    background: #f5f6f8;
    padding: 65px 0 45px;
}

.cart-header h1 {
    font-size: 38px;
    font-weight: 800;
    margin: 12px 0;
    color: #202735;
}

.cart-header p {
    color: #687080;
}

.cart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
    font-size: 13px;
    color: #777;
}

.cart-breadcrumb a {
    color: #f85906;
}


/* ==========================================
   VISTA DE FAVORITOS
========================================== */

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.favorites-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #302d51;
}

.favorites-header h2 span {
    color: #999;
    font-size: 15px;
}

.cart-empty {
    text-align: center;
    padding: 65px 20px;
    background: #f7f8fa;
    border-radius: 10px;
}

.cart-empty > i {
    font-size: 55px;
    color: #f85906;
    margin-bottom: 22px;
}

.cart-empty h3 {
    font-size: 21px;
    margin-bottom: 10px;
}

.cart-empty p {
    color: #777;
    margin-bottom: 25px;
    font-size: 14px;
}

.cart-empty .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.clear-cart {
    border: none;
    background: transparent;
    color: #c74b42;
    cursor: pointer;
    font-size: 13px;
}

.clear-cart:disabled {
    opacity: .4;
    cursor: not-allowed;
}


/* ==========================================
   ANIMACIÓN DE SCROLL
========================================== */

/* ==========================================
   RESPONSIVE - TABLETS
========================================== */

@media (max-width: 900px) {

    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 11px;
    }

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

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

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

    .header-schedule {
        display: none;
    }
}


/* ==========================================
   RESPONSIVE - MÓVILES
========================================== */

@media (max-width: 650px) {

    .navbar {
        min-height: 70px;
    }

    .logo {
        font-size: 21px;
    }

    .logo img {
        width: 190px;
        height: 65px;
    }

    .btn-login {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #302d51;
        padding: 25px;
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        font-size: 14px;
    }

    .hero {
        height: 610px;
        background-position: center;
    }

    .hero h1 {
        font-size: 39px;
    }

    .hero p {
        font-size: 13px;
    }

    .search-container {
        bottom: -155px;
    }

    .search-box {
        grid-template-columns: 1fr 1fr;
        padding: 16px;
        gap: 13px;
    }

    .search-field select {
        padding: 11px 7px;
        font-size: 11px;
    }

    .btn-search {
        grid-column: 1 / -1;
    }

    .categories {
        padding-top: 220px;
    }

    .section-padding {
        padding: 65px 0;
    }

    .section-heading h2 {
        font-size: 26px;
    }

    .category-grid,
    .car-grid,
    .parts-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        height: 250px;
    }

    .car-image {
        height: 230px;
    }

    .parts-text h2 {
        font-size: 29px;
    }

    .parts-image {
        min-height: 280px;
    }

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

    .contact-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact h2 {
        font-size: 25px;
    }

    .btn-whatsapp {
        white-space: normal;
    }

    .footer-grid {
        gap: 25px;
    }

    .search-message {
        font-size: 11px;
        margin-bottom: 0;
        text-align: left;
    }
}


/* ==========================================
   MÓVILES PEQUEÑOS
========================================== */

@media (max-width: 380px) {

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

    .hero h1 {
        font-size: 33px;
    }

    .search-box {
        grid-template-columns: 1fr;
    }

    .search-container {
        bottom: -235px;
    }

    .categories {
        padding-top: 300px;
    }
}


/* ==========================================
   BUSCADOR - CAPAS Y CLICS
========================================== */

.search-container {
    z-index: 9999 !important;
}

.search-box {
    position: relative;
    z-index: 10;
}

.search-field select,
.btn-search {
    position: relative;
    z-index: 20;
    cursor: pointer;
}


/* ==========================================
   ANIMACIÓN DE SCROLL - CLICS
========================================== */

.hero {
    pointer-events: auto !important;
}


/* ==========================================
   BOTÓN VOLVER ARRIBA
========================================== */

.btn-top {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: #302d51;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-top:hover {
    background: #f85906;
    color: #ffffff;
    transform: translateY(-3px);
}

@media (max-width: 650px) {

    .btn-top {
        bottom: 90px;
        right: 25px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}


/* ==========================================
   AJUSTES DE GALERÍA Y CATÁLOGO EN MÓVILES
========================================== */

@media (max-width: 768px) {

    .parts-content {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .parts-image {
        width: 100%;
        min-height: auto !important;
        height: auto !important;
        margin-top: 0;
    }

    .stacked-gallery {
        height: 220px !important;
        width: 100%;
    }

    .stacked-card .card-info {
        padding: 15px;
    }

    .card-info h3 {
        font-size: 1.1rem !important;
    }

    .card-info p {
        font-size: 0.75rem !important;
    }

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

    .familia-card {
        min-height: 150px;
        padding: 15px;
    }

    .familia-card i {
        font-size: 25px;
    }

    .familia-card h3 {
        font-size: 15px;
    }
}

@media (max-width: 450px) {

    .familias-grid {
        grid-template-columns: 1fr !important;
    }
}
