/* ==========================================================================
   BLOOM & COOKIES — LAYOUT GENERAL, HEADER, FOOTER Y COMPONENTES BASE
   Depende 100% de las variables definidas en tokens.css.
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body.bloom-theme {
    background-color: var(--bloom-fondo);
    color: var(--bloom-texto);
    font-family: var(--bloom-font-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.bloom-theme a {
    color: var(--bloom-primario);
    transition: color 0.18s ease, opacity 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

body.bloom-theme a:hover {
    color: var(--bloom-primario-hover);
}

/* Contenedor principal Astra alineado a nuestro ancho */
body.bloom-theme .ast-container {
    max-width: var(--bloom-container);
}

/* Ocultar el título redundante "Inicio" solo en la portada */
body.bloom-theme.home .entry-header {
    display: none;
}

body.bloom-theme.home .entry-content {
    margin-top: 0;
}

body.bloom-theme.home #primary.content-area {
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}

/* --- HEADER PRINCIPAL --- */
body.bloom-theme .site-header .ast-primary-header-bar {
    background-color: var(--bloom-superficie);
    border-top: 4px solid var(--bloom-primario);
    border-bottom: 1px solid var(--bloom-borde);
    box-shadow: 0 2px 12px color-mix(in srgb, var(--bloom-texto) 5%, transparent);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

body.bloom-theme .site-title a {
    font-family: var(--bloom-font-heading);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bloom-texto) !important;
    font-size: 1.25rem;
}

body.bloom-theme .main-header-menu > .menu-item > .menu-link {
    font-family: var(--bloom-font-body);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--bloom-texto);
    padding-inline: 0.68rem;
}

body.bloom-theme .main-header-menu > .menu-item > .menu-link:hover,
body.bloom-theme .main-header-menu > .menu-item.current-menu-item > .menu-link {
    color: var(--bloom-primario);
}

/* Carrito en header de Astra */
body.bloom-theme .ast-site-header-cart .ast-cart-menu-wrap .count {
    background-color: var(--bloom-primario);
    color: var(--bloom-sobre-primario);
    border-color: var(--bloom-primario);
}

/* Ocultar el dropdown chico de Astra porque usamos nuestro carrito lateral full-height */
body.bloom-theme .ast-site-header-cart .widget_shopping_cart {
    display: none !important;
}

/* --- FOOTER GLOBAL (cambia de oliva oscuro a espresso en Only Cookies) --- */
body.bloom-theme .site-footer,
body.bloom-theme .site-footer .ast-below-footer-wrap,
body.bloom-theme .site-footer .ast-primary-footer-wrap,
body.bloom-theme .site-footer .site-below-footer-wrap[data-section="section-below-footer-builder"],
body.bloom-theme .site-footer .site-primary-footer-wrap[data-section="section-primary-footer-builder"],
body.bloom-theme .site-footer .site-above-footer-wrap[data-section="section-above-footer-builder"] {
    background-color: var(--bloom-texto) !important;
    background-image: none !important;
    color: var(--bloom-sobre-primario) !important;
    border-top-color: var(--bloom-secundario) !important;
}

body.bloom-theme .site-footer {
    border-top: 3px solid var(--bloom-secundario);
}

body.bloom-theme .site-footer a,
body.bloom-theme .site-footer .ast-footer-copyright,
body.bloom-theme .site-footer p {
    color: var(--bloom-sobre-primario) !important;
    opacity: 0.9;
}

body.bloom-theme .site-footer a:hover {
    color: var(--bloom-secundario) !important;
    opacity: 1;
}

