/**
 * Sistema visual v2: despensa moderna, sobria y accesible.
 *
 * Las reglas específicas de portada se apoyan en los identificadores estables
 * de la plantilla Elementor actual y permanecen en el tema hijo.
 */

:root {
    --lmr-color-canvas: #faf6f0;
    --lmr-color-surface: #ffffff;
    --lmr-color-forest: #1a3c2a;
    --lmr-color-forest-hover: #2d6a4f;
    --lmr-color-accent: #c4703f;
    --lmr-color-text: #2c2c2c;
    --lmr-color-muted: #515a54;
    --lmr-color-kicker: #5f713f;
    --lmr-color-line: #e2ddd5;
    --lmr-radius-small: 8px;
    --lmr-radius-card: 12px;
    --lmr-shadow-card: 0 2px 10px rgba(26, 60, 42, 0.07);
    --lmr-content-width: 1200px;
}

body.lmr-accessibility-enhanced {
    background: var(--lmr-color-canvas);
    color: var(--lmr-color-text);
}

/*
 * Astra encierra la página completa en un contenedor de lectura. Elementor ya
 * limita el contenido interior de cada sección, por lo que en portada el
 * contenedor exterior debe ocupar todo el ancho para que los fondos respiren.
 */
body.home.elementor-page.lmr-accessibility-enhanced,
body.home.elementor-page.lmr-accessibility-enhanced .site-content {
    background: var(--lmr-color-canvas) !important;
}

body.home #content > .ast-container {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

body.home #primary,
body.home #main,
body.home article.page,
body.home .entry-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.lmr-accessibility-enhanced :where(h1, h2, h3, h4, h5, h6) {
    color: var(--lmr-color-forest);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: -0.018em;
}

.lmr-accessibility-enhanced h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.08;
}

.lmr-accessibility-enhanced h2 {
    font-size: clamp(1.65rem, 3.5vw, 2.4rem);
    line-height: 1.18;
}

.lmr-accessibility-enhanced h3 {
    font-size: clamp(1.25rem, 2.3vw, 1.65rem);
    line-height: 1.25;
}

.lmr-accessibility-enhanced :where(.elementor-button, .button, button, input[type="submit"]) {
    border: 2px solid var(--lmr-color-forest);
    border-radius: var(--lmr-radius-small);
    background: var(--lmr-color-forest);
    box-shadow: none;
    color: #fff;
    font-weight: 700;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.lmr-accessibility-enhanced :where(.elementor-button, .button, button, input[type="submit"]):hover {
    border-color: var(--lmr-color-forest-hover);
    background: var(--lmr-color-forest-hover);
    color: #fff;
}

/* Franja de contacto existente: útil, pero legible y sin protagonismo excesivo. */
.home .elementor-element-bcc1ed9 {
    background: var(--lmr-color-forest) !important;
    color: #fff;
}

.home .elementor-element-bcc1ed9 :where(h1, h2, h3, h4, p, a, .elementor-heading-title) {
    color: #fff !important;
    font-family: inherit;
    font-size: 0.9375rem;
    letter-spacing: 0;
}

.home .elementor-element-bcc1ed9 a {
    min-height: 44px;
    text-decoration: underline;
}

/* Cabecera principal incrustada actualmente mediante Elementor. */
.home .elementor-element-b76efb5 {
    position: relative;
    z-index: 100;
    border-bottom: 1px solid var(--lmr-color-line);
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 3px 14px rgba(26, 60, 42, 0.05);
}

.home .elementor-element-17c1c92 {
    max-width: var(--lmr-content-width);
    min-height: 76px;
    margin-inline: auto;
}

.home .elementor-element-bcb06c9 .elementor-nav-menu--main a {
    min-height: 48px;
    color: var(--lmr-color-text) !important;
    font-size: 1rem;
    font-weight: 650;
}

.home .elementor-element-bcb06c9 .elementor-nav-menu--main a:hover,
.home .elementor-element-bcb06c9 .elementor-nav-menu--main a:focus,
.home .elementor-element-bcb06c9 .elementor-nav-menu--main .elementor-item-active {
    color: var(--lmr-color-forest-hover) !important;
}

/* Hero estático: una imagen, un mensaje y una acción. */
.home .elementor-element-6f6b419 {
    display: none !important;
}

.lmr-home-hero {
    overflow: hidden;
    background: var(--lmr-color-forest);
    color: #fff;
}

.lmr-home-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    min-height: clamp(560px, 72svh, 760px);
    padding-top: clamp(3rem, 7vw, 6rem);
    padding-bottom: clamp(3rem, 7vw, 6rem);
}

.lmr-home-hero__content {
    position: relative;
    z-index: 2;
    max-width: 42rem;
}

.lmr-home-hero__eyebrow {
    margin: 0 0 1rem;
    color: #dff3b7;
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.lmr-home-hero h1 {
    max-width: 12ch;
    margin: 0;
    color: #fff;
    font-size: clamp(2.75rem, 6vw, 5.25rem);
    line-height: 0.98;
}

.lmr-home-hero__lead {
    max-width: 38rem;
    margin: 1.5rem 0 0;
    color: #f1f5f2;
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    line-height: 1.55;
}

.lmr-home-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 2rem;
    padding: 0.8rem 1.4rem;
    border: 2px solid #fff;
    border-radius: var(--lmr-radius-small);
    background: #fff;
    color: var(--lmr-color-forest) !important;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none !important;
}

.lmr-home-hero__cta:hover {
    border-color: #dff3b7;
    background: #dff3b7;
    color: var(--lmr-color-forest) !important;
}

.lmr-home-hero__visual {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 38rem;
    margin-inline: auto;
}

