/*  GENERAL   */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #e9e9ec;
    color: #333;
}


/*  HEADER NORMAL   */

header {
    background-color: #2f6b3b;
    color: white;
    padding: 20px;
    text-align: center;
}

nav {
    margin-top: 10px;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}


/*  MAIN / SECCIONES   */

main {
    padding: 30px;
}

.hero {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}


/*     TARJETAS    */

.bloques {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}


.tarjeta a:hover {
    text-decoration: underline;
}


/*     FORMULARIOS     */

.form-container {
    max-width: 400px;
    margin: 40px auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}


/*       BOTONES   GENERALES     */

.boton {
    display: inline-block;
    background-color: #2f6b3b;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.boton:hover {
    background-color: #25552f;
}

.centrado {
    text-align: center;
}


/*    MENSAJES     */

.mensaje-error {
    background-color: #f8d7da;
    color: #842029;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
}

.mensaje-ok {
    background-color: #d1e7dd;
    color: #0f5132;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
}


/*    TABLAS     */

.tabla-contenedor {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

table th {
    background-color: #2f6b3b;
    color: white;
}

.acciones {
    margin-top: 20px;
}

.acciones a {
    margin-right: 10px;
}


/*     FOOTER      */

.footer {
    background-color: #2f6b3b;
    color: white;
    padding: 30px 20px;
    margin-top: 30px;
}

.footer-contenido {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-seccion {
    width: 30%;
    min-width: 200px;
}

.footer-seccion h3 {
    margin-bottom: 10px;
}

.footer-seccion a {
    color: white;
    text-decoration: none;
}

.footer-seccion a:hover {
    text-decoration: underline;
}

.footer-abajo {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid white;
    padding-top: 10px;
}


/*   PORTADA NUEVA     */

.home-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    background-color: #f7f7f7;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    padding: 0;
}


/*    HEADER PORTADA    */

.home-header {
    background-color: #fafafa;
    color: #333;
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    text-align: left;
}

/* bloque logo + nombre */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* logo principal del header */
.brand-logo {
    height: 52px;
    width: auto;
}

/* por si usas solo icono */
.logo-icono {
    height: 50px;
    width: auto;
}

/* texto del nombre de la empresa */
.brand-text h1,
.brand h1 {
    margin: 0;
    font-size: 2rem;
    color: #2d2d2d;
    font-weight: bold;
    letter-spacing: 1px;
}

/* menú superior de la portada */
.home-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 0;
}

.home-nav a {
    color: #555;
    text-decoration: none;
    font-weight: bold;
}

.home-nav a:hover {
    text-decoration: underline;
}

/* botón destacado del menú */
.home-nav .nav-btn,
.nav-btn {
    background-color: #7aa634;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
}


/*    HERO IMAGEN     */

.hero-imagen {
    background-image: url("tienda.jpg");
    background-size: cover;
    background-position: center;
    height: 540px;
    position: relative;
}

/* capa oscura sobre la imagen */

.overlay {
    background-color: rgba(0, 0, 0, 0.35);
    height: 100%;

    display: flex;
    flex-direction: column;

    justify-content: flex-start;
    align-items: center;

    padding-top: 140px;

    color: white;
    text-align: center;
}


/* título grande encima de la imagen */

.overlay h2 {
    margin: 0 0 20px 0;
    font-size: 4rem;
    font-weight: bold;
}


/* subtítulo encima de la imagen */

.overlay p {
    margin: 12px 0 30px 0;
    font-size: 2rem;
    font-weight: bold;
}