/* --- BOTONES REUTILIZABLES DEL CHILD THEME --- */
.bloom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--bloom-radius-pill);
    background-color: var(--bloom-primario);
    color: var(--bloom-sobre-primario) !important;
    border: 2px solid var(--bloom-primario);
    font-family: var(--bloom-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    line-height: 1.2;
    transition: transform 0.16s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.bloom-btn:hover {
    background-color: var(--bloom-primario-hover);
    border-color: var(--bloom-primario-hover);
    transform: translateY(-1px);
    box-shadow: var(--bloom-sombra-sm);
}

.bloom-btn--outline {
    background-color: transparent;
    color: var(--bloom-primario) !important;
    border-color: var(--bloom-primario);
}

.bloom-btn--outline:hover {
    background-color: var(--bloom-primario);
    color: var(--bloom-sobre-primario) !important;
}

/* --- UTILIDADES DE SECCIÓN PARA LA HOME --- */
.bloom-section {
    margin: 44px 0;
}

.bloom-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.bloom-section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bloom-primario);
    margin-bottom: 4px;
}

.bloom-section-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    line-height: 1.2;
}

.bloom-section-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid var(--bloom-primario);
    padding-bottom: 2px;
}

@media (max-width: 767px) {
    .bloom-section {
        margin: 30px 0;
    }
    body.bloom-theme.home #primary.content-area {
        margin-top: 0.75rem;
    }
}
/* --- SEPARACION VISUAL DEL MENU MOVIL CONTRA EL FONDO --- */
@media (max-width: 921px) {
    body.bloom-theme .ast-mobile-header-wrap .ast-mobile-header-content,
    body.bloom-theme #ast-mobile-popup .ast-mobile-popup-inner {
        border-bottom: 1.5px solid var(--bloom-borde) !important;
        border-bottom-color: color-mix(in srgb, var(--bloom-texto) 24%, var(--bloom-fondo)) !important;
        box-shadow: 0 10px 22px -12px rgba(28, 28, 22, 0.24);
    }
}

/* --- FOOTER LEGAL: ALINEACION Y DESPEJE EN MOVIL --- */
body.bloom-theme .site-footer .footer-nav-wrap .astra-footer-horizontal-menu {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 20px;
}

body.bloom-theme .site-footer .footer-nav-wrap .menu-link {
    font-size: 0.9rem;
    padding: 4px 0 !important;
}

body.bloom-theme .site-footer .ast-footer-copyright {
    font-size: 0.9rem;
}

@media (max-width: 921px) {
    body.bloom-theme .site-footer .site-below-footer-wrap {
        padding-top: 22px;
        padding-bottom: 84px !important;
    }

    body.bloom-theme .site-footer .ast-footer-copyright {
        text-align: center;
        margin-bottom: 10px;
    }

    body.bloom-theme .site-footer .footer-nav-wrap .astra-footer-horizontal-menu {
        justify-content: center;
        gap: 6px 16px;
    }
}

/* --- LECTURA LIMPIA EN PAGINAS LEGALES (TERMINOS, REEMBOLSOS, PRIVACIDAD) --- */
body.bloom-theme.page-id-127 .ast-article-single,
body.bloom-theme.page-id-11 .ast-article-single,
body.bloom-theme.page-id-3 .ast-article-single {
    background-color: var(--bloom-superficie);
    border: 1px solid var(--bloom-borde);
    border-radius: var(--bloom-radius-lg, 18px);
    padding: clamp(24px, 4vw, 44px);
    max-width: 860px;
    margin: 24px auto 48px;
    box-shadow: 0 12px 30px -18px rgba(28, 28, 22, 0.16);
}

body.bloom-theme.page-id-127 .entry-content h2,
body.bloom-theme.page-id-11 .entry-content h2,
body.bloom-theme.page-id-3 .entry-content h2 {
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
    font-size: 1.25rem;
}

body.bloom-theme.page-id-127 .entry-content ul,
body.bloom-theme.page-id-11 .entry-content ul,
body.bloom-theme.page-id-3 .entry-content ul {
    margin: 0.5rem 0 1.1rem 1.25rem;
}

body.bloom-theme.page-id-127 .entry-content li,
body.bloom-theme.page-id-11 .entry-content li,
body.bloom-theme.page-id-3 .entry-content li {
    margin-bottom: 0.45rem;
    line-height: 1.6;
}
