@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Meow+Script&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Fredoka:wght@300..700&family=Meow+Script&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@500&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
/* font-family: "Bebas Neue", sans-serif; */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
}

.dropdown-item-title {
    white-space: nowrap;
    /* Evita que el texto se divida en varias líneas */
    overflow: hidden;
    /* Oculta el texto que desborda el contenedor */
    text-overflow: ellipsis;
    /* Añade puntos suspensivos (...) al final del texto cuando este es truncado */
    max-width: 200px;
    /* Ajusta el ancho máximo según sea necesario */
}

.media-body {
    max-width: 200px;
    /* Asegúrate de que el contenedor tenga un ancho máximo */
}

img.img-size-50 {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

html, body { height: 100%; }

body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url(jpg/productos.webp) center top/cover no-repeat;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    margin: 0; /* Prevent default body margin creating gaps */
    min-height: 100vh; /* Ensure background covers the viewport */
}

.dios {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 100vh; /* Use viewport height consistently */
}


.card-custom {
    height: 100%;
    margin-bottom: 10px;
    background-color: #001942;

}


.col-lg-4,
.col-md-6,
.col-sm-12 {
    padding-bottom: 10px;
}

.card-custom .card-title {

    color: #ffffff;
    font-size: 25px;
    margin-bottom: 10px;
    line-height: 1.1;
}

.card-title {
    text-align: justify;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.2em * 3);
    /* Altura máxima dependiendo del número de líneas */
    line-height: 1em;
    /* Asegura que la altura de línea sea consistente */
    padding-bottom: 2px;

}

.card-title strong {

    font-style: normal;
    font-family: "Poppins", sans-serif;
}


.card-text {

    font-size: 15px;
    color: #bfbfbf;

}

card-img {
    width: 50px;
    height: 50px;
}

.card-price {
    text-align: center;
    font-size: 15px;
    color: #ffffff;

}

/* style.css */
table.dataTable {
    border-collapse: separate;
    border-spacing: 0;
}

table.dataTable thead th,
table.dataTable tbody td {
    border-radius: 10px;
    /* Ajusta el valor según tus necesidades */
    overflow: hidden;
}

table.dataTable tbody tr:first-child td:first-child {
    border-top-left-radius: 10px;
}

table.dataTable tbody tr:first-child td:last-child {
    border-top-right-radius: 10px;
}

table.dataTable tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

table.dataTable tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}



h4 {
    font-size: 25px;
}

.menu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
}


.menu .navbar ul li {
    position: relative;
    float: left;


}

.menu .navbar ul li a {
    font-size: 18px;
    padding: 20px;
    color: #ffffff;
    display: block;
    text-decoration: none;


}


.menu .navbar ul li a:hover {
    color: #cf2d3a;
}

#menu {
    display: none;
}

.menu-icono {
    width: 25px;
}

.menu label {
    cursor: pointer;
    display: none;
}



.tamano {
    font-family: "Roboto", sans-serif;
    letter-spacing: 0px;
    color: #ffffff;
    font-size: 12px;
}

h3 {
    font-style: normal;
    font-family: "Lexend Deca", sans-serif;
    font-weight: 700;
    color: #001942;
    font-size: 35px;
}



.header-txt img {
    width: 900px;
    display: block;
    margin: 0 auto;
}

.header-txt span {
    font-size: 25px;
    align-content: center;
}

.header-txt p {
    color: #070707;
    padding: 0 250px;
    margin: 8px 0;
    text-align: center;
    text-transform: uppercase;
}

.btn-1 {
    display: inline-block;
    padding: 11px 25px;
    background-color: #D82E37;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 20px;
    font-family: 'Bebas Neue', cursive;
    margin: 25px 0;
    border: 0;
}