.lmr-home-hero__shape {
    position: absolute;
    z-index: -1;
    inset: -12% -10% 8% 18%;
    border-radius: 45% 55% 62% 38% / 38% 45% 55% 62%;
    background: #2d6a4f;
    transform: rotate(-5deg);
}

.lmr-home-hero__image {
    display: block;
    width: 100%;
    height: auto;
    border: 8px solid rgba(255, 255, 255, 0.12);
    border-radius: clamp(16px, 3vw, 28px);
    box-shadow: 0 24px 54px rgba(5, 20, 13, 0.3);
}

/* Ritmo vertical y anchura coherentes en los principales bloques existentes. */
.home :where(
    .elementor-element-4a35c61,
    .elementor-element-5031d75,
    .elementor-element-ed625d8,
    .elementor-element-252d5f1f,
    .elementor-element-47c2939
) {
    padding-top: clamp(2.5rem, 7vw, 5rem);
    padding-bottom: clamp(2.5rem, 7vw, 5rem);
}

.home :where(.elementor-element-5031d75, .elementor-element-ed625d8) {
    background: var(--lmr-color-canvas);
}

.home :where(.elementor-element-5031d75, .elementor-element-ed625d8) ul.products li.product {
    border: 1px solid var(--lmr-color-line) !important;
    border-radius: var(--lmr-radius-card) !important;
    background: var(--lmr-color-surface) !important;
    box-shadow: var(--lmr-shadow-card);
}

.home :where(.elementor-element-5031d75, .elementor-element-ed625d8) ul.products li.product img {
    border-radius: 8px;
    background: #fff;
}

.home :where(.elementor-element-5031d75, .elementor-element-ed625d8) ul.products li.product .button {
    min-height: 48px;
    background: var(--lmr-color-forest) !important;
    color: #fff !important;
}

.home .elementor-widget-text-editor p {
    max-width: 68ch;
    margin-inline: auto;
    color: var(--lmr-color-text);
    font-size: 1rem;
    line-height: 1.7;
}

.home .elementor-element-47c2939 {
    border-block: 1px solid var(--lmr-color-line);
    background: #fff;
}

/* El buscador forma parte de la cabecera funcional, no una tarjeta aislada. */
.lmr-product-search-wrap {
    background: var(--lmr-color-canvas);
}

.lmr-product-search {
    max-width: var(--lmr-content-width);
    margin: 1rem auto;
    border-color: var(--lmr-color-line);
    background: #fff;
    box-shadow: var(--lmr-shadow-card);
}

/*
 * El color global de títulos no debe imponerse al pie oscuro. También se
 * neutralizan el fondo heredado y el comportamiento flex de `.ast-container`.
 */
#colophon.site-footer {
    margin: 0;
    padding: 0;
    background: #102f22 !important;
}

.lmr-footer {
    border-top: 0;
    background: #102f22;
}

.lmr-footer .lmr-footer__grid {
    display: grid !important;
    align-items: start;
    grid-template-columns: minmax(18rem, 1.65fr) repeat(2, minmax(12rem, 1fr));
    gap: clamp(2.5rem, 7vw, 6rem);
    padding-top: clamp(3.5rem, 7vw, 5.5rem);
    padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.lmr-accessibility-enhanced .lmr-footer :where(h2, p, a),
.lmr-accessibility-enhanced .lmr-footer__legal :where(p, a) {
    color: #fff !important;
}

.lmr-accessibility-enhanced .lmr-footer__intro p,
.lmr-accessibility-enhanced .lmr-footer__legal p {
    color: #e6eee9 !important;
}

.lmr-footer__eyebrow {
    margin: 0 0 0.75rem !important;
    color: #b9d77f !important;
    font-size: 0.78rem !important;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.4;
    text-transform: uppercase;
}

.lmr-footer__intro h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.lmr-footer__intro > p:last-child {
    max-width: 34rem;
    font-size: 1rem;
    line-height: 1.65;
}

.lmr-footer__nav h2 {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lmr-footer__nav a {
    font-size: 1rem;
    font-weight: 650;
    text-decoration-color: rgba(255, 255, 255, 0.45);
}

.lmr-footer__legal {
    background: #0a2419;
}

.lmr-footer__legal .ast-container {
    min-height: 58px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

@media (max-width: 782px) {
    .home .elementor-element-bcc1ed9 {
        display: none;
    }

    .home .elementor-element-b76efb5 {
        min-height: 68px;
    }

    .home .elementor-element-17c1c92 {
        min-height: 68px;
    }

    .home .elementor-element-b76efb5 img {
        width: auto;
        max-width: 112px;
        max-height: 56px;
    }

    .home .elementor-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        min-width: 52px;
        min-height: 52px;
        padding: 0.55rem 0.7rem;
        border: 2px solid var(--lmr-color-forest) !important;
        border-radius: 8px;
        background: #fff !important;
        color: var(--lmr-color-forest) !important;
    }

    .home .elementor-menu-toggle::after {
        content: "Menú";
        font-size: 0.875rem;
        font-weight: 800;
    }

    .lmr-home-hero__grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: 0;
        padding-top: 3.25rem;
        padding-bottom: 3.25rem;
    }

    .lmr-home-hero h1 {
        max-width: 13ch;
        font-size: clamp(2.5rem, 12vw, 3.75rem);
    }

    .lmr-home-hero__cta {
        width: 100%;
    }

    .lmr-home-hero__visual {
        max-width: 32rem;
    }

    .lmr-footer .lmr-footer__grid {
        grid-template-columns: 1fr;
    }

    .home :where(
        .elementor-element-4a35c61,
        .elementor-element-5031d75,
        .elementor-element-ed625d8,
        .elementor-element-252d5f1f,
        .elementor-element-47c2939
    ) {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lmr-accessibility-enhanced *,
    .lmr-accessibility-enhanced *::before,
    .lmr-accessibility-enhanced *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
