@font-face {
    font-display: swap;
    font-family: tcomUltraLight;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/BestuneType-Light.woff2) format("woff2"),
        url(../fonts/BestuneType-Light.woff) format("woff")
}

@font-face {
    font-display: swap;
    font-family: tcomLight;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/BestuneType-Book.woff2) format("woff2"),
        url(../fonts/BestuneType-Book.woff) format("woff")
}

@font-face {
    font-display: swap;
    font-family: tcomSans;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/BestuneType-Regular.woff2) format("woff2"),
        url(assets/fonts/BestuneType-Regular.woff) format("woff")
}

@font-face {
    font-display: swap;
    font-family: tcomMed;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/BestuneType-Semibold.woff2) format("woff2"),
        url(../fonts/BestuneType-Semibold.woff) format("woff")
}

@font-face {
    font-display: swap;
    font-family: tcomBold;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/BestuneType-Bold.woff2) format("woff2"),
        url(assets/fonts/BestuneType-Bold.woff) format("woff")
}

body {
    font-family: tcomSans, Helvetica Neue, Helvetica, Arial, sans-serif;
}

/* Animación suave para el dropdown */
.dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.dropdown:hover .dropdown-menu,
.dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
}

/* Flecha animada */
.dropdown-toggle::after {
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: middle;
    border: none !important;
    /* Elimina la flecha por defecto de Bootstrap */
}

.dropdown:hover .dropdown-toggle .fa-chevron-down,
.dropdown.show .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

/* Efecto hover para los items - Versión corregida */
.nav-item {
    position: relative;
    margin: 0 5px;
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
    padding-bottom: 5px !important;
    font-size: 1pc;
    font-weight: 300;
    color: #111;
}

.nav-link:hover {
    color: #d8232a !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #d8232a;
    transition: width 0.3s ease;
    transform-origin: left center;
}

.nav-item:hover .nav-link::before,
.nav-item.active .nav-link::before {
    width: 100%;
}

/* Estilo para el dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    min-width: 200px;
}

/* Estilo para los items del dropdown */
.dropdown-item {
    transition: all 0.2s ease;
    padding: 10px 20px;
    position: relative;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 0;
    left: 0;
    top: 0;
    background-color: #d8232a;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #d8232a;
    padding-left: 25px;
}

.dropdown-item:hover::before {
    height: 100%;
}

/* Flecha del dropdown */
.fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.8em;
    margin-left: 5px;
}

/* Corrección para el toggler en móvil */
@media (max-width: 991.98px) {
    .dropdown-menu {
        opacity: 1;
        visibility: visible;
        margin-top: 0;
        display: none;
    }

    .dropdown.show .dropdown-menu {
        display: block;
    }

    .nav-link::before {
        display: none;
    }
}

/* === Estilos del Mega-Menú “Modelos” === */
.nav-item.mega {
    position: static;
}

.nav-item.mega .nav-link {
    cursor: pointer;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    padding: 1rem;
    box-sizing: border-box;
    z-index: 2000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;

}

.nav-item.mega.open .mega-menu {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.mega-menu-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    width: 100%;
}

.mega-categories {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 20%;
    border-right: 1px solid #fff;
    flex-shrink: 0;
}

.mega-categories li {
    margin-bottom: 0.5rem;
}

.mega-categories li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    display: block;
}

.mega-categories li.active a {
    background: #d8232a;
    color: #fff;
    border-radius: 4px;
}

.mega-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-left: 1.5rem;
    width: 80%;
    align-content: flex-start;
}

.model-card {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    text-align: center;
    width: calc(25% - 1.5rem);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    /* Indicate it's clickable */
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.model-card img {
    width: 100%;
    height: auto;
    display: block;
}

.model-card .info {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 40px;
    /* Make space for buttons at the bottom */
}

.model-card .info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.model-card .info p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #666;
}

.model-card .info h4 a {
    /* Ensure the text link is still clickable and visible */
    color: inherit;
    text-decoration: none;
    display: block;
    /* Make the whole h4 link clickable inside .info */
}

.model-card .info h4 a:hover {
    color: #d8232a;
    /* Keep text hover effect for clarity */
}


/* Styles for hover buttons - Modified for no animation and horizontal display */
.model-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: white;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 0 10px;
    box-sizing: border-box;
}

.model-card:hover .model-card-overlay {
    opacity: 1;
    visibility: visible;
}

.model-card-button {
    flex: 1;
    padding: 5px 8px;
    margin: 0 5px;
    background-color: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    /* Ensure buttons have pointer cursor */
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
    pointer-events: none;
}

.carousel-controls button {
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.85);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.3s ease;
    line-height: 0;
    /* 👈 CLAVE para evitar desplazamientos del símbolo */
    padding: 0;
    /* 👈 Evita que el span tenga padding extra */
}

.slider-btn {
    height: 32px;
    padding: 0 12px;
    background-color: #111;
    /* Activo */
    color: #fff;
    border: none;
    border-radius: 999px;
    /* ← forma píldora */
    font-size: 1rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 12px;
    transition: background-color 0.3s ease;
}

.slider-btn span {
    display: inline-block;
    line-height: 1;
    font-size: 1.2rem;
}

.slider-btn:disabled {
    background-color: #CCCCCC;
    /* Gris claro */
    color: #888;
    cursor: not-allowed;
}


.carousel-controls button span {
    display: inline-block;
    line-height: 1;
    font-size: 1.25rem;
    font-weight: bold;
}

.carousel-controls button:hover {
    background-color: rgba(0, 0, 0, 1);
}

.carousel-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-card-button:hover {
    background-color: #b71c21;
    transform: scale(1.05);
    color: #fff;
}

/* Responsive adjustments for Mega Menu */
@media (max-width: 1200px) {
    .model-card {
        width: calc(33.33% - 1.5rem);
    }
}

@media (max-width: 991.98px) {

    /* Tablet and smaller screens */
    .navbar-collapse {
        background-color: #fff;
    }

    .nav-item.mega {
        position: relative;
    }

    .mega-menu {
        position: static;
        width: auto;
        max-width: 100%;
        box-shadow: none;
        padding: 0;
        border-top: 1px solid #eee;
        flex-direction: column;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .nav-item.mega.open .mega-menu {
        display: flex;
    }

    .mega-menu-content-wrapper {
        flex-direction: column;
    }

    .mega-categories {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 1rem;
    }

    .mega-categories li {
        margin-bottom: 0;
    }

    .mega-categories li a {
        padding: 0.8rem 1rem;
    }

    .mega-cards {
        width: 100%;
        padding-left: 0;
        padding-top: 1rem;
        justify-content: center;
    }

    .model-card {
        width: calc(50% - 1rem);
        margin-bottom: 1rem;
    }

    .model-card .info {
        padding-bottom: 10px;
    }

    .model-card-overlay {
        position: static;
        height: auto;
        background-color: transparent;
        opacity: 1;
        visibility: visible;
        padding: 10px;
        display: flex;
        justify-content: center;
    }

    .model-card-button {
        flex: none;
        width: 48%;
        margin: 0 2%;
    }
}

@media (max-width: 576px) {
    .model-card {
        width: 90%;
        margin: 0 auto 1rem;
    }

    .model-card-button {
        width: 45%;
        font-size: 0.8em;
        padding: 8px 5px;
    }
}