.welcome {

    background-image: url(jpg/fondo.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}


.welcome-2 {
    width: 50%;
    padding: 150px 100px 150px 90px;

}

h2 {

    line-height: 40px;
    color: #ffffff;
    text-transform: uppercase;
    font-family: 'Bebas Neue', cursive;
    margin-bottom: 20px;
}

p {
    font-size: 20px;
    color: #AFAFAF;
    text-align: justify;

}

.b1 {
    color: #cf2d3a;
}


.services {
    padding: 0px 0;
    text-align: center;
    background-image: url(jpg/fondo\ .jpg);
    display: flex;

}

.video {
    width: 50%;
    height: 450px;
}


.services-txt {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px;
}

hr {
    border: 1px solid #cf2d3a;
    width: 80px;
}

.services-txt p {
    padding: 10px 15px;
    font-size: 13px;

}

.services-group {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.services-1 {
    background-color: #070707;
    padding: 35px 25px;
    margin: 0 10px;
    border-radius: 15px;
    max-width: 400px;
}

.services-1 img {
    width: 80px;
    margin-bottom: 15px;

}



.services-1 a {
    color: #cf2d3a;
    font-size: 16px;
}

.prices {
    display: flex;
    height: 855px;
    width: 100%;
}

.prices-1 {
    width: 50%;
    padding: 150px 250px 150px 100px;
    background-color: #191919;
}

table {
    margin: 50px 0;
    width: 100%;
    text-align: center;
    border-collapse: collapse;

}

.btn-1:hover {
    background-color: #b4272e;
}

.header-dir {
    display: flex;
    justify-content: space-between;
    text-align: justify;
    margin: 30px 100px 0px 100px;
}

.linea {
    border-bottom: 2px solid #cf2d3a;
    /* 2px de grosor, estilo sólido, */
    width: 90%;
    /* Opcional: define el ancho de la línea */
    margin: 20px 0;
    /* Espacio arriba y abajo de la línea */
    align-content: center;
    margin-left: auto;
    margin-right: auto;
}


.dir p {
    font-size: 20px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-info {
    display: flex;
    justify-content: space-between;

}

.footer-title {
    padding-left: 5%;

}

.iconos {
    display: flex;
    gap: 25px;
    /* Espacio entre iconos */
    margin-top: 10px;
    padding-right: 5%;
}

.iconos a {
    color: #ffffff;
    /* Color del icono */
    font-size: 30px;
    /* Iconos más grandes */
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    /* Tamaño del círculo aumentado */
    height: 60px;
    border-radius: 50%;
    background: transparent;
    /* Fondo transparente */
    border: 2px solid #ffffff;
    /* Borde rojo (ajusta el color) */
    transition: all 0.3s ease;
}

.iconos a:hover {
    background-color: #cf2d3a;
    /* Color al pasar el mouse */
}

.footer-txt {
    padding: 10px;
    background-color: #0c132e;
}

.fiat {
    font-size: 50px;
}

.footer-txt h1,
h2 {
    letter-spacing: 5px;
    font-family: 'Bebas Neue', cursive;
    color: #ffffff;
}

.footer-txt h3,
h4 {
    letter-spacing: 5px;
    font-family: 'Bebas Neue', cursive;
    color: #cf2d3a;
    font-weight: 500;
}

.derechos {
    text-align: center;
    font-size: 15px;
    margin-top: 0;
}

.envio {
    color: white;
}

/* Agrega esto al final de tu archivo tienda.css */

/* Contenedor principal con márgenes */
.main-content-container {
    padding: 20px;
    /* Margen lateral del 5% y 20px arriba/abajo */
    max-width: 1600px;
    /* Ancho máximo para pantallas muy grandes */
    margin: 0 auto;
    /* Centrar el contenido */
}

/* Filtros sticky mejorados */
.filtros-sticky-container {
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    /* Altura del viewport menos el padding */
    overflow-y: auto;
    padding-right: 15px;
}

/* Mejoras para el contenedor de productos */
.col-md-9 {
    padding-left: 20px;
    /* Espacio entre filtros y productos */
}

/* Mejora el scroll en los filtros */
.filtros-card {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Personaliza la barra de scroll */
.filtros-card::-webkit-scrollbar {
    width: 5px;
}

.filtros-card::-webkit-scrollbar-thumb {
    background-color: #cf2d3a;
    border-radius: 10px;
}

/* Layout principal */
.productos-container {
    display: flex;
    gap: 20px;
}

.filtros-column {
    flex: 0 0 300px;
    /* Ancho fijo para filtros */
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: 100vh;
    overflow-y: auto;
}

.productos-column {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}



/* Estilos para las tarjetas de producto */
.card-producto {
    background-color: #001942;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
}

.card-producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.card-body {
    padding: 20px;
    color: white;
}

/* Contenedor de filtros sticky */
.filtros-sticky-container {
    position: sticky;
    top: 20px;
    /* Ajusta según la altura de tu header */
    height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 15px;
}

/* Tarjeta de filtros */
.filtros-card {
    background-color: #001942;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Scroll personalizado para los filtros */
.filtros-card::-webkit-scrollbar {
    width: 5px;
}

.filtros-card::-webkit-scrollbar-thumb {
    background-color: #cf2d3a;
    border-radius: 10px;
}


/* Mejoras para las tarjetas de producto */
.card-custom {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Reemplaza las reglas existentes para las columnas de productos con esto: */


/* Asegúrate que las tarjetas ocupen todo el espacio */
.card-custom {
    height: 100%;
    margin-bottom: 0;
    /* Eliminamos el margen inferior para mejor alineación */
}


/* Añade esto al final de tu archivo tienda.css */

/* Diseño para móviles (menos de 768px) */
@media (max-width: 767.98px) {
    .main-content-container {
        padding: 0;
        /* Eliminamos el padding para aprovechar todo el espacio */
        display: flex;
        flex-direction: column;
        height: 100vh;
        /* Ocupa toda la altura de la pantalla */
    }

    .row.g-0 {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Filtros en la parte superior */
    .col-md-3 {
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 1000;
        
        padding: 10px;
    }

    /* Contenedor de filtros */
    .filtros-sticky-container {
        position: relative;
        height: auto;
        max-height: 300px;
        /* Altura máxima para los filtros */
        overflow-y: auto;
    }

    /* Productos en la parte inferior con scroll */
    .col-md-9 {
        width: 100%;
        flex: 1;
        overflow-y: auto;
        padding: 10px;
    }

    /* Ajustes para las tarjetas de producto */
    .col-sm-12 {
        padding: 5px;
    }

    .card-custom {
        margin-bottom: 15px;
    }

    /* Asegurar que los filtros no sean demasiado altos */
    .filtros-card {
        max-height: 280px;
    }

    /* Ocultar el margen inferior en móviles */
    .card-custom {
        margin-bottom: 0;
    }
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    .filtros-card {
        padding: 10px;
    }

    .card-img-top {
        height: 180px;
    }

    .card-title {
        font-size: 20px;
    }

    .card-text {
        font-size: 14px;
    }
}

.card.card-solid {
    max-width: 1000px;
    margin: 10px auto;
}

.product-image-container {
    max-width: 450px;
    margin: 0 auto;
}

.product-image {
    max-width: 100%;
    height: 250px;
    object-fit: contain;
}

.product-image-thumbs {
    justify-content: center;
    margin-top: 10px;
}

.product-image-thumbs img {
    width: 45px;
    height: 35px;
    object-fit: cover;
    margin-right: 5px;
}

.datos {
    font-size: 15px;
    margin-bottom: 6px;
    color: black;
}

/* Ajustes específicos para el detalle del producto en móviles */
@media (max-width: 767.98px) {
    .card-body .row {
        display: flex;
        flex-direction: column;
    }

    .col-12.col-sm-6:first-child {
        order: 1;
        /* La imagen va primero */
    }

    .col-12.col-sm-6:last-child {
        order: 2;
        /* La descripción va después */
        margin-top: 20px;
    }

    .product-image {
        height: 200px;
        /* Altura más adecuada para móviles */
    }

    .product-image-container {
        max-width: 100%;
        /* Ocupa todo el ancho */
    }

    /* Ajustes para el contenido de la descripción */
    .col-12.col-sm-6:last-child {
        padding: 0 15px;
    }

    h3.my-3 {
        font-size: 24px;
        /* Tamaño más adecuado para móviles */
    }

    .datos {
        font-size: 14px;
    }

    /* Ajustar el botón de agregar al carrito */
    .btn-lg {
        width: 100%;
    }

    .card.card-solid {
        max-width: 1000px;
        margin: 20px 30px auto;
    }
}

/* Ajustes para el menú en móviles */
@media (max-width: 767.98px) {

    /* Menú principal */
    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        margin: 0.2rem;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 14px;
    }

    /* Dropdowns */
    .dropdown-menu {
        position: absolute;
        right: 0;
        left: auto;
    }

    /* Iconos del carrito y usuario */
    .fa-cart-plus,
    .fa-user {
        font-size: 1.2rem;
    }

    /* Badge del carrito */
    .badge-danger {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }

    /* Ajustes para la sección de contacto */
    .footer-txt {
        padding: 15px 10px;
    }

    .header-dir {
        flex-direction: column;
        margin: 15px 0;
        text-align: center;
    }

    .dir {
        margin-bottom: 20px;
    }

    .dir p {
        font-size: 16px;
        text-align: center;
    }

    .footer-info {
        flex-direction: column;
        align-items: center;
    }

    .footer-title {
        padding-left: 0;
        text-align: center;
        margin-bottom: 15px;
    }

    .iconos {
        padding-right: 0;
        justify-content: center;
        margin-bottom: 15px;
    }

    .iconos a {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .fiat {
        font-size: 40px;
    }

    .derechos {
        font-size: 13px;
    }
}

/* Ajustes adicionales para pantallas muy pequeñas (menos de 480px) */
@media (max-width: 480px) {
    .navbar-nav {
        justify-content: space-between;
        width: 100%;
    }

    .nav-item {
        margin: 0.1rem;
    }

    .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 12px;
    }

    .dropdown-menu {
        min-width: 200px;
    }

    /* Contacto */
    .dir p {
        font-size: 14px;
    }

    .iconos a {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .fiat {
        font-size: 32px;
    }
}

/* ----------------------------
   DISEÑO PARA MÓVILES (VERTICAL)
---------------------------- */
@media (max-width: 767.98px) {
    /* Footer debe quedar en su posición natural */
    footer {
        position: relative !important;
    }

    .main-content-container {
        display: block !important;
        padding: 0 5px !important;
    }

    /* Filtros compactos en móvil */
    .col-md-3 {
        width: 100% !important;
        margin-bottom: 15px !important;
        position: relative !important;
    }

    .row.g-0 {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    /* Productos con grid apropiado */
    .col-md-9 {
        width: 100% !important;
        padding: 0 !important;
    }

    .filtros-sticky-container {
        position: relative !important;
        height: auto !important;
        max-height: none !important;
    }

    /* Filtros compactos */
    .filtros-card {
        padding: 10px !important;
        background-color: #001942;
        border-radius: 8px;
        height: auto !important;
        max-height: none !important;
    }

    .filtros-card h4 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
        color: white;
        text-align: center;
    }

    /* Organizar filtros en grid horizontal */
    .filtros-card .mb-3,
    .filtros-card .d-flex {
        margin-bottom: 8px !important;
    }

    .filtros-card .form-select,
    .filtros-card .form-control {
        font-size: 14px !important;
        padding: 6px 8px !important;
        height: auto !important;
    }

    .filtros-card .input-group-text {
        padding: 6px 8px !important;
        font-size: 14px !important;
    }

    .filtros-card .btn {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }

    .filtros-card .d-grid {
        margin-top: 10px !important;
    }

    /* Grid de productos en móvil */
    .col-lg-3 {
        width: 50% !important;
        padding: 3px !important;
        float: left !important;
    }

    .col-md-6 {
        width: 50% !important;
        padding: 3px !important;
        float: left !important;
    }

    .col-sm-12 {
        width: 50% !important;
        padding: 3px !important;
        float: left !important;
    }

    /* Clearfix para el float */
    .row::after {
        content: "";
        display: table;
        clear: both;
    }

    /* Paginación con margen suficiente */
    .pagination {
        margin: 30px 0 40px 0 !important;
    }
}

@media (min-width: 768px) {  
    /* Conserva el sticky original */  
    .filtros-sticky-container {  
        position: sticky;  
        top: 20px;  
        height: calc(100vh - 40px);  
        overflow-y: auto;  
    }  
}

/* ====================================
   RESPONSIVE FIXES FOR MOBILE
==================================== */

/* Fix .dios container for proper layout */
.dios {
    display: grid;
    min-height: 100vh;
    grid-template-rows: auto 1fr auto;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Container-fluid responsive */
.container-fluid {
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
}

/* Footer responsive fixes */
footer {
    width: 100%;
    margin-top: auto;
}

.footer-txt {
    padding: 20px 15px;
    background-color: #0c132e;
    width: 100%;
}

.header-dir {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
    text-align: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.footer-title {
    text-align: center;
    padding: 0;
}

.iconos {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

.iconos a {
    width: 50px;
    height: 50px;
    font-size: 24px;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

.iconos a:hover {
    background-color: #cf2d3a;
    border-color: #cf2d3a;
}

/* ====================================
   RESPONSIVE CARD FIXES
==================================== */

/* Override inline styles for responsive cards */
.card-img-top {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

/* Mobile card adjustments */
@media (max-width: 767px) {
    .dios {
        grid-template-rows: auto 1fr auto;
    }
    
    .container-fluid {
        padding: 0 10px;
    }
    
    /* Footer mobile */
    .footer-txt {
        padding: 15px 10px;
    }
    
    .header-dir {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 15px 0;
    }
    
    .dir h3 {
        font-size: 16px;
    }
    
    .dir p {
        font-size: 14px;
    }
    
    .footer-info {
        gap: 15px;
    }
    
    .footer-title .fiat {
        font-size: 32px;
    }
    
    .iconos a {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .derechos {
        font-size: 12px;
        margin-top: 15px;
    }
    
    /* Card responsive adjustments */
    .card-img-top {
        height: 180px !important;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .card-text {
        font-size: 13px;
    }
    
    .col-lg-3 {
        padding: 5px;
    }
    
    .card-custom {
        margin-bottom: 15px;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .container-fluid {
        padding: 0 30px;
    }
    
    .header-dir {
        grid-template-columns: repeat(3, 1fr);
        margin: 30px 0;
    }
    
    .footer-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .footer-title {
        text-align: left;
    }
    
    .iconos {
        gap: 20px;
    }
    
    .iconos a {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }
}

/* Desktop adjustments */
@media (min-width: 1025px) {
    .container-fluid {
        padding: 0 50px;
    }
    
    .header-dir {
        grid-template-columns: repeat(3, 1fr);
        margin: 30px 100px;
        text-align: left;
    }
    
    .dir {
        text-align: left;
    }
    
    .footer-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin: 20px 0;
    }
    
    .footer-title {
        text-align: left;
        padding-left: 5%;
    }
    
    .iconos {
        padding-right: 5%;
        gap: 25px;
    }
    
    .iconos a {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .container-fluid {
        padding: 0 5px;
    }
    
    .footer-txt {
        padding: 10px 5px;
    }
    
    .header-dir {
        gap: 10px;
        margin: 10px 0;
    }
    
    .dir h3 {
        font-size: 14px;
    }
    
    .dir p {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .footer-title .fiat {
        font-size: 28px;
    }
    
    .iconos {
        gap: 10px;
    }
    
    .iconos a {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .derechos {
        font-size: 11px;
    }
    
    .card-img-top {
        height: 160px !important;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-text {
        font-size: 12px;
    }
}

/* ====================================
   BOOTSTRAP 5 NAVBAR FIXES
==================================== */

/* Fix navbar for Bootstrap 5 */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
}
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* Fix dropdown menus */
.dropdown-menu {
    background-color: #343a40;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dropdown-item {
    color: #fff;
}

/* Mobile navbar improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #343a40;
        margin-top: 10px;
        border-radius: 5px;
        padding: 10px;
        max-width: 100vw;
    }
    
    .navbar-nav .nav-item {
        margin: 5px 0;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 15px;
        display: block;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.1);
        margin-top: 5px;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .dropdown-item {
        padding: 8px 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ====================================
   FORCE RESPONSIVE LAYOUT FIXES
==================================== */

/* Sticky footer layout (Grid-based) */
.dios {
    display: grid !important;
    grid-template-rows: auto 1fr auto !important; /* header | content | footer */
    min-height: 100vh !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* Explicit row mapping to avoid interference from other CSS */
.dios > header,
.dios > nav { grid-row: 1 !important; }
.dios > .container-fluid { grid-row: 2 !important; min-height: 0 !important; }
.dios > footer { grid-row: 3 !important; }

/* Footer (grid row 3) */
footer {
    width: 100% !important;
    background-color: #0c132e !important;
    position: static !important; /* grid handles placement */
    margin-top: 0 !important; /* handled by grid */
}

/* Container (grid row 2) */
.container-fluid {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: visible !important;
    /* No flex growth here; grid handles height with 1fr */
}

/* Card image responsive override */
.card-img-top {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

/* Ajustes específicos para el detalle del producto en móviles */
@media (max-width: 767.98px) {
    .card-body .row {
        display: flex;
        flex-direction: column;
    }

    .col-12.col-sm-6:first-child {
        order: 1;
    }

    .col-12.col-sm-6:last-child {
        order: 2;
        margin-top: 15px;
    }

    .product-image {
        height: 180px;
    }

    .product-image-container {
        max-width: 100%;
    }

    .col-12.col-sm-6:last-child {
        padding: 0 10px;
    }

    h3.my-3 {
        font-size: 22px;
        margin: 15px 0 !important;
    }

    .datos {
        font-size: 13px;
        line-height: 1.4;
    }

    .btn-lg {
        width: 100%;
        padding: 10px !important;
    }

    .card.card-solid {
        margin: 15px 10px;
    }
}

/* Ajustes para el menú en móviles */
@media (max-width: 767.98px) {
    .navbar {
        padding: 0.4rem 0.8rem;
        position: relative; /* create stacking context */
        z-index: 2000; /* above filters */
    }

    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .nav-item {
        margin: 0.1rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 13px;
    }

    /* Ensure collapsed navbar and dropdown overlay filters */
    .navbar-collapse.show { position: relative; z-index: 2500; }

    .navbar .dropdown-menu {
        position: absolute !important;
        z-index: 3000 !important; /* ensure above any sticky/positioned filters */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        min-width: 180px;
        max-width: 90vw;
    }

    .fa-cart-plus,
    .fa-user {
        font-size: 1.1rem;
    }

    .badge-danger {
        font-size: 0.55rem;
        padding: 0.15rem 0.3rem;
    }
}

/* ----------------------------
   DISEÑO PARA MÓVILES (VERTICAL)
---------------------------- */
@media (max-width: 767.98px) {
    footer {
        position: relative !important;
        padding: 15px 0 !important;
    }

    .main-content-container {
        display: block !important;
        padding: 0 8px !important;
    }

    /* Filtros más compactos */
    .col-md-3 {
        width: 100% !important;
        margin-bottom: 10px !important;
        position: relative !important;
        z-index: 100; /* keep filters below navbar dropdown */
    }

    .row.g-0 {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0 !important;
    }

    .col-md-9 {
        width: 100% !important;
        padding: 0 !important;
    }

    .filtros-sticky-container {
        position: relative !important;
        height: auto !important;
        max-height: none !important;
        z-index: 100; /* below navbar */
    }

    /* Filtros ultra compactos */
    .filtros-card {
        padding: 8px !important;
        background-color: #001942;
        border-radius: 6px;
        height: auto !important;
        max-height: none !important;
        margin-bottom: 5px !important;
    }

    .filtros-card h4 {
        font-size: 15px !important;
        margin-bottom: 8px !important;
        color: white;
        text-align: center;
        padding: 5px 0 !important;
    }

    .filtros-card .mb-3,
    .filtros-card .d-flex {
        margin-bottom: 6px !important;
    }

    .filtros-card .form-select,
    .filtros-card .form-control {
        font-size: 13px !important;
        padding: 5px 6px !important;
        height: 35px !important;
    }

    .filtros-card .input-group-text {
        padding: 5px 6px !important;
        font-size: 13px !important;
        height: 35px !important;
    }

    .filtros-card .btn {
        padding: 6px 10px !important;
        font-size: 13px !important;
        height: 35px !important;
    }

    .filtros-card .d-grid {
        margin-top: 8px !important;
    }

    /* Grid de productos en móvil - 2 columnas */
    .col-lg-3,
    .col-md-6,
    .col-sm-12 {
        width: 50% !important;
        padding: 4px !important;
        float: left !important;
    }

    /* Clearfix para el float */
    .row::after {
        content: "";
        display: table;
        clear: both;
    }

    .pagination {
        margin: 20px 0 25px 0 !important;
    }
}

/* TABLET - 3 productos en horizontal */
@media (min-width: 768px) and (max-width: 1024px) {
    .col-lg-3,
    .col-md-6,
    .col-sm-12 {
        width: 33.333% !important;
        padding: 8px !important;
        float: left !important;
    }
    
    .card-img-top {
        height: 180px !important;
    }
    
    .card-title {
        font-size: 16px !important;
    }
    
    .card-text {
        font-size: 13px !important;
    }
    
    /* Filtros más compactos en tablet */
    .filtros-card {
        padding: 12px !important;
    }
    
    .filtros-card h4 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    
    .filtros-card .form-select,
    .filtros-card .form-control {
        font-size: 14px !important;
        padding: 6px 8px !important;
        height: 38px !important;
    }
}

@media (min-width: 768px) {  
    .filtros-sticky-container {  
        position: sticky;  
        top: 15px;  
        height: calc(100vh - 30px);  
        overflow-y: auto;  
    }  
}

/* ====================================
   RESPONSIVE FIXES FOR MOBILE
==================================== */

.dios {
    display: grid;
    min-height: 100vh;
    grid-template-rows: auto 1fr auto;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.container-fluid {
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
}

/* FOOTER MÁS COMPACTO */
footer {
    width: 100%;
    margin-top: auto;
    padding: 15px 0 !important;
}

.footer-txt {
    padding: 15px 10px !important;
    background-color: #0c132e;
    width: 100%;
}

.header-dir {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 15px 0 !important;
    text-align: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 15px !important;
}

.footer-title {
    text-align: center;
    padding: 0;
    margin-bottom: 10px !important;
}

.iconos {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 10px !important;
}

.iconos a {
    width: 45px;
    height: 45px;
    font-size: 20px;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

.iconos a:hover {
    background-color: #cf2d3a;
    border-color: #cf2d3a;
}

.derechos {
    margin-top: 10px !important;
    font-size: 12px;
}

/* ====================================
   CARD RESPONSIVE IMPROVEMENTS
==================================== */

.card-img-top {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

/* Mobile card adjustments */
@media (max-width: 767px) {
    .dios {
        grid-template-rows: auto 1fr auto;
    }
    
    .container-fluid {
        padding: 0 8px;
    }
    
    .footer-txt {
        padding: 12px 8px !important;
    }
    
    .header-dir {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 12px 0 !important;
    }
    
    .dir h3 {
        font-size: 15px;
        margin-bottom: 5px !important;
    }
    
    .dir p {
        font-size: 13px;
        margin-bottom: 0 !important;
    }
    
    .footer-info {
        gap: 12px;
        margin-top: 12px !important;
    }
    
    .footer-title .fiat {
        font-size: 28px;
    }
    
    .iconos a {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .derechos {
        font-size: 11px;
        margin-top: 8px !important;
    }
    
    .card-img-top {
        height: 140px !important;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    .card-text {
        font-size: 12px;
    }
    
    .col-lg-3 {
        padding: 4px;
    }
    
    .card-custom {
        margin-bottom: 12px;
        padding: 8px !important;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .container-fluid {
        padding: 0 20px;
    }
    
    .header-dir {
        grid-template-columns: repeat(3, 1fr);
        margin: 20px 0 !important;
        gap: 20px;
    }
    
    .footer-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 20px !important;
    }
    
    .footer-title {
        text-align: left;
        margin-bottom: 0 !important;
    }
    
    .iconos {
        gap: 15px;
        margin-bottom: 0 !important;
    }
    
    .iconos a {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .footer-txt {
        padding: 18px 15px !important;
    }
}

/* Desktop adjustments */
@media (min-width: 1025px) {
    .container-fluid {
        padding: 0 40px;
    }
    
    .header-dir {
        grid-template-columns: repeat(3, 1fr);
        margin: 25px 80px !important;
        text-align: left;
    }
    
    .dir {
        text-align: left;
    }
    
    .footer-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin: 18px 0 !important;
    }
    
    .footer-title {
        text-align: left;
        padding-left: 5%;
    }
    
    .iconos {
        padding-right: 5%;
        gap: 20px;
    }
    
    .iconos a {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .container-fluid {
        padding: 0 5px;
    }
    
    .footer-txt {
        padding: 10px 5px !important;
    }
    
    .header-dir {
        gap: 10px;
        margin: 10px 0 !important;
    }
    
    .dir h3 {
        font-size: 14px;
    }
    
    .dir p {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .footer-title .fiat {
        font-size: 24px;
    }
    
    .iconos {
        gap: 8px;
    }
    
    .iconos a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .derechos {
        font-size: 10px;
    }
    
    .card-img-top {
        height: 120px !important;
    }
    
    .card-title {
        font-size: 13px;
    }
    
    .card-text {
        font-size: 11px;
    }
}

/* ====================================
   BOOTSTRAP 5 NAVBAR FIXES
==================================== */

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.dropdown-menu {
    background-color: #343a40;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dropdown-item {
    color: #fff;
}

/* Mobile navbar improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #343a40;
        margin-top: 8px;
        border-radius: 4px;
        padding: 8px;
        max-width: 100vw;
    }
    
    .navbar-nav .nav-item {
        margin: 4px 0;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 6px 12px;
        display: block;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.1);
        margin-top: 4px;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .dropdown-item {
        padding: 6px 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ====================================
   FORCE RESPONSIVE LAYOUT FIXES
==================================== */

.dios {
    display: grid !important;
    grid-template-rows: auto 1fr auto !important;
    min-height: 100vh !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

.dios > header,
.dios > nav { grid-row: 1 !important; }
.dios > .container-fluid { grid-row: 2 !important; min-height: 0 !important; }
.dios > footer { grid-row: 3 !important; }

footer {
    width: 100% !important;
    background-color: #0c132e !important;
    position: static !important;
    margin-top: 0 !important;
    padding: 15px 0 !important;
}

.container-fluid {
    padding: 0 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: visible !important;
}

.card-img-top {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

/* Mobile specific overrides */
@media (max-width: 767px) {
    .card-img-top {
        height: 140px !important;
    }
    
    .main-content-container {
        padding: 0 6px !important;
    }
    
    .col-lg-3, .col-md-6, .col-sm-12 {
        width: 50% !important;
        padding: 3px !important;
        float: left !important;
        box-sizing: border-box !important;
    }
    
    .card-custom {
        margin-bottom: 8px !important;
        height: auto !important;
        padding: 6px !important;
    }
    
    .card-body {
        padding: 8px !important;
    }
    
    .card-title {
        font-size: 14px !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .card-text {
        font-size: 11px !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }
    
    .card-price {
        font-size: 12px !important;
        margin-bottom: 4px !important;
        font-weight: bold !important;
    }
    
    .btn-sm {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }
    
    .d-flex.justify-content-between {
        gap: 4px !important;
        margin-top: 6px !important;
    }
    
    .pagination {
        margin: 15px auto 12px auto !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        display: flex !important;
        clear: both !important;
        position: relative !important;
        z-index: 5 !important;
        background-color: transparent !important;
    }
    
    .page-item {
        margin: 1px !important;
    }
    
    .page-link {
        padding: 5px 8px !important;
        font-size: 13px !important;
        min-width: 32px !important;
        text-align: center !important;
        border-radius: 3px !important;
    }
    
    .page-item.active .page-link {
        background-color: #007bff !important;
        border-color: #007bff !important;
        font-weight: bold !important;
    }
}

@media (max-width: 480px) {
    .card-img-top {
        height: 120px !important;
    }
    
    .main-content-container {
        padding: 0 3px !important;
    }
    
    .col-lg-3, .col-md-6, .col-sm-12 {
        padding: 2px !important;
    }
    
    .card-title {
        font-size: 12px !important;
    }
    
    .card-text {
        font-size: 10px !important;
    }
    
    .card-price {
        font-size: 11px !important;
    }
    
    .btn-sm {
        padding: 3px 6px !important;
        font-size: 10px !important;
    }
    
    .pagination {
        margin: 12px auto 8px auto !important;
        gap: 1px !important;
        display: flex !important;
        clear: both !important;
        position: relative !important;
        z-index: 5 !important;
        background-color: transparent !important;
    }
    
    .page-link {
        padding: 4px 6px !important;
        font-size: 11px !important;
        min-width: 28px !important;
    }
    
    .page-item {
        margin: 1px !important;
    }
}