﻿/* Estilos Generales */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    /* Fuente segura para acentos en mayúsculas */
    background-color: #f0f2f5;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

main {
    margin-top: 0;
}

/* --- Contenedor Principal para centrar contenido --- */
.main-container {
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* --- Header Nuevo DiseÃ±o --- */
/* --- Header V3 Alineado --- */
.header-principal {
    background-image: url('img/fondoban.png');
    background-size: cover;
    background-position: center bottom;
    padding-top: 10px;
    padding-bottom: 0px;
    width: 100%;
    border-bottom: 3px solid #003366;
    /* LÃ­nea azul fuerte al final de todo el header */
}

.header-layout-v3 {
    display: flex;
    align-items: flex-end;
    /* Alinear todo abajo */
    padding-bottom: 0px;
    gap: 15px;
}

/* Columna 1: Icono */
.header-icon-col {
    flex-shrink: 0;
    padding-bottom: 5px;
    /* Ajuste fino */
}

.img-gota {
    height: 100px;
    /* TamaÃ±o grande icono */
    display: block;
}

/* Columna 2: Contenido */
.header-content-col {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
}

/* Fila Superior: Titulo y TelÃ©fonos */
.header-row-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.img-titulo {
    height: 40px;
    display: block;
    max-width: 100%;
    object-fit: contain;
}

.header-phones-box {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.phone-line {
    font-family: Arial, sans-serif;
    font-weight: 900;
    color: #003366;
    font-size: 20px;
    line-height: 1.2;
    display: block;
}

.whatsapp-text-link {
    text-decoration: none;
    color: #003366;
    cursor: pointer;
}

.whatsapp-text-link:hover {
    color: #25D366;
    /* Verde sutil al hover para indicar link */
}

/* Fila Inferior: MenÃº e Iconos */
.header-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 8px;
}

/* Nav */
.header-nav ul {
    display: flex;
    gap: 12px;
    /* Reducido drÃ¡sticamente de 20px */
    padding: 0;
    margin: 0;
    list-style: none;
}

.header-nav ul li a {
    text-decoration: none;
    text-transform: uppercase;
    color: #444;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    padding: 5px 2px;
    /* Reducido padding lateral */
    background: transparent;
    transition: color 0.2s;
    white-space: nowrap;
    /* Evitar que se rompa el texto */
}

/* Hover y Active: Azul */
.header-nav ul li a:hover,
.header-nav ul li a:focus,
.header-nav ul li a.active {
    color: #003366;
    background: transparent;
    outline: none;
}



/* Herramientas (Login + Buscador + Social) */
.header-tools-v3 {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Login BotÃ³n */
.btn-login {
    font-size: 11px;
    font-weight: bold;
    text-decoration: none;
    color: #666;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    transition: all 0.2s;
}

.btn-login:hover {
    color: #003366;
    border-color: #003366;
    background: #f0f8ff;
}

/* Buscador Integrado (Lupa adentro) */
.search-form-integrated {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ccc;
    padding: 0;
    border-radius: 2px;
    height: 26px;
    width: 200px;
    max-width: 100%;
    overflow: hidden;
}

.input-integrated {
    border: none;
    background: transparent;
    padding: 0 5px 0 8px;
    flex-grow: 1;
    font-size: 11px;
    color: #666;
    height: 100%;
    outline: none;
}

.btn-lupa-integrated {
    background: #fff;
    border: none;
    border-left: 1px solid #eee;
    /* Separador sutil */
    color: #666;
    cursor: pointer;
    font-size: 12px;
    padding: 0 8px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-lupa-integrated:hover {
    color: #003366;
    background: #f9f9f9;
}

.social-v3 {
    display: flex;
    gap: 5px;
}

.social-v3 img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .header-layout-v3 {
        flex-direction: column;
        align-items: center;
    }

    .header-row-top {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .header-row-bottom {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .header-phones-box {
        text-align: center;
    }

    .header-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* --- Slider / Carrusel (Solo para index.php) --- */
.slider-container {
    height: 447px;
    width: 100%;
    max-width: 980px;
    /* Ancho mÃ¡ximo del carrusel */
    margin: 0 auto;
}

.slider-container img {
    height: 447px;
    width: 100%;
    object-fit: cover;
}

.swiper {
    height: 100%;
    width: 100%;
}

:root {
    --swiper-navigation-color: #ffffff;
    --swiper-pagination-color: #ffffff;
}

/* --- PRODUCTOS DESTACADOS QUE SE SOLAPAN SOBRE EL CARRUSEL --- */
#seccion-destacados {
    margin-top: -50px;
    /* Solapamiento mÃ¡s pronunciado */
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.destacados-container {
    background: #333333;
    border-radius: 0;
    padding: 25px 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    color: #FFF;
    position: relative;
    border: none;
    width: 90%;
    /* 90% del ancho del contenedor padre */
    max-width: 880px;
    /* Un poco menos que los 980px del carrusel */
    margin: 0 auto;
    /* Centrado */
}

.destacados-container h2 {
    text-align: left;
    margin: 0 0 20px 0;
    font-size: 28px;
    color: #FFF;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.grid-productos-destacados {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.grid-productos-destacados::-webkit-scrollbar {
    display: none;
}

.destacados-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #374151;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.destacados-btn-prev {
    left: -25px;
}

.destacados-btn-next {
    right: -25px;
}

.destacados-btn:hover {
    background: #4b5563;
    transform: translateY(-50%) scale(1.1);
}

.card-producto-destacado {
    width: 215px;
    flex-shrink: 0;
    background: #4b5563;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-producto-destacado:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.card-producto-destacado .card-imagen {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 10px;
    border-bottom: 1px solid #9ca3af;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.card-producto-destacado .card-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-producto-destacado .card-cuerpo {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.card-producto-destacado .card-texto {
    flex-grow: 1;
}

.card-producto-destacado .categoria {
    margin: 0 0 5px 0;
    color: #d1d5db;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.card-producto-destacado h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #fff;
    font-weight: bold;
    line-height: 1.2;
    min-height: 40px;
}

.card-producto-destacado .descripcion {
    margin: 0 0 10px 0;
    color: #e5e7eb;
    font-size: 0.8rem;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* EstÃ¡ndar para compatibilidad futura */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.card-producto-destacado .card-boton-container {
    margin-top: auto;
    padding-top: 10px;
}

.btn-ver-mas-destacado {
    display: inline-block;
    background: #1e40af;
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
    min-width: 120px;
    transition: background-color 0.2s ease;
}

.btn-ver-mas-destacado:hover {
    background-color: #2b57c8;
}

.no-productos-destacados {
    color: #fff;
    text-align: center;
    width: 100%;
    padding: 40px;
}


/* =================================================================== */
/* --- SECCIÃ“N CATÃ LOGO Y FILTROS --- */
/* =================================================================== */
.catalogo-container {
    display: grid;
    grid-template-columns: 265px 1fr;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Nuevas secciones stackeadas para el index */
.section-home-stack {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* --- Barra Lateral de Filtros --- */
.filtros-sidebar .sidebar-widget {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    /* Resplandor gris más fuerte (más opacidad) */
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 5px;
}

.filtros-sidebar .sidebar-widget h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.filtros-sidebar .sidebar-widget .widget-arbol-categorias-container {
    padding: 0 !important;
    background: #fff !important;
    /* max-height: 450px !important; REMOVED FOR GRID STYLE */
    /* overflow-y: auto !important; REMOVED FOR GRID STYLE */
    border-radius: 4px !important;
}

.filtros-sidebar .sidebar-widget ul {
    padding: 0;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f1f1;
}

.filtros-sidebar .sidebar-widget ul::-webkit-scrollbar {
    width: 8px;
}

.filtros-sidebar .sidebar-widget ul::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.filtros-sidebar .sidebar-widget ul::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.filtros-sidebar .sidebar-widget ul::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.filtros-sidebar .sidebar-widget ul li a {
    display: block;
    padding: 6px 4px;
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}

.filtros-sidebar .sidebar-widget ul li:last-child a {
    border-bottom: none;
}

.filtros-sidebar .sidebar-widget ul li a:hover {
    color: #0d6efd;
    padding-left: 8px;
}

.filtros-sidebar .sidebar-widget ul li a.activo {
    font-weight: bold;
    color: #007bff;
    background-color: #e6f2ff;
    border-radius: 3px;
}

.filtros-sidebar .sidebar-widget select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
}

.filtros-sidebar .sidebar-widget p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.form-suscripcion {
    display: flex;
}

.form-suscripcion input {
    flex-grow: 1;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px 0 0 4px;
}

.form-suscripcion button {
    border: none;
    background-color: #333;
    color: white;
    padding: 0 15px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

/* =================================================================== */
/* --- ESTILOS PARA PRODUCTOS SIN BOTÃ“N (TODO EL RECUADRO CLICKEABLE) --- */
/* =================================================================== */

/* Para catalogo.php (con sidebar) */
.catalogo-container .lista-productos .producto-item-sin-boton {
    display: flex;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    height: 110px;
    box-sizing: border-box;
    cursor: pointer;
}

/* Para index.php (sin sidebar en esta secciÃ³n especÃ­fica) */
.lista-productos .producto-item-sin-boton {
    display: flex;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    height: 110px;
    box-sizing: border-box;
    cursor: pointer;
}

.producto-item-sin-boton:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.producto-item-sin-boton .producto-imagen {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-item-sin-boton .producto-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.producto-item-sin-boton .producto-info {
    flex-grow: 1;
    overflow: hidden;
}

.producto-item-sin-boton .categoria-lista {
    margin: 0 0 2px 0;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
}

.producto-item-sin-boton .producto-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #0D6EFD;
    /* Azul brillante solicitado */
    font-weight: bold;
}

.producto-item-sin-boton .descripcion-larga {
    margin: 0;
    font-size: 0.65rem;
    line-height: 1.4;
    color: #666;
}

/* Enlace que cubre todo el producto */
.producto-link-completo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
}

/* Responsive para productos sin botÃ³n */
@media (max-width: 600px) {
    .producto-item-sin-boton {
        height: auto;
        flex-direction: column;
        position: relative;
    }

    .producto-item-sin-boton .producto-info {
        padding-top: 15px;
    }

    .producto-item-sin-boton .producto-imagen {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* =================================================================== */
/* --- ESTILOS PARA CABECERA DE CATÃ LOGO Y PAGINACIÃ“N --- */
/* =================================================================== */
.cabecera-catalogo {
    margin-bottom: 20px;
}

.cabecera-catalogo .breadcrumb {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.cabecera-catalogo .breadcrumb a {
    text-decoration: none;
    color: #333;
}

.cabecera-catalogo .breadcrumb a:hover {
    text-decoration: underline;
}

.cabecera-catalogo h1 {
    font-size: 2.2rem;
    color: #0D6EFD;
    /* Azul brillante solicitado */
    margin: 0;
    border-bottom: 3px solid #eee;
    padding-bottom: 10px;
}

.cabecera-catalogo .subtitulo-marca {
    font-size: 1.8rem;
    color: #003366;
    margin: 5px 0 0 0;
    font-weight: normal;
}

.panel-de-control {
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.controles-superiores {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 8px 10px;
    border-radius: 5px;
}

.controles-derecha {
    display: flex;
    align-items: center;
    gap: 15px;
}

.controles-inferiores {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.resumen-articulos {
    color: #555;
    white-space: nowrap;
}

.ordenar-por-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ordenar-por-wrapper form {
    margin: 0;
}

.btn-orden-direccion {
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-orden-direccion:hover {
    background-color: #e9ecef;
    border-color: #aaa;
}

.paginacion ul {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.paginacion li span {
    font-weight: normal;
    margin-right: 4px;
}

.paginacion a {
    display: block;
    padding: 4px 8px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.paginacion a:hover {
    background-color: #eee;
    border-color: #aaa;
}

.paginacion a.pagina-actual {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    font-weight: bold;
}

.paginacion .btn-siguiente,
.paginacion .btn-anterior,
.paginacion .btn-extremo {
    background-color: #f8f9fa;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 4px 6px;
}

.paginacion .btn-siguiente:hover,
.paginacion .btn-anterior:hover,
.paginacion .btn-extremo:hover {
    background-color: #e9ecef;
}


/* --- Responsive --- */
@media (max-width: 980px) {
    .controles-superiores {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .lista-productos .producto-item {
        height: auto;
        flex-direction: column;
    }

    .lista-productos .producto-info {
        padding-right: 0;
        padding-top: 15px;
    }

    .lista-productos .producto-boton {
        position: static;
        margin-top: 15px;
        align-self: flex-start;
    }

    .controles-superiores {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* =================================================================== */
/* --- ESTILOS PARA PÃ GINA DE NEWSLETTER --- */
/* =================================================================== */

.mensaje-newsletter {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 40px;
    text-align: center;
    border-radius: 5px;
}

.mensaje-newsletter h2 {
    font-size: 2rem;
    margin: 0 0 15px 0;
}

.mensaje-newsletter p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.mensaje-newsletter.exito h2 {
    color: #007bff;
    /* Azul */
}

.mensaje-newsletter.error h2 {
    color: #c40000;
    /* Rojo */
}

.btn-volver {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.btn-volver:hover {
    background-color: #0056b3;
}

/* =================================================================== */
/* --- ESTILOS PARA PRODUCTOS DESTACADOS FIJOS (2 filas de 5) --- */
/* =================================================================== */

.grid-productos-destacados-fijo {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fila-productos {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    width: 100%;
}

.card-producto-destacado-fijo {
    background: #4b5563;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card-producto-destacado-fijo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.card-imagen-fija {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 15px;
    border-bottom: 1px solid #9ca3af;
}

.card-imagen-fija img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-cuerpo-fijo {
    padding: 15px;
    text-align: center;
}

.categoria-fija {
    margin: 0;
    color: #d1d5db;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.2;
}

/* Responsive para tablets */
@media (max-width: 980px) {
    .fila-productos {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* Responsive para mÃviles */
@media (max-width: 600px) {
    .fila-productos {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .card-imagen-fija {
        height: 100px;
        padding: 10px;
    }

    .card-cuerpo-fijo {
        padding: 10px;
    }

    .categoria-fija {
        font-size: 0.75rem;
    }
}

/* =================================================================== */
/* --- ESTILOS PARA FOOTER --- */
/* =================================================================== */

.footer-principal {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px 0;
    margin-top: 50px;
    border-top: 4px solid #007bff;
    /* LÃnea azul pegada arriba */
}

.footer-top-line {
    display: none;
    /* Eliminamos la lÃnea separada */
}

.footer-container {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    padding: 0 20px;
    align-items: start;
}

.footer-columna h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.footer-columna p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.footer-branding {
    display: flex;
    flex-direction: column;
}

.afip-data-web img {
    max-width: 100px;
    height: auto;
    margin-top: 10px;
}

.footer-enlaces ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.footer-enlaces ul li {
    display: flex;
    align-items: center;
}

.footer-enlaces ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.footer-enlaces ul li a:hover {
    color: #007bff;
}

.separador-footer {
    color: #666;
    margin: 0 5px;
}

.footer-enlaces>p {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 15px;
}

.footer-desarrollado {
    text-align: right;
}

.footer-desarrollado p {
    color: #999;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.footer-desarrollado p:last-child {
    font-weight: bold;
    color: #ccc;
}

/* Responsive para footer */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .footer-enlaces ul {
        justify-content: center;
    }

    .footer-desarrollado {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-principal {
        padding: 30px 0 15px 0;
    }

    .footer-enlaces ul {
        flex-direction: column;
        gap: 10px;
    }

    .separador-footer {
        display: none;
    }
}

/* =================================================================== */
/* --- RESPONSIVE PARA MÃVILES --- */
/* =================================================================== */

@media (max-width: 768px) {

    /* Header mÃvil */
    .header-container {
        flex-direction: column;
        height: auto;
    }

    .logo {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .header-content-right {
        width: 100%;
    }

    .header-bottom-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        height: auto;
    }

    .navegacion-principal ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .form-search {
        max-width: 100%;
    }

    /* Carrusel mÃvil */
    .slider-container {
        height: 300px;
    }

    .slider-container img {
        height: 300px;
        object-fit: cover;
        /* Mantener proporciÃn */
    }

    /* Productos destacados mÃvil - CORREGIDO */
    #seccion-destacados {
        margin-top: -30px;
    }

    .destacados-container {
        width: 95%;
        padding: 20px 15px;
        margin: 0 auto;
    }

    .destacados-container h2 {
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 15px;
    }

    .grid-productos-destacados-fijo {
        gap: 15px;
    }

    .fila-productos {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columnas en mÃvil */
        gap: 12px;
    }

    .card-producto-destacado-fijo {
        aspect-ratio: 1 / 1.2;
        /* Mantener proporciÃn cuadrada */
        display: flex;
        flex-direction: column;
    }

    .card-imagen-fija {
        height: 120px;
        /* Altura fija */
        padding: 15px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ffffff;
    }

    .card-imagen-fija img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        /* No deformar imÃ¡genes */
    }

    .card-cuerpo-fijo {
        padding: 12px;
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .categoria-fija {
        font-size: 0.8rem;
        line-height: 1.3;
        margin: 0;
        word-wrap: break-word;
    }

    /* Layout catÃ¡logo mÃvil */
    .catalogo-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    .filtros-sidebar {
        order: 2;
    }

    .lista-productos {
        order: 1;
    }

    /* Sidebar filtros mÃvil */
    .filtros-sidebar .sidebar-widget {
        padding: 15px;
    }

    .filtros-sidebar .sidebar-widget h3 {
        font-size: 1.1rem;
    }

    /* Productos lista mÃvil - CORREGIDO */
    .producto-item-sin-boton {
        height: auto;
        flex-direction: column;
        padding: 15px;
        min-height: 140px;
    }

    .producto-item-sin-boton .producto-imagen {
        width: 100%;
        height: 100px;
        margin-right: 0;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .producto-item-sin-boton .producto-imagen img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        /* No deformar imÃ¡genes */
    }

    .producto-item-sin-boton .producto-info {
        padding-right: 0;
        text-align: center;
    }

    .producto-item-sin-boton .producto-info h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .producto-item-sin-boton .descripcion-larga {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Controles de catÃ¡logo mÃvil */
    .controles-superiores {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .controles-derecha {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .ordenar-por-wrapper {
        width: 100%;
    }

    #form-por-pagina,
    #form-ordenar-por {
        width: 100%;
    }

    #form-por-pagina select,
    #form-ordenar-por select {
        width: 100%;
    }

    /* PaginaciÃn mÃvil */
    .paginacion ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .paginacion a {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {

    /* MÃviles muy pequeÃos */
    .slider-container {
        height: 250px;
    }

    .slider-container img {
        height: 250px;
    }

    #seccion-destacados {
        margin-top: -20px;
    }

    .destacados-container {
        padding: 15px 10px;
    }

    .fila-productos {
        grid-template-columns: repeat(2, 1fr);
        /* Mantener 2 columnas */
        gap: 10px;
    }

    .card-imagen-fija {
        height: 100px;
        padding: 12px;
    }

    .card-cuerpo-fijo {
        padding: 10px;
    }

    .categoria-fija {
        font-size: 0.75rem;
    }

    /* MenÃº mÃvil compacto */
    .navegacion-principal ul {
        gap: 8px;
    }

    .navegacion-principal ul li a {
        font-size: 0.8rem;
        padding: 8px 0;
    }

    /* Productos mÃ¡s compactos */
    .producto-item-sin-boton {
        padding: 12px;
        min-height: 120px;
    }

    .producto-item-sin-boton .producto-imagen {
        height: 80px;
    }

    .producto-item-sin-boton .producto-info h4 {
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {

    /* MÃviles muy pequeÃos - una columna */
    .fila-productos {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .card-producto-destacado-fijo {
        aspect-ratio: 1 / 1;
    }

    .card-imagen-fija {
        height: 120px;
    }
}


/* Mejoras de usabilidad tÃ¡ctil */
@media (max-width: 768px) {
    .producto-item-sin-boton {
        min-height: 60px;
    }

    .card-producto-destacado-fijo {
        min-height: 120px;
    }

    /* Asegurar que los botones sean fÃ¡ciles de tocar */
    select,
    .btn-orden-direccion,
    .paginacion a {
        min-height: 44px;
        min-width: 44px;
    }

    .form-suscripcion input,
    .form-suscripcion button {
        min-height: 44px;
    }
}

/* =================================================================== */
/* --- ESTILOS CORREGIDOS Y UNIFICADOS PARA HEADER (VERSIÃN FINAL) --- */
/* =================================================================== */

/* NOTA: El header ahora usarÃ¡ la clase .main-container definida al inicio del archivo. */

/* --- Estructura Principal del Header con FONDO --- */
.site-header {
    width: 100%;
    background-image: url('img/fondoban.png');
    background-size: cover;
    background-position: center;
}

/* --- Parte Superior (Logo, Nombre, TelÃfonos) --- */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: wrap;
}

/* Contenedor para alinear logo y nombre juntos */
.logo-and-name {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container img {
    height: 60px;
    width: auto;
    display: block;
}

.company-name {
    font-size: 2rem;
    color: #333;
    margin: 0;
    font-weight: bold;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.contact-info span {
    margin-bottom: 5px;
}

.contact-info i {
    color: #0d6efd;
    margin-right: 5px;
}

/* --- Parte Inferior (MenÃº, Buscador, Redes) --- */
.header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333;
}

.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 5px 0;
    transition: color 0.2s ease-in-out;
}

.main-navigation a:hover {
    color: #0d6efd;
}

.search-social-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-search {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
}

.form-search .input-text {
    border: none;
    padding: 8px 12px;
    background: transparent;
}

.form-search .button {
    border: none;
    background-color: #0d6efd;
    color: white;
    padding: 0 12px;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #333;
    font-size: 1.3rem;
    transition: color 0.2s ease-in-out;
}

.social-icons a:hover {
    color: #0d6efd;
}

/* --- Ajuste para el enlace de WhatsApp en el header --- */
.contact-info a {
    text-decoration: none;
    /* Quita el subrayado */
    color: inherit;
    /* Hereda el color del texto (negro) */
    display: block;
    /* Asegura que se comporte como la lÃnea de arriba */
    margin-bottom: 5px;
}


/* =================================================================== */
/* --- MEDIA QUERIES PARA EL HEADER (Responsivo) --- */
/* =================================================================== */

@media (max-width: 991px) {
    .site-header .main-container {
        padding: 0;
        /* Evitar doble padding en mÃvil */
    }

    .site-header .header-top,
    .site-header .header-bottom {
        flex-direction: column;
        gap: 20px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .site-header .contact-info {
        align-items: center;
    }

    .site-header .main-navigation {
        width: 100%;
    }

    .site-header .main-navigation ul {
        justify-content: center;
    }
}


@media (max-width: 768px) {
    .site-header .header-top {
        padding-bottom: 0;
    }

    .site-header .header-bottom {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .site-header .menu-toggle {
        display: block;
    }

    .site-header .main-navigation {
        display: none;
        order: 3;
        width: 100%;
        margin-top: 15px;
    }

    .site-header .main-navigation.is-active {
        display: block;
    }

    .site-header .main-navigation ul {
        flex-direction: column;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 5px;
        padding: 10px 0;
    }

    .site-header .main-navigation ul a {
        padding: 10px 0;
        width: 100%;
        text-align: center;
    }
}

/* =================================================================== */
/* --- ESTILOS PARA LA PÃ GINA DE CONTACTO (contacto.php) --- */
/* =================================================================== */

/* Contenedor principal del contenido de la pÃ¡gina */
.contenido-principal {
    background-color: #ffffff;
    padding: 25px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

/* Enlace 'Volver atrÃ¡s' */
.volver-atras-enlace {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #0d6efd;
    text-decoration: none;
    font-weight: bold;
}

.volver-atras-enlace:hover {
    text-decoration: underline;
}

/* Contenedor del formulario */
.contenedor-formulario {
    margin-top: 25px;
}

/* Mensaje de error del formulario */
.mensaje-error-formulario {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Estilo general del formulario */
.form-contacto {
    width: 100%;
}

.fila-formulario {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.campo-formulario {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.campo-full-width {
    width: 100%;
}

.campo-formulario label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.campo-formulario input[type='text'],
.campo-formulario input[type='email'],
.campo-formulario textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    /* Asegura que el padding no altere el ancho */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campo-formulario input:focus,
.campo-formulario textarea:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    outline: none;
}

.campo-formulario textarea {
    resize: vertical;
    /* Permite redimensionar solo verticalmente */
}

/* Campo anti-spam (oculto) */
.campo-honeypot {
    display: none;
}

/* Texto de campos requeridos */
.campos-requeridos {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 20px 0;
}

/* Contenedor del botÃn de envÃo */
.boton-enviar-contenedor {
    text-align: right;
}

.btn-enviar {
    background-color: #0d6efd;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-enviar:hover {
    background-color: #0056b3;
}

/* InformaciÃn de direcciÃn al final */
.info-direccion {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

/* --- Responsive para el formulario de contacto --- */
@media (max-width: 600px) {
    .fila-formulario {
        flex-direction: column;
        gap: 0;
    }

    .campo-formulario {
        margin-bottom: 20px;
    }

    .boton-enviar-contenedor {
        text-align: center;
    }

    .btn-enviar {
        width: 100%;
    }
}

/* =================================================================== */
/* --- ESTILOS PARA PÃ GINA DE LOGIN Y REGISTRO (login.php) --- */
/* =================================================================== */

.login-register-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.form-container {
    background-color: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.form-container h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    color: #003366;
}

.form-container p {
    margin: 0 0 25px 0;
    color: #555;
    font-size: 0.95rem;
}

.campo {
    margin-bottom: 20px;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.campo input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.btn-principal,
.btn-secundario {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-principal {
    background-color: #0d6efd;
    color: #fff;
}

.btn-principal:hover {
    background-color: #0056b3;
}

.btn-secundario {
    background-color: #6c757d;
    color: #fff;
}

.btn-secundario:hover {
    background-color: #5a6268;
}

.mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9rem !important;
    /* Sobrescribe otros p */
}

.mensaje-exito {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9rem !important;
    /* Sobrescribe otros p */
}


@media (max-width: 768px) {
    .login-register-container {
        grid-template-columns: 1fr;
    }
}

/* --- Estilo para el enlace de Logout en el header del cliente --- */
.logout-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.logout-link:hover {
    color: #0d6efd;
    /* O el color que prefieras para el hover */
}


/* Estilos para el Ã¡rbol de categorÃas */
.categorias-arbol {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.categorias-arbol ul {
    list-style: none;
    padding-left: 15px;
    margin: 5px 0;
}

.categorias-arbol li {
    margin: 3px 0;
    position: relative;
}

.categorias-arbol li.tiene-hijos>a {
    font-weight: bold;
}

.categorias-arbol a {
    display: block;
    padding: 5px 8px;
    text-decoration: none;
    color: #555;
    border-radius: 3px;
    transition: all 0.3s;
    font-size: 14px;
}

.categorias-arbol a:hover {
    background-color: #f5f5f5;
}

.categorias-arbol a.activo {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.categorias-arbol .nivel-1 {
    margin-left: 10px;
}

.categorias-arbol .nivel-2 {
    margin-left: 20px;
}

.categorias-arbol .nivel-3 {
    margin-left: 30px;
}

.categorias-arbol .nivel-4 {
    margin-left: 40px;
}

.subcategorias {
    border-left: 2px solid #e0e0e0;
    margin-left: 5px;
}

/* Contenedor del Ã¡rbol de categorÃas con scroll */
.filtros-sidebar .categorias-arbol {
    max-height: 450px;
    /* Ajusta esta altura como quieras */
    overflow-y: auto;
    /* Â¡El scroll! */
    border: 1px solid #eee;
    padding: 10px;
}

/* Estilos de la lista */
.categorias-arbol ul {
    list-style: none;
    padding-left: 0;
}

.categorias-arbol ul.subcategorias {
    display: none;
    /* Ocultas por defecto */
    padding-left: 20px;
    /* IndentaciÃn */
}

.categorias-arbol li {
    padding: 2px 0;
}

/* Estilo del botÃn [+] y del espacio vacÃo */
.categorias-arbol .toggle,
.categorias-arbol .toggle-placeholder {
    display: inline-block;
    width: 15px;
    height: 15px;
    text-align: center;
    line-height: 15px;
    margin-right: 5px;
    font-weight: bold;
    font-family: monospace;
    border: 1px solid #ccc;
    vertical-align: middle;
}

.categorias-arbol .toggle-placeholder {
    border-color: transparent;
    /* Espacio vacÃo */
}

.categorias-arbol .toggle {
    cursor: pointer;
    color: #007bff;
    background: #f4f4f4;
}

.categorias-arbol .toggle:hover {
    background: #e0e0e0;
}

.categorias-arbol li>a {
    display: inline-block;
    vertical-align: middle;
}

/* Estilo para las etiquetas de categorÃa en producto_detalle.php */
.categorias-etiquetas {
    margin: 10px 0;
}

.etiqueta-categoria {
    display: inline-block;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px 8px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-decoration: none;
    color: #333;
}

.etiqueta-categoria:hover {
    background-color: #e0e0e0;
}

/* =================================================================== */
/* --- ESTILOS PARA MENÃš DESPLEGABLE EN HEADER --- */
/* =================================================================== */

.menu-desplegable {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle .fa-caret-down {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.menu-desplegable:hover .dropdown-toggle .fa-caret-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.menu-desplegable:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 0.85rem;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

/* Estilo para el enlace de logout */
.logout-link {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive para el menÃº desplegable */
@media (max-width: 768px) {
    .menu-desplegable {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding-left: 20px;
    }

    .dropdown-menu a {
        padding: 10px 0;
    }
}

/* Estilo para la informaciÃn del usuario */
.user-info {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.user-info span {
    font-size: 0.9rem;
    background: rgba(13, 110, 253, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.user-info .fa-user {
    margin-right: 5px;
}

/* Ajustes para el menÃº en mÃviles */
@media (max-width: 768px) {
    .user-info {
        width: 100%;
        justify-content: center;
        margin: 10px 0;
    }

    .user-info span {
        text-align: center;
    }
}


/* Panel Productos Destacados - Ajuste de PosiciÃn */
.destacados-container {
    background-color: #333333;
    /* Gris oscuro */
    color: white;
    padding: 20px;
    margin-top: -80px;
    /* Sube sobre el slider. AJUSTAR ESTE VALOR. */
    position: relative;
    z-index: 10;
    width: 97%;
    /* <--- AJUSTADO: MÃ¡s angosto que el banner */
    /* Un poco menos del 100% para asegurar margen en mÃviles */
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    border: none !important;
}

.destacados-container h2 {
    color: white;
    margin-top: 0;
    text-transform: uppercase;
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: none;
}

/* Corrección de borde footer para coincidir con header */
.footer-top-line {
    background-color: #003366 !important;
    height: 3px !important;
    border: none !important;
    width: 100%;
}

.footer-principal {
    border-top: none !important;
    /* Por si acaso tenía otro borde */
}

/* AJUSTES FINALES FOOTER - Linea y Botones */
.footer-top-line {
    display: block !important;
    width: 100% !important;
    height: 3px !important;
    background-color: #003366 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Enlaces Footer estilo Header */
.footer-enlaces ul li a {
    text-decoration: none;
    text-transform: uppercase;
    color: #444 !important;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-enlaces ul li a:hover {
    color: #003366 !important;
}

.separador-footer {
    color: #444 !important;
    font-weight: bold;
}

/* RE-AJUSTE FOOTER (Texto Blanco / Hover Azul Header) */
.footer-principal {
    padding-top: 0 !important;
    position: relative;
    background-color: #333333 !important;
    /* Fondo Gris Oscuro */
}

.footer-top-line {
    height: 3px !important;
    background-color: #003366 !important;
    width: 100%;
    border: none;
}

.footer-enlaces ul li a {
    color: #FFFFFF !important;
    /* Texto BLANCO */
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.3s;
}

.footer-enlaces ul li a:hover {
    color: #003366 !important;
    /* Azul del Header al pasar mouse */
}

.separador-footer {
    color: #FFFFFF !important;
}


/* Sombra difuminada global debajo del header */
main {
    position: relative;
    display: flow-root;
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(0, 51, 102, 0.5) 0%, rgba(0, 51, 102, 0) 100%);
    z-index: 99;
    pointer-events: none;
}

/* Modificacion solicitada: Fondo transparente para el contenedor de la derecha */
.contenido-principal {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* =================================================================== */
/* --- RESPONSIVE DESIGN (MOBILE & TABLET) --- */
/* =================================================================== */

@media (max-width: 980px) {

    .main-container,
    .slider-container,
    .header-principal .main-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }

    .header-layout-v3 {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .header-icon-col {
        padding-bottom: 0;
        text-align: center;
    }

    .header-content-col {
        width: 100%;
        align-items: center;
    }

    .header-row-top {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
        text-align: center;
    }

    .header-phones-box {
        text-align: center;
        align-items: center;
    }

    .header-row-bottom {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .header-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .header-tools-v3 {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .slider-container {
        height: auto !important;
        min-height: 200px;
    }

    .slider-container img {
        height: auto !important;
        object-fit: contain;
    }

    /* Solapamiento estilo Desktop adaptado a Móvil */
    #seccion-destacados {
        margin-top: 0 !important;
        position: relative;
        z-index: 10;
    }

    .destacados-container {
        width: 94% !important;
        /* Un poco más angosto para efecto tarjeta */
        margin: 0 auto !important;
        /* Centrado */
        margin-top: -50px !important;
        /* EL SOLAPAMIENTO: Subir sobre el slider */
        padding: 10px !important;
        position: relative;
        background-color: #333;
        /* Asegurar fondo sólido */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        /* Sombra para profundidad */
        border-radius: 4px;
        /* Bordes redondeados sutiles */
    }

    /* Slider normal con scroll horizontal */
    .grid-productos-destacados {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
    }

    /* Destacados FIJOS: Grilla continua de 2 columnas sin scroll horizontal */
    .grid-productos-destacados-fijo {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        overflow-x: visible !important;
        width: 100% !important;
        padding-bottom: 0 !important;
    }

    /* "Unwrap" las filas de 5 items para que fluyan todos juntos */
    .fila-productos {
        display: contents !important;
    }

    .card-producto-destacado-fijo {
        width: 100% !important;
        margin: 0 !important;
        height: auto !important;
    }

    .catalogo-container {
        display: flex;
        flex-direction: column;
    }

    .filtros-sidebar {
        width: 100% !important;
        margin-bottom: 20px;
    }

    .sidebar-widget {
        width: 100%;
    }

    .lista-productos {
        width: 100%;
    }

    .producto-item-sin-boton {
        height: auto;
        flex-direction: column;
        text-align: center;
    }

    .producto-item-sin-boton .producto-imagen {
        margin-right: 0;
        margin-bottom: 10px;
        justify-content: center;
        width: 100%;
    }

    .producto-item-sin-boton .producto-info {
        text-align: center;
    }

    .controles-superiores {
        flex-direction: column;
        gap: 5px !important;
        height: auto;
        padding: 5px !important;
    }

    .resumen-articulos {
        font-size: 11px !important;
        text-align: center;
        width: 100%;
        margin-bottom: 5px;
    }

    .controles-derecha {
        width: 100%;
        justify-content: center;
        margin-top: 0 !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 15px !important;
        /* Separar un poco los grupos */
        align-items: center;
    }

    /* Formularios en línea para ocupar menos ancho */
    .controles-derecha form,
    #form-por-pagina,
    .ordenar-por-wrapper {
        display: flex !important;
        align-items: center !important;
        width: auto !important;
        /* CRUDO: No ocupar ancho completo */
        margin: 0 !important;
    }

    /* Labels chicos */
    .controles-derecha label {
        font-size: 11px !important;
        margin-right: 4px !important;
        margin-bottom: 0 !important;
        white-space: nowrap;
    }

    /* Selects chicos y angostos */
    .controles-derecha select {
        padding: 0 4px !important;
        height: 28px !important;
        font-size: 11px !important;
        width: auto !important;
        /* CLAVE: Ancho automático según contenido */
        min-width: 50px !important;
        max-width: 120px !important;
        background-position: right 4px center !important;
    }

    .btn-orden-direccion {
        height: 28px !important;
        width: 28px !important;
        /* Botón cuadrado chico */
        padding: 0 !important;
        font-size: 12px !important;
        min-height: 0 !important;
        line-height: 26px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 2px;
    }

    /* Paginación - Recuadros chicos */
    .paginacion {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 3px !important;
    }

    .paginacion a,
    .paginacion span,
    .paginacion .current {
        width: 30px !important;
        height: 30px !important;
        line-height: 28px !important;
        padding: 0 !important;
        font-size: 12px !important;
        min-width: unset !important;
        min-height: unset !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

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

    .footer-enlaces ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .separador-footer {
        display: none;
    }
}

@media (max-width: 480px) {

    /* Ajustes finos para teléfonos pequeños */
    .header-nav ul li a {
        font-size: 12px;
        padding: 5px 3px;
        display: block;
    }

    .phone-line {
        font-size: 18px;
        /* Aumentado 1 punto más (Total +3) */
        white-space: nowrap;
    }

    .img-titulo {
        height: auto;
        max-height: 34px;
        /* Aumentado un poco más */
        max-width: 100%;
    }

    .img-gota {
        height: 80px;
    }

    .header-layout-v3 {
        padding-left: 5px;
        padding-right: 5px;
    }

    .search-form-integrated {
        width: 100%;
        max-width: 240px;
    }

    .btn-login {
        width: 100%;
        justify-content: center;
        font-size: 10px;
    }

    body,
    html {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    /* --- REORDENAMIENTO EXCLUSIVO MOBILE --- */

    .catalogo-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        margin-top: 15px !important;
        padding: 0 10px;
        /* Margen lateral general */
    }

    .filtros-sidebar {
        display: contents !important;
    }

    /* Ajuste de ancho y márgenes para los widgets (Categorías, etc) */
    .filtros-sidebar>.sidebar-widget {
        order: 1 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        /* El padding interno ya lo tiene la clase .sidebar-widget */
    }

    /* 1. Categorías (Primer widget) */
    .filtros-sidebar>.sidebar-widget:nth-of-type(1) {
        order: 1 !important;
    }

    /* 2. Listado de Productos - DISEÑO HORIZONTAL (Imagen Izq - Texto Der) */
    .lista-productos,
    .contenido-principal {
        order: 2 !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .producto-item-sin-boton {
        display: flex !important;
        flex-direction: row !important;
        /* Horizontal */
        align-items: flex-start !important;
        text-align: left !important;
        height: auto !important;
        min-height: 120px;
        /* Altura mínima consistente */
        padding: 10px !important;
    }

    .producto-item-sin-boton .producto-imagen {
        width: 100px !important;
        /* Ancho fijo imagen */
        height: 100px !important;
        flex-shrink: 0 !important;
        margin-right: 15px !important;
        margin-bottom: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .producto-item-sin-boton .producto-imagen img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .producto-item-sin-boton .producto-info {
        flex-grow: 1 !important;
        text-align: left !important;
        padding-top: 5px !important;
    }

    .producto-item-sin-boton .producto-info h4 {
        font-size: 1rem !important;
        margin-bottom: 5px !important;
        line-height: 1.2;
    }

    .producto-item-sin-boton .descripcion-larga {
        font-size: 0.8rem;
        display: block !important;
        /* Asegurar que se vea */
        color: #666;
    }

    /* 3. Marcas */
    .filtros-sidebar>.sidebar-widget:nth-of-type(2) {
        order: 3 !important;
    }

    /* 4. Otros widgets y banners */
    .filtros-sidebar>.sidebar-widget:nth-of-type(n+3),
    .filtros-sidebar>.info-box-v3,
    .filtros-sidebar>.banner-sidebar {
        order: 4 !important;
    }
}

/* Mejoras de usabilidad táctil */
@media (max-width: 768px) {
    .producto-item-sin-boton {
        min-height: 60px;
    }

    .card-producto-destacado-fijo {
        min-height: 120px;
    }

    /* Asegurar que los botones sean fáciles de tocar */
    select,
    .btn-orden-direccion,
    .paginacion a {
        min-height: 44px;
        min-width: 44px;
    }

    .form-suscripcion input,
    .form-suscripcion button {
        min-height: 44px;
    }
}

/* --- Ocultar arbol de categorias en móvil para contacto.php e institucional.php --- */
@media (max-width: 768px) {
    .categoria-oculta-en-movil {
        display: none !important;
    }
}