/* grupo de botones del hero */
.botones-hero {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* botón verde del hero */
.btn-verde {
    background-color: #7aa634;
    color: white;
    padding: 14px 26px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.btn-verde:hover {
    background-color: #68912a;
}

/* botón blanco del hero */
.btn-blanco {
    background-color: white;
    color: #222;
    padding: 14px 26px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.btn-blanco:hover {
    background-color: #f1f1f1;
}


/*    LOGIN PORTADA    */

.login-home {
    background: white;
    width: 500px;
    max-width: calc(100% - 40px);
    margin: 40px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    text-align: center;
}

.login-home h3 {
    margin-top: 0;
    font-size: 2rem;
    color: #222;
}

.login-home input {
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #d7d7d7;
    box-sizing: border-box;
    font-size: 1rem;
}

.login-home button {
    background-color: #7aa634;
    color: white;
    padding: 13px;
    border: none;
    border-radius: 8px;
    width: 60%;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 8px;
    cursor: pointer;
}

.login-home button:hover {
    background-color: #68912a;
}


/*  OTRAS PÁGINAS    
   productos / proveedores / login / registro      */

.hero-seccion {
    background-color: white;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 1px solid #ececec;
}

.hero-seccion h2 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    color: #2d2d2d;
}

.hero-seccion p {
    margin: 0;
    font-size: 1.1rem;
    color: #666;
}

.login-page {
    margin: 40px auto;
}

.home-cards {
    justify-content: center;
    padding: 20px 30px 40px 30px;
}

.home-cards .tarjeta {
    width: 280px;
}


/*    RESPONSIVE     */

@media (max-width: 900px) {
    .home-header {
        justify-content: center;
        gap: 20px;
        text-align: center;
    }

    .home-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .overlay h2 {
        font-size: 2.4rem;
    }

    .overlay p {
        font-size: 1.3rem;
    }
}




/* ==========================================
   ARREGLO DEFINITIVO CONTACTO EN MÓVIL
   PEGAR AL FINAL DE estilos.css
========================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
}

.contact-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.contact-header {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 35px;
    padding: 0;
    text-align: center;
    box-sizing: border-box;
}

.contact-header h1 {
    margin: 0 0 12px;
    font-size: 2.2rem;
    line-height: 1.2;
    color: #1f2d3d;
}

.contact-header p {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 20px;
    box-sizing: border-box;
}

.contact-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    overflow: hidden;
}

.contact-card h2 {
    margin: 0 0 15px;
    color: #2f6b3c;
    line-height: 1.3;
}

.contact-card p {
    max-width: 100%;
    margin: 0 0 12px;
    line-height: 1.6;
    color: #333;
    overflow-wrap: anywhere;
    word-break: normal;
}

.contact-card:last-child {
    grid-column: 1 / -1;
}

.contact-card iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 300px;
    border: 0;
    border-radius: 10px;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 11px 20px;
    background-color: #2f6b3c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    box-sizing: border-box;
}


/* MÓVIL */

@media screen and (max-width: 768px) {

    html,
    body {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .contact-page {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 28px 14px !important;
        box-sizing: border-box !important;
    }

    .contact-header {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 24px !important;
        padding: 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .contact-header h1 {
        margin: 0 0 12px !important;
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .contact-header p {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
        overflow-wrap: anywhere !important;
    }

    .contact-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        gap: 16px !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .contact-card,
    .contact-card:last-child {
        display: block !important;
        grid-column: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }

    .contact-card h2 {
        margin: 0 0 14px !important;
        font-size: 1.35rem !important;
        line-height: 1.3 !important;
    }

    .contact-card p {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 12px !important;
        font-size: 1rem !important;
        line-height: 1.55 !important;
        overflow-wrap: anywhere !important;
    }

    .contact-card iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: 260px !important;
    }

    .btn-contact {
        width: 100% !important;
        min-height: 46px !important;
        padding: 12px 16px !important;
    }
}


/* MÓVILES PEQUEÑOS */

@media screen and (max-width: 480px) {

    .contact-page {
        padding: 22px 12px !important;
    }

    .contact-header h1 {
        font-size: 1.8rem !important;
    }

    .contact-header p {
        font-size: 0.95rem !important;
    }

    .contact-card {
        padding: 18px 16px !important;
        border-radius: 10px !important;
    }

    .contact-card h2 {
        font-size: 1.25rem !important;
    }

    .contact-card p {
        font-size: 0.95rem !important;
    }

    .contact-card iframe {
        height: 230px !important;
    }
}

/* proveedores */

.boton-catalogo {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    background-color: #6ca12b;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.boton-catalogo:hover {
    background-color: #5a8724;
}

.tarjeta-link {
    text-decoration: none;
    color: inherit;
}

.tarjetas-contenedor a,
.tarjetas-contenedor a:visited,
.tarjetas-contenedor a:hover,
.tarjetas-contenedor a:active {
    text-decoration: none !important;
}

.tarjetas-contenedor {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px;
}

.tarjeta {
    width: 260px;
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


.tarjeta h3 {
    color: #222;
    text-decoration: none;
}

.tarjeta p {
    color: #555;
}



.botones-panel {
    margin-top: 20px;
}

a.volver-productos,
a.volver-productos:visited,
a.volver-productos:hover,
a.volver-productos:active {

    display: inline-block;
    background-color: #6ca12b;
    color: white;

    padding: 12px 24px;

    border-radius: 8px;

    text-decoration: none;

    font-weight: bold;

    transition: 0.3s;
}

a.volver-productos:hover {
    background-color: #5a8c22;
}



.tarjeta .boton-catalogo,
.tarjeta .boton-catalogo:visited,
.tarjeta .boton-catalogo:hover,
.tarjeta .boton-catalogo:active {
    background-color: #6ca12b !important;
    color: white !important;
    text-decoration: none !important;
}

.tarjeta .boton-catalogo:hover {
    background-color: #25552f !important;
}



.boton-catalogo {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    background-color: #2f6b3b;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.boton-catalogo:hover {
    background-color: #25552f;
}


.imagen-tarjeta {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}


.imagen-producto {
    width: 100%;
    height: 130px;
    object-fit: contain;
    margin-bottom: 15px;
}



/* ==============================
   BUSCADOR DE PRODUCTOS
================================= */

.buscador-seccion {
    width: 100%;
    max-width: 850px;
    margin: 30px auto;
    padding: 25px;
    text-align: center;
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.buscador-seccion h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.formulario-buscador {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.formulario-buscador input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    outline: none;
}

.formulario-buscador input[type="search"]:focus {
    border-color: #24783e;
    box-shadow: 0 0 0 3px rgba(36, 120, 62, 0.15);
}

.formulario-buscador button {
    padding: 14px 25px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #24783e;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.formulario-buscador button:hover {
    background-color: #195d2e;
}

/* ==============================
   RESULTADOS
================================= */

.resultados-busqueda {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px 40px;
    box-sizing: border-box;
}

.resultados-busqueda > h2 {
    text-align: center;
    margin-bottom: 30px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 25px;
}

.producto-card {
    overflow: hidden;
    background-color: white;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.producto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.15);
}

.producto-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: contain;
    padding: 15px;
    background-color: #ffffff;
    box-sizing: border-box;
}

.producto-info {
    padding: 18px;
}

.producto-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.producto-info p {
    margin: 8px 0;
}

.producto-info a {
    color: #24783e;
    font-weight: bold;
    text-decoration: none;
}

.producto-info a:hover {
    text-decoration: underline;
}

.mensaje-busqueda {
    padding: 30px;
    text-align: center;
    font-size: 18px;
    background-color: white;
    border-radius: 12px;
}

.acciones-busqueda {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.boton-volver,
.boton-busqueda-global {
    display: inline-block;
    margin-top: 20px;
    padding: 11px 18px;
    color: white;
    background-color: #24783e;
    border-radius: 7px;
    text-decoration: none;
    font-weight: bold;
}

.acciones-busqueda .boton-volver,
.acciones-busqueda .boton-busqueda-global {
    margin-top: 0;
}

.boton-volver:hover,
.boton-busqueda-global:hover {
    background-color: #195d2e;
}

/* ==============================
   BUSCADOR EN MÓVIL
================================= */

@media (max-width: 600px) {

    .buscador-seccion {
        width: calc(100% - 30px);
        padding: 20px 15px;
    }

    .formulario-buscador {
        flex-direction: column;
    }

    .formulario-buscador input[type="search"],
    .formulario-buscador button {
        width: 100%;
        box-sizing: border-box;
    }

    .productos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .producto-card img {
        height: 160px;
        padding: 8px;
    }

    .producto-info {
        padding: 12px;
    }

    .producto-info h3 {
        font-size: 15px;
    }

    .producto-info p {
        font-size: 13px;
    }
}

@media (max-width: 380px) {

    .productos-grid {
        grid-template-columns: 1fr;
    }
}


/* ==================================================
   PORTADA FINAL LIMPIA
================================================== */

.home-wrapper {
    max-width: 1200px;
    width: calc(100% - 40px);
    margin: 30px auto;
    padding: 0;
    overflow: hidden;
    background-color: #f7f7f7;
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.10);
}

.home-header {
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background-color: #fafafa;
    color: #333;
    text-align: left;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: auto;
    height: 52px;
}

.brand-text h1,
.brand h1 {
    margin: 0;
    color: #2d2d2d;
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.home-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 0;
}

.home-nav a {
    margin: 0;
    color: #444;
    font-weight: bold;
    text-decoration: none;
}

.home-nav a:hover {
    color: #6f9d27;
    text-decoration: none;
}

.hero-imagen {
    height: 500px;
    position: relative;
    background-image: url("tienda.jpg");
    background-size: cover;
    background-position: center;
}

.hero-imagen .overlay {
    width: 100%;
    height: 100%;
    padding: 125px 25px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.42);
    color: white;
    text-align: center;
}

.hero-imagen .overlay h2 {
    max-width: 1000px;
    margin: 0 0 10px;
    color: white;
    font-size: 4rem;
    font-weight: bold;
    line-height: 1.05;
}

.hero-imagen .overlay p {
    max-width: 950px;
    margin: 8px auto 24px;
    color: white;
    font-size: 1.9rem;
    font-weight: bold;
    line-height: 1.3;
}

.botones-hero {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 0;
    flex-wrap: wrap;
}

.btn-verde {
    display: inline-block;
    padding: 15px 28px;
    background-color: #78a52b;
    color: white;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-verde:hover {
    background-color: #628c20;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.home-cards {
    width: 100%;
    padding: 45px 60px 55px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.home-cards .tarjeta-informativa {
    width: auto;
    min-height: 280px;
    padding: 38px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-cards .tarjeta-informativa:hover {
    transform: translateY(-6px);
    box-shadow: 0 9px 24px rgba(0, 0, 0, 0.14);
}

.home-cards .tarjeta-icono {
    margin-bottom: 22px;
    color: #638b26;
    font-size: 4rem;
    font-weight: bold;
    line-height: 1;
}

.home-cards .tarjeta h3 {
    margin: 0 0 18px;
    color: #222;
    font-size: 1.55rem;
    line-height: 1.25;
}

.home-cards .tarjeta p {
    max-width: 280px;
    margin: 0;
    color: #606060;
    font-size: 1rem;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .home-wrapper {
        width: calc(100% - 20px);
        margin: 10px auto;
    }

    .home-header {
        justify-content: center;
        gap: 20px;
        text-align: center;
    }

    .home-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-imagen {
        height: 470px;
    }

    .hero-imagen .overlay {
        padding: 110px 20px 25px;
    }

    .hero-imagen .overlay h2 {
        font-size: 2.8rem;
    }

    .hero-imagen .overlay p {
        font-size: 1.4rem;
    }

    .home-cards {
        max-width: 600px;
        margin: 0 auto;
        padding: 40px 25px;
        grid-template-columns: 1fr;
    }

    .home-cards .tarjeta-informativa {
        min-height: 250px;
    }
}

@media (max-width: 600px) {
    .home-header {
        padding: 16px;
    }

    .brand-text h1,
    .brand h1 {
        font-size: 1.35rem;
    }

    .brand-logo {
        height: 42px;
    }

    .home-nav {
        gap: 13px;
    }

    .home-nav a {
        font-size: 0.9rem;
    }

    .hero-imagen {
        height: 430px;
    }

    .hero-imagen .overlay {
        padding: 90px 18px 20px;
    }

    .hero-imagen .overlay h2 {
        font-size: 2.2rem;
    }

    .hero-imagen .overlay p {
        font-size: 1.15rem;
    }

    .home-cards {
        padding: 30px 20px;
    }

    .home-cards .tarjeta-icono {
        font-size: 3.7rem;
    }

    .home-cards .tarjeta h3 {
        font-size: 1.4rem;
    }
}

/* ==================================================
   PÁGINA DE NOVEDADES
================================================== */

/* =========================================================
   NOVEDADES - ADAPTACIÓN PARA MÓVIL
========================================================= */

@media screen and (max-width: 700px) {

    .novedades-hero,
    .novedades-intro,
    .titulo-novedades {
        padding-left: 18px;
        padding-right: 18px;
        text-align: center;
    }

    .novedades-hero h1,
    .titulo-novedades h1,
    .titulo-novedades h2 {
        font-size: 32px;
        line-height: 1.15;
    }

    .novedades-hero p,
    .titulo-novedades p {
        font-size: 18px;
        line-height: 1.45;
    }

    .contenedor-novedades,
    .productos-novedades,
    .novedades-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 0 16px;
    }

    .tarjeta-novedad {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 16px;
    }

    .tarjeta-novedad img,
    .imagen-novedad {
        display: block;
        width: 100%;
        height: 320px;
        max-height: 320px;
        object-fit: contain;
        object-position: center;
        background: #f5f5f5;
    }

    .contenido-novedad {
        padding: 18px;
        text-align: left;
    }

    .contenido-novedad h2,
    .contenido-novedad h3 {
        font-size: 23px;
        line-height: 1.2;
    }

    .contenido-novedad p {
        font-size: 16px;
        line-height: 1.5;
    }
}

@media screen and (max-width: 430px) {

    .novedades-hero h1,
    .titulo-novedades h1,
    .titulo-novedades h2 {
        font-size: 28px;
    }

    .novedades-hero p,
    .titulo-novedades p {
        font-size: 17px;
    }

    .tarjeta-novedad img,
    .imagen-novedad {
        height: 260px;
        max-height: 260px;
    }
}



/* ==================================================
   FOOTER PRINCIPAL
================================================== */

.footer-principal {
    width: 100%;
    box-sizing: border-box;
    margin-top: 60px;
    padding: 48px 42px 22px;

    color: #ffffff;

    background:
        radial-gradient(
            circle at 40% 65%,
            rgba(0, 193, 103, 0.65) 0%,
            rgba(0, 134, 72, 0.35) 24%,
            transparent 48%
        ),
        linear-gradient(
            120deg,
            #004b2c 0%,
            #006b3d 42%,
            #172044 100%
        );
}

.footer-contenido {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1.45fr 1.1fr 0.75fr;
    gap: 70px;
    align-items: start;
}

.footer-columna {
    min-width: 0;
}

.footer-columna h2 {
    margin: 0 0 20px;

    color: #ffffff;

    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.footer-columna p {
    margin: 0 0 15px;

    color: #ffffff;

    font-size: 17px;
    line-height: 1.55;
}

.footer-destacado {
    margin-top: 22px !important;
}

.footer-destacado strong {
    color: #ffffff;
    font-weight: 700;
}

.footer-contacto a,
.footer-enlaces a {
    color: #ffffff;
    text-decoration: none;
}

.footer-contacto a:hover,
.footer-enlaces a:hover {
    color: #d5ffe8;
}

.footer-contacto p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-icono {
    flex: 0 0 auto;
}

.footer-direccion {
    align-items: flex-start !important;
}

.footer-horario {
    margin-top: 22px;
}

.footer-horario-titulo {
    margin-bottom: 8px !important;
}

.footer-enlaces {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-enlaces a {
    display: block;
    margin-bottom: 10px;

    font-size: 17px;
    line-height: 1.35;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.footer-enlaces a:hover {
    transform: translateX(4px);
}

.footer-estado-tienda {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 23px;

    color: #ffffff !important;

    font-size: 18px;
    font-weight: 600;
}

#textoEstadoSuperior,
#textoEstadoInferior {
    color: #ffffff !important;
}

.estado-punto {
    display: inline-block;
    flex: 0 0 auto;

    width: 15px;
    height: 15px;

    border-radius: 50%;

    background-color: #a3a3a3;

    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.estado-punto.estado-abierto {
    background-color: #21db48;
}

.estado-punto.estado-cerrado {
    background-color: #e84242;
}


/* =========================================================
   PRODUCTOS DESTACADOS
========================================================= */

.productos-destacados {
    width: 100%;
    margin: 45px 0 55px;
}

.titulo-destacados {
    text-align: center;
    margin-bottom: 28px;
}

.titulo-destacados h2 {
    margin: 10px 0 8px;
}

.titulo-destacados p {
    margin: 0;
    color: #666;
}

.etiqueta-seccion {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 20px;
    background: #198754;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.destacados-contenedor {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.tarjeta-destacada-link {
    display: block;
    height: 100%;
}

.tarjeta-producto-destacado {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.etiqueta-destacado {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    padding: 6px 11px;
    border-radius: 20px;
    background: #198754;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.imagen-producto-destacado {
    width: 100%;
    height: 190px;
    object-fit: contain;
}

.categoria-destacado {
    margin: 5px 0 15px;
    color: #666;
    font-size: 14px;
}

.sin-imagen-producto {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    box-sizing: border-box;
    padding: 20px;
    background: #f3f3f3;
    color: #777;
    text-align: center;
    border-radius: 8px;
}

.tarjeta-producto-destacado .boton-catalogo {
    margin-top: auto;
}

.titulo-categorias {
    text-align: center;
    margin: 20px 0 25px;
}

.titulo-categorias h2 {
    margin-bottom: 8px;
}

.titulo-categorias p {
    margin: 0;
    color: #666;
}

.mensaje-vacio {
    width: 100%;
    text-align: center;
}


/* TABLETS */

@media screen and (max-width: 1100px) {

    .destacados-contenedor {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* MÓVILES */

@media screen and (max-width: 700px) {

    .destacados-contenedor {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .imagen-producto-destacado,
    .sin-imagen-producto {
        height: 155px;
    }

    .etiqueta-destacado {
        top: 8px;
        right: 8px;
        padding: 5px 8px;
        font-size: 9px;
    }
}


/* MÓVILES PEQUEÑOS */

@media screen and (max-width: 430px) {

    .destacados-contenedor {
        grid-template-columns: 1fr;
    }

    .imagen-producto-destacado,
    .sin-imagen-producto {
        height: 190px;
    }
}



/* ======================================================
   BUSCADOR INTELIGENTE DE LA CABECERA
====================================================== */

.buscador-inicio {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boton-lupa {
    width: 40px;
    height: 40px;
    padding: 8px;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.boton-lupa:hover {
    background-color: rgba(36, 75, 48, 0.1);
}

.boton-lupa svg {
    display: block;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    fill: #1f2d25;
}

.panel-buscador {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 420px;
    max-width: calc(100vw - 30px);
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #dde5df;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    z-index: 9999;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.panel-buscador.abierto {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.campo-buscador {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.campo-buscador .icono-buscador {
    position: absolute;
    left: 14px;
    width: 19px;
    height: 19px;
    fill: #577060;
    pointer-events: none;
}

.campo-buscador input {
    width: 100%;
    height: 46px;
    padding: 0 48px 0 44px;
    border: 1px solid #ccd8cf;
    border-radius: 9px;
    outline: none;
    background-color: #ffffff;
    color: #1f2d25;
    font-family: inherit;
    font-size: 15px;
}

.campo-buscador input:focus {
    border-color: #4f8d5f;
    box-shadow: 0 0 0 3px rgba(79, 141, 95, 0.16);
}

.campo-buscador input::placeholder {
    color: #7b8780;
}

.cerrar-buscador {
    position: absolute;
    right: 7px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #536159;
    font-size: 24px;
    line-height: 32px;
    cursor: pointer;
}

.cerrar-buscador:hover {
    background-color: #edf3ef;
    color: #23452e;
}

.resultados-buscador {
    display: none;
    width: 100%;
    max-height: 340px;
    margin-top: 8px;
    overflow-y: auto;
    background-color: #ffffff;
    border: 1px solid #e1e8e3;
    border-radius: 9px;
}

.resultados-buscador.visible {
    display: block;
}

.resultado-producto {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e8ede9;
    color: #24352a;
    text-decoration: none;
}

.resultado-producto:last-child {
    border-bottom: none;
}

.resultado-producto:hover,
.resultado-producto.seleccionado {
    background-color: #eff6f1;
}

.resultado-informacion {
    display: block;
    min-width: 0;
}

.resultado-descripcion {
    display: block;
    color: #183c27;
    font-size: 14px;
    font-weight: 700;
}

.resultado-detalles {
    display: block;
    margin-top: 3px;
    color: #78837c;
    font-size: 12px;
}

.resultado-flecha {
    flex-shrink: 0;
    color: #4f8d5f;
    font-size: 20px;
}

.mensaje-buscador,
.cargando-buscador {
    padding: 16px;
    color: #68756e;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 900px) {

    .panel-buscador {
        position: fixed;
        top: 90px;
        right: 15px;
        left: 15px;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 700px) {

    .boton-lupa {
        width: 38px;
        height: 38px;
    }

    .boton-lupa svg {
        width: 21px;
        height: 21px;
    }

    .panel-buscador {
        top: 75px;
    }
}
/* ==========================================================
   ADAPTACIÓN VISUAL DEL INDEX - BOCETO ELEGIDO
   Conserva la cabecera, buscador, textos, enlaces, tarjetas y footer.
========================================================== */

/* Contenedor de la portada */
body:has(.home-wrapper) {
    background: #f2f4f3;
}

.home-wrapper {
    width: min(1440px, calc(100% - 32px));
    max-width: 1440px;
    margin: 16px auto 0;
    overflow: visible;
    border-radius: 20px 20px 0 0;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 38, 26, 0.10);
}

/* Cabecera: mismos elementos, nueva presentación */
.home-header {
    position: relative;
    z-index: 1000;
    min-height: 88px;
    padding: 14px 30px;
    flex-wrap: nowrap;
    gap: 32px;
    border-radius: 20px 20px 0 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 3px 16px rgba(24, 43, 31, 0.08);
}

.home-header .brand {
    flex: 0 0 auto;
    gap: 14px;
}

.home-header .brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.home-header .brand-text h1,
.home-header .brand h1 {
    color: #17222e;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.05;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.home-header .home-nav {
    justify-content: flex-end;
    flex: 1 1 auto;
    gap: 27px;
}

.home-header .home-nav > a {
    position: relative;
    padding: 12px 0;
    color: #17222e;
    font-size: 0.98rem;
    font-weight: 700;
    white-space: nowrap;
}

.home-header .home-nav > a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;
    height: 3px;
    border-radius: 10px;
    background: #24783e;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.home-header .home-nav > a:hover {
    color: #24783e;
    text-decoration: none;
}

.home-header .home-nav > a:hover::after,
.home-header .home-nav > a:first-child::after {
    transform: scaleX(1);
}

/* Hero con la nueva fotografía, manteniendo los textos y botón existentes */
.hero-imagen {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 520px;
    height: auto;
    overflow: hidden;
    background-image: url("imagenes/portada-tractor.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.hero-imagen .overlay {
    width: 100%;
    min-height: 520px;
    height: auto;
    padding: 82px 7% 105px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.91) 32%,
            rgba(255, 255, 255, 0.45) 52%,
            rgba(255, 255, 255, 0.05) 74%,
            rgba(255, 255, 255, 0) 100%
        );
    color: #17222e;
    text-align: left;
}

.hero-imagen .overlay h2 {
    max-width: 610px;
    margin: 0 0 18px;
    color: #17222e;
    font-size: clamp(2.8rem, 4.7vw, 4.7rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -2px;
    text-shadow: none;
}

.hero-imagen .overlay p {
    max-width: 560px;
    margin: 0 0 30px;
    color: #34404d;
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
    font-weight: 500;
    line-height: 1.5;
    text-shadow: none;
}

.hero-imagen .botones-hero {
    justify-content: flex-start;
    margin: 0;
}

.hero-imagen .btn-verde {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 27px;
    border-radius: 8px;
    background: #24783e;
    box-shadow: 0 9px 22px rgba(36, 120, 62, 0.24);
    font-size: 1rem;
}

.hero-imagen .btn-verde:hover {
    background: #195d2e;
    transform: translateY(-2px);
}

/* Las tres tarjetas existentes pasan a superponerse sobre la portada */
.home-cards {
    position: relative;
    z-index: 10;
    width: min(1240px, calc(100% - 42px));
    margin: -62px auto 0;
    padding: 0 0 54px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    background: transparent;
}

.home-cards .tarjeta-informativa {
    min-height: 245px;
    padding: 34px 28px;
    border: 1px solid rgba(28, 58, 39, 0.07);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 15px 36px rgba(25, 47, 33, 0.14);
    backdrop-filter: blur(5px);
}

.home-cards .tarjeta-informativa:nth-child(1) {
    background: linear-gradient(135deg, #ffffff, #f0f8f2);
}

.home-cards .tarjeta-informativa:nth-child(2) {
    background: linear-gradient(135deg, #ffffff, #f2f6fb);
}

.home-cards .tarjeta-informativa:nth-child(3) {
    background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.home-cards .tarjeta-icono {
    margin-bottom: 18px;
    font-size: 3.25rem;
}

.home-cards .tarjeta h3 {
    margin-bottom: 14px;
    color: #17222e;
    font-size: 1.5rem;
}

.home-cards .tarjeta p {
    color: #53615a;
    line-height: 1.65;
}

/* El footer incluido conserva todos sus textos, datos, enlaces y JavaScript */
.footer-principal,
.footer,
footer {
    margin-top: 0;
}

@media (max-width: 1050px) {
    .home-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px 28px;
    }

    .home-header .home-nav {
        justify-content: center;
        flex-basis: 100%;
    }

    .hero-imagen,
    .hero-imagen .overlay {
        min-height: 500px;
    }

    .hero-imagen .overlay {
        padding-right: 42%;
    }
}

@media (max-width: 800px) {
    .home-wrapper {
        width: calc(100% - 18px);
        margin-top: 9px;
    }

    .home-header {
        padding: 15px 18px;
    }

    .home-header .home-nav {
        gap: 12px 20px;
    }

    .hero-imagen {
        min-height: 610px;
        background-position: 67% center;
    }

    .hero-imagen .overlay {
        min-height: 610px;
        justify-content: flex-end;
        padding: 285px 24px 105px;
        background:
            linear-gradient(
                0deg,
                rgba(255, 255, 255, 0.99) 0%,
                rgba(255, 255, 255, 0.96) 44%,
                rgba(255, 255, 255, 0.28) 73%,
                rgba(255, 255, 255, 0.03) 100%
            );
    }

    .hero-imagen .overlay h2 {
        max-width: 100%;
        font-size: clamp(2.55rem, 9vw, 4rem);
    }

    .hero-imagen .overlay p {
        max-width: 100%;
    }

    .home-cards {
        width: min(620px, calc(100% - 28px));
        grid-template-columns: 1fr;
        margin-top: -68px;
    }
}

@media (max-width: 560px) {
    .home-header .brand-logo {
        width: 48px;
        height: 48px;
    }

    .home-header .brand-text h1,
    .home-header .brand h1 {
        font-size: 1.3rem;
    }

    .home-header .home-nav {
        gap: 8px 14px;
    }

    .home-header .home-nav > a {
        font-size: 0.84rem;
    }

    .hero-imagen {
        min-height: 640px;
    }

    .hero-imagen .overlay {
        min-height: 640px;
        padding: 305px 18px 106px;
    }

    .hero-imagen .overlay h2 {
        font-size: 2.45rem;
        letter-spacing: -1px;
    }

    .hero-imagen .overlay p {
        font-size: 1rem;
    }

    .hero-imagen .btn-verde {
        width: 100%;
    }

    .home-cards {
        width: calc(100% - 22px);
    }

    .home-cards .tarjeta-informativa {
        min-height: 225px;
        padding: 29px 22px;
    }
}


/* ==========================================================
   CORRECCIÓN DEFINITIVA DEL INDEX EN MÓVIL
   Mantiene textos, enlaces, buscador y funciones existentes
========================================================== */

@media screen and (max-width: 800px) {

    .home-wrapper {
        width: calc(100% - 16px) !important;
        margin: 8px auto !important;
        border-radius: 22px !important;
    }

    .home-header {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        align-items: center !important;
        justify-content: initial !important;
        gap: 14px 10px !important;
        padding: 18px 20px 15px !important;
        text-align: left !important;
    }

    .home-header .brand {
        min-width: 0 !important;
        justify-content: flex-start !important;
        gap: 10px !important;
    }

    .home-header .brand-logo {
        width: 48px !important;
        height: 48px !important;
        flex: 0 0 48px !important;
        object-fit: contain !important;
    }

    .home-header .brand-text {
        min-width: 0 !important;
    }

    .home-header .brand-text h1,
    .home-header .brand h1 {
        margin: 0 !important;
        font-size: clamp(1.25rem, 5vw, 1.65rem) !important;
        line-height: 1.1 !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
    }

    .home-header .home-nav {
        grid-column: 1 / -1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 0 2px !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .home-header .home-nav::-webkit-scrollbar {
        display: none !important;
    }

    .home-header .home-nav > a {
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding: 10px 11px !important;
        font-size: 0.92rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .home-header .home-nav > a:first-child {
        padding-left: 0 !important;
    }

    .home-header .home-nav > a:first-child::after {
        left: 0 !important;
        right: 11px !important;
    }

    .home-nav .buscador-inicio {
        flex: 0 0 auto !important;
        margin-left: 3px !important;
    }

    .home-nav .boton-lupa {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        font-size: 20px !important;
    }

    .hero-imagen {
        min-height: 540px !important;
        height: 540px !important;
        background-position: 61% center !important;
    }

    .hero-imagen .overlay {
        min-height: 540px !important;
        height: 540px !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
        padding: 230px 24px 62px !important;
        background:
            linear-gradient(
                0deg,
                rgba(255,255,255,0.99) 0%,
                rgba(255,255,255,0.96) 34%,
                rgba(255,255,255,0.72) 52%,
                rgba(255,255,255,0.08) 76%,
                rgba(255,255,255,0.00) 100%
            ) !important;
    }

    .hero-imagen .overlay h2 {
        max-width: 460px !important;
        margin: 0 0 16px !important;
        font-size: clamp(2.15rem, 9vw, 3.1rem) !important;
        line-height: 1.02 !important;
        letter-spacing: -1px !important;
    }

    .hero-imagen .overlay p {
        max-width: 500px !important;
        margin: 0 0 24px !important;
        font-size: 1.05rem !important;
        line-height: 1.48 !important;
    }

    .hero-imagen .botones-hero {
        width: auto !important;
    }

    .hero-imagen .btn-verde {
        width: auto !important;
        min-height: 52px !important;
        padding: 0 24px !important;
        font-size: 1rem !important;
    }

    .home-cards {
        width: calc(100% - 24px) !important;
        margin-top: -32px !important;
        padding-bottom: 38px !important;
        gap: 16px !important;
    }

    .home-cards .tarjeta-informativa {
        min-height: 0 !important;
        padding: 27px 22px !important;
    }
}

@media screen and (max-width: 560px) {

    .home-header {
        padding: 17px 16px 13px !important;
    }

    .home-header .brand-logo {
        width: 44px !important;
        height: 44px !important;
        flex-basis: 44px !important;
    }

    .home-header .brand-text h1,
    .home-header .brand h1 {
        font-size: 1.28rem !important;
    }

    .home-header .home-nav > a {
        padding: 9px 9px !important;
        font-size: 0.84rem !important;
    }

    .hero-imagen {
        min-height: 515px !important;
        height: 515px !important;
        background-position: 63% center !important;
    }

    .hero-imagen .overlay {
        min-height: 515px !important;
        height: 515px !important;
        padding: 215px 19px 48px !important;
    }

    .hero-imagen .overlay h2 {
        margin-bottom: 13px !important;
        font-size: clamp(2rem, 10vw, 2.65rem) !important;
    }

    .hero-imagen .overlay p {
        margin-bottom: 21px !important;
        font-size: 0.98rem !important;
    }

    .hero-imagen .btn-verde {
        min-height: 50px !important;
        padding: 0 21px !important;
    }
}

@media screen and (max-width: 390px) {

    .home-header .brand-text h1,
    .home-header .brand h1 {
        font-size: 1.12rem !important;
    }

    .home-header .home-nav > a {
        padding-right: 8px !important;
        padding-left: 8px !important;
        font-size: 0.8rem !important;
    }

    .hero-imagen .overlay h2 {
        font-size: 2rem !important;
    }
}

/* ==================================================
   FILTROS LATERALES DE PRODUCTOS
================================================== */

.catalogo-con-filtros {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    width: 100%;
    padding: 35px 40px 55px;
    box-sizing: border-box;
    align-items: start;
}

.panel-filtros-productos {
    position: sticky;
    top: 20px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e1e7e2;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.cabecera-filtros {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e7ece8;
}

.icono-filtros {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #edf5e7;
    color: #5f8f24;
    font-size: 20px;
    font-weight: bold;
}

.filtros-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #6f9d27;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cabecera-filtros h2,
.cabecera-resultados-filtros h2 {
    margin: 0;
    color: #253129;
}

.formulario-filtros-productos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formulario-filtros-productos > label:not(.opcion-check-filtro) {
    margin-top: 4px;
    color: #253129;
    font-size: 14px;
    font-weight: 700;
}

.formulario-filtros-productos select {
    width: 100%;
    min-height: 44px;
    padding: 10px 36px 10px 12px;
    border: 1px solid #ccd7ce;
    border-radius: 9px;
    background: #ffffff;
    color: #34423a;
    font-size: 14px;
    box-sizing: border-box;
}

.formulario-filtros-productos select:focus {
    outline: none;
    border-color: #6f9d27;
    box-shadow: 0 0 0 3px rgba(111, 157, 39, 0.14);
}

.opcion-check-filtro {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 7px 0;
    color: #34423a;
    font-size: 15px;
    cursor: pointer;
}

.opcion-check-filtro input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #6f9d27;
    cursor: pointer;
}

.boton-aplicar-filtros,
.boton-limpiar-filtros {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 9px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.boton-aplicar-filtros {
    margin-top: 8px;
    border: 0;
    background: #6f9d27;
    color: #ffffff;
}

.boton-aplicar-filtros:hover {
    background: #5e8720;
}

.boton-limpiar-filtros {
    border: 1px solid #cfd8d1;
    background: #ffffff;
    color: #405047;
}

.boton-limpiar-filtros:hover {
    background: #f3f6f4;
    text-decoration: none;
}

.contenido-catalogo-filtrado {
    min-width: 0;
}

.cabecera-resultados-filtros {
    margin-bottom: 22px;
    padding: 24px 26px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.cabecera-resultados-filtros p {
    margin: 7px 0 0;
    color: #68746c;
}

.aviso-filtro-productos {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #e6c768;
    border-radius: 10px;
    background: #fff8df;
    color: #6c5715;
}

.grid-productos-filtrados {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.tarjeta-producto-filtrado {
    overflow: hidden;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta-producto-filtrado:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.13);
}

.zona-imagen-producto-filtrado {
    position: relative;
    height: 190px;
    padding: 14px;
    background: #ffffff;
    box-sizing: border-box;
}

.zona-imagen-producto-filtrado img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sin-imagen-filtrada {
    width: 100%;
    height: 100%;
    margin: 0;
}

.badge-producto {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-destacado {
    left: 12px;
    background: #2f6b3b;
}

.badge-novedad {
    right: 12px;
    background: #7aa634;
}

.informacion-producto-filtrado {
    padding: 17px 18px 20px;
    border-top: 1px solid #eef1ef;
}

.informacion-producto-filtrado h3 {
    min-height: 44px;
    margin: 0 0 13px;
    color: #243128;
    font-size: 16px;
    line-height: 1.35;
}

.informacion-producto-filtrado p {
    margin: 6px 0;
    color: #5c6861;
    font-size: 13px;
    line-height: 1.45;
}

.enlace-ver-categoria {
    display: inline-block;
    margin-top: 11px;
    color: #5d8a24;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.enlace-ver-categoria:hover {
    text-decoration: underline;
}

.paginacion-productos {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.paginacion-productos a,
.paginacion-productos span {
    padding: 10px 15px;
    border-radius: 8px;
    background: #ffffff;
    color: #405047;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
}

.paginacion-productos a {
    background: #6f9d27;
    color: #ffffff;
    font-weight: 800;
}

.paginacion-productos a:hover {
    background: #5e8720;
}

.sin-resultados-filtros {
    padding: 55px 25px;
    background: #ffffff;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.sin-resultados-filtros h3 {
    margin: 0 0 10px;
    color: #26342b;
}

.sin-resultados-filtros p {
    margin: 0 0 18px;
    color: #69746d;
}

.titulo-categorias-con-filtros {
    margin: 0 0 22px;
    padding: 24px 26px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.tarjetas-contenedor-filtrado {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 0;
}

.tarjetas-contenedor-filtrado .tarjeta-link,
.tarjetas-contenedor-filtrado .tarjeta {
    width: 100%;
    box-sizing: border-box;
}

.tarjetas-contenedor-filtrado .tarjeta {
    height: 100%;
    padding: 22px;
}

@media (max-width: 1000px) {
    .catalogo-con-filtros {
        grid-template-columns: 220px minmax(0, 1fr);
        padding: 30px 24px 45px;
    }

    .grid-productos-filtrados,
    .tarjetas-contenedor-filtrado {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .catalogo-con-filtros {
        display: block;
        padding: 24px 15px 40px;
    }

    .panel-filtros-productos {
        position: static;
        margin-bottom: 24px;
    }

    .formulario-filtros-productos {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .formulario-filtros-productos > label:not(.opcion-check-filtro),
    .formulario-filtros-productos select,
    .boton-aplicar-filtros,
    .boton-limpiar-filtros {
        grid-column: 1 / -1;
    }
}

@media (max-width: 540px) {
    .formulario-filtros-productos {
        display: flex;
    }

    .grid-productos-filtrados,
    .tarjetas-contenedor-filtrado {
        grid-template-columns: 1fr;
    }

    .zona-imagen-producto-filtrado {
        height: 220px;
    }
}



.home-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.home-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.home-nav .nav-btn {
    margin-left: 0;
    min-height: 38px;
    padding: 0 20px;

    background: #72ad2c;
    color: #ffffff !important;

    border-radius: 8px;
    line-height: 1;
}

.home-nav .nav-btn:hover {
    background: #5f9622;
    color: #ffffff !important;
}