/*
 * Peritaje final de interfaz HLUNA
 * Lectura, contraste, alineacion y comportamiento adaptable compartidos.
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: clip;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* Estos elementos ya no forman parte de la navegacion solicitada. */
#btnmenu,
#navmenu,
.hluna-footer-nav,
[data-hluna-footer-links] {
    display: none !important;
}

/* Lectura minima coherente en vistas publicas, cliente y administracion. */
body :where(main, [role="main"]) :where(label, td, th) {
    font-size: 1.4rem !important;
    line-height: 1.5 !important;
}

body :where(main, [role="main"]) :where(input, select, textarea, output) {
    font-size: 1.6rem !important;
    line-height: 1.5 !important;
}

body :where(main, [role="main"]) button {
    font-size: 1.5rem !important;
    line-height: 1.4 !important;
}

body :where(main, [role="main"]) p,
body :where(main, [role="main"]) li {
    font-size: 1.6rem !important;
    line-height: 1.65 !important;
}

body :where(main, [role="main"]) p,
.sectionproductodetalle__descripcion,
.sectionproductodetalle__descripcion p,
[class*="descripcion"] p,
.cesta-resumen__nota,
.cesta-resumen__impuestos {
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: none;
}

/* El navegador no debe cortar nombres técnicos ni la nota comercial. */
body.buyer-page--productodetalle .spandescripcion,
body.buyer-page--cesta .cesta-resumen p {
    text-align: justify !important;
    text-justify: inter-word !important;
    hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.buyer-page--productodetalle .spandescripcion {
    font-size: 15px !important;
    line-height: 1.65 !important;
}

.pedido-productos__linea,
body.admin-home main small,
body.product-admin main small,
.buyer-dashboard__intro > span,
.catalog-page__intro > span,
.public-home__hero-kicker,
.public-home__hero-meta span,
.public-home__software-bar strong,
.public-home__visual-caption small,
.public-home__visual-product strong,
body.buyer-page--cesta .cesta-vacia__etiqueta,
body.buyer-page--cesta .cesta-resumen__etiqueta,
body.buyer-page--cesta .cesta-item__etiqueta,
body.buyer-page--cesta .cesta-item__cantidad > span,
body.buyer-page--cesta .cesta-item__subtotal > span,
body.buyer-page--productodetalle .sectionañadidocesta__cantidad > span,
body.buyer-page--productodetalle .sectionañadidocesta__subtotal > span {
    font-size: 1.4rem !important;
    line-height: 1.5 !important;
}

.password-requisitos strong {
    font-size: 1.4rem !important;
    line-height: 1.5 !important;
}

body.public-home--premium .public-home__receipt-options strong {
    font-size: 1.4rem !important;
    line-height: 1.5 !important;
}

body.public-home--premium .public-home__receipt-options small {
    font-size: 1.5rem !important;
    line-height: 1.5 !important;
}

body.public-home--premium .public-home__receipt-options p {
    grid-template-columns: 8.8rem minmax(0, 1fr) !important;
    hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

body.public-home--premium .public-home__receipt-options :where(strong, small) {
    hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

/* Encabezados sin el antiguo boton MENÚ y sin desbordamiento horizontal. */
.buyer-shell,
.public-home__controlbar {
    width: 100%;
    max-width: 100%;
}

.buyer-shell__brand,
.public-home__brand {
    margin-right: auto;
}

.buyer-shell :where(a, select, span),
.public-home__controlbar :where(a, select, span) {
    font-size: 1.6rem !important;
}

/* Cabecera pública: escala legible y jerarquía consistente en todas las vistas. */
.buyer-shell .buyer-shell__brand span,
.public-home__controlbar .public-home__brand span {
    font-size: 2.2rem !important;
    line-height: 1 !important;
}

.buyer-shell .buyer-shell__brand small,
.public-home__controlbar .public-home__brand small {
    font-size: 1.3rem !important;
    line-height: 1.2 !important;
}

.buyer-shell .asidecestasesion .asidedivcestasesion__cesta span:nth-of-type(2),
.public-home__controlbar .asidedivcestasesion__cesta span:nth-of-type(2) {
    font-size: 1.4rem !important;
}

/* Prioridad sobre las reglas históricas de windowform.css. */
html body.buyer-page header .buyer-shell > .buyer-shell__brand > span,
html body.public-home header .public-home__controlbar .public-home__brand > span {
    font-size: 2.2rem !important;
    line-height: 1 !important;
}

html body.buyer-page header .buyer-shell > .buyer-shell__brand > small,
html body.public-home header .public-home__controlbar .public-home__brand > small {
    font-size: 1.3rem !important;
    line-height: 1.2 !important;
}

html body.buyer-page .buyer-shell :is(#moneda, #busqueda, #consultalicencia, #login),
html body.buyer-page .buyer-shell .asidedivcestasesion__cesta > span:first-child,
html body.public-home .public-home__controlbar :is(#moneda, #busqueda, #consultalicencia, #login),
html body.public-home .public-home__controlbar .asidedivcestasesion__cesta > span:first-child {
    font-size: 1.6rem !important;
    line-height: 1.25 !important;
}

/* Las reglas históricas viven en esta capa; los !important deben corregirse
   dentro de la misma capa para respetar la jerarquía tipográfica final. */
@layer hluna-legibility {
    html body.buyer-page.buyer-page header .buyer-shell.buyer-shell > .buyer-shell__brand.buyer-shell__brand > span,
    html body.public-home.public-home header .public-home__controlbar.public-home__controlbar .public-home__brand.public-home__brand > span {
        font-size: 2.2rem !important;
        line-height: 1 !important;
    }

    html body.buyer-page header .buyer-shell > .buyer-shell__brand > span,
    html body.public-home header .public-home__controlbar .public-home__brand > span {
        font-size: 2.2rem !important;
        line-height: 1 !important;
    }

    html body.buyer-page header .buyer-shell > .buyer-shell__brand > small,
    html body.public-home header .public-home__controlbar .public-home__brand > small {
        font-size: 1.3rem !important;
        line-height: 1.2 !important;
    }

    html body.buyer-page .buyer-shell :is(#moneda, #busqueda, #consultalicencia, #login),
    html body.buyer-page .buyer-shell .asidedivcestasesion__cesta > span:first-child,
    html body.public-home .public-home__controlbar :is(#moneda, #busqueda, #consultalicencia, #login),
    html body.public-home .public-home__controlbar .asidedivcestasesion__cesta > span:first-child {
        font-size: 1.6rem !important;
        line-height: 1.25 !important;
    }
}

.public-home__controlbar {
    grid-template-columns: minmax(180px, 1fr) auto auto auto !important;
}

/* Pie limpio: solo contacto, redes y datos de la empresa, con lectura real. */
body > footer :where(a, span, p, h4),
body > footer #labelemail,
body > footer #labelcelular,
body > footer #labelwhatsapp,
body > footer #labelyoutube,
body > footer #labelfacebook,
body > footer #labeltiktok {
    font-size: 16px !important;
    line-height: 1.55 !important;
}

body > footer a {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body > footer a:hover,
body > footer a:focus-visible {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Prioridad explícita frente a las reglas heredadas de enlaces globales. */
html body:is(.public-home, .buyer-page, .buyer-auth, .catalog-page, .buyer-dashboard, .product-admin, .admin-home)
    > footer :is(#labelwhatsapp, #labelyoutube, #labelfacebook, #labeltiktok) {
    font-size: 16px !important;
    line-height: 1.55 !important;
}

/* Contraste estable: el texto nunca desaparece sobre un fondo igual. */
.productodetalle-regreso a,
.productodetalle-regreso a:visited {
    background: #050607 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid #050607 !important;
}

.productodetalle-regreso a:hover,
.productodetalle-regreso a:focus-visible {
    background: #ffffff !important;
    color: #050607 !important;
    -webkit-text-fill-color: #050607 !important;
}

button,
[role="button"],
input[type="button"],
input[type="submit"] {
    -webkit-text-fill-color: currentColor;
}

/* Panel administrador: contraste del encabezado del catalogo de productos. */
body.product-admin .producto-app-shell:not(.producto-app-shell--editor)
    .producto-lista-maestra__tabla thead th,
body.product-admin .producto-app-shell:not(.producto-app-shell--editor)
    .producto-lista-maestra__tabla thead th * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

@media (max-width: 820px) {
    .public-home__controlbar {
        grid-template-columns: minmax(0, 1fr) auto auto !important;
    }

    .buyer-shell > *,
    .public-home__controlbar > * {
        min-width: 0;
    }

    .buyer-shell :where(a, select, span),
    .public-home__controlbar :where(a, select, span) {
        font-size: 1.4rem !important;
    }

    body > footer :where(a, span, p, h4),
    body > footer #labelemail,
    body > footer #labelcelular,
    body > footer #labelwhatsapp,
    body > footer #labelyoutube,
    body > footer #labelfacebook,
    body > footer #labeltiktok {
        font-size: 16px !important;
    }
}

@media (max-width: 520px) {
    body :where(main, [role="main"]) p,
    body :where(main, [role="main"]) li {
        font-size: 1.6rem !important;
    }

    body :where(main, [role="main"]) :where(label, td, th) {
        font-size: 1.4rem !important;
    }
}

/* 2026-08-30 · Compactación global final de secciones y pie institucional. */
body.public-home--premium .public-home__commercial article {
    min-height: 8.2rem !important;
    padding: 1rem 1.4rem !important;
}

body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note {
    margin: 2.2rem auto !important;
    padding: 1.8rem 1.5rem !important;
}

body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note p {
    font-size: clamp(2.2rem, 2.25vw, 3rem) !important;
    line-height: 1.2 !important;
}

body.public-home--premium .public-home__support {
    padding: 2.8rem clamp(2.4rem, 4vw, 5rem) !important;
}

body.public-home--premium .public-home__support > div > span {
    margin-bottom: 1rem !important;
}

body.public-home--premium .public-home__support h2 {
    font-size: clamp(3.2rem, 4vw, 5.4rem) !important;
    line-height: 0.95 !important;
}

body.public-home--premium .public-home__main {
    padding-bottom: 3.2rem !important;
}

body:is(.buyer-auth, .buyer-page, .catalog-page, .buyer-dashboard, .product-admin, .admin-home) > main,
body.buyer-dashboard .buyer-dashboard__main {
    margin-bottom: 2.4rem !important;
}

body > footer,
body.public-home--premium > footer,
body.buyer-page > footer {
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 1.2rem clamp(1.6rem, 4vw, 5rem) 1rem !important;
}

body > footer > div {
    gap: 0.7rem 2.4rem !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 1.1rem 0 !important;
}

body > footer > div > div,
body > footer > div > div > :where(a, span) {
    min-height: 0 !important;
}

body > footer > h4,
body > footer #labelcopyright {
    margin: 0.8rem auto 0 !important;
    padding: 0 !important;
}

body > footer :where(a, span, p, h4),
body > footer #labelemail,
body > footer #labelcelular,
body > footer #labelwhatsapp,
body > footer #labelyoutube,
body > footer #labelfacebook,
body > footer #labeltiktok {
    font-size: 20px !important;
    line-height: 1.35 !important;
}

/* Los identificadores se declaran aparte: evita que la rama genérica de la
   lista pierda prioridad frente a reglas antiguas de la portada. */
html body > footer #labelemail,
html body > footer #labelcelular,
html body > footer #labelwhatsapp,
html body > footer #labelyoutube,
html body > footer #labelfacebook,
html body > footer #labeltiktok,
html body > footer #labelcopyright {
    font-size: 20px !important;
    line-height: 1.35 !important;
}

body > footer a {
    min-height: 3.2rem !important;
}

@media (max-width: 820px) {
    body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note {
        width: calc(100% - 2.4rem) !important;
        margin: 1.6rem auto !important;
        padding: 1.6rem 1.2rem !important;
    }

    body.public-home--premium .public-home__support {
        padding: 2.4rem 1.8rem !important;
    }

    body > footer :where(a, span, p, h4),
    body > footer #labelemail,
    body > footer #labelcelular,
    body > footer #labelwhatsapp,
    body > footer #labelyoutube,
    body > footer #labelfacebook,
    body > footer #labeltiktok {
        font-size: 18px !important;
    }

    html body > footer #labelemail,
    html body > footer #labelcelular,
    html body > footer #labelwhatsapp,
    html body > footer #labelyoutube,
    html body > footer #labelfacebook,
    html body > footer #labeltiktok,
    html body > footer #labelcopyright {
        font-size: 18px !important;
    }
}

/* 2026-08-30 · Mensaje de automatización y sello de licencia de la portada. */
body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note {
    background:
        radial-gradient(circle at 50% 0%, rgba(5, 6, 7, 0.045), transparent 58%),
        #ffffff !important;
}

body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note p {
    display: grid !important;
    gap: 0.9rem !important;
    justify-items: center !important;
    max-width: 96rem !important;
    margin: 0 auto !important;
    color: #050607 !important;
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: clamp(3.2rem, 3.15vw, 4.8rem) !important;
    font-weight: 600 !important;
    line-height: 1.04 !important;
    letter-spacing: -0.035em !important;
    word-spacing: normal !important;
    text-align: center !important;
    text-justify: auto !important;
    text-wrap: balance;
}

body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note p::after {
    width: 5.6rem;
    height: 0.2rem;
    margin-top: 0.4rem;
    background: #050607;
    content: '';
}

body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note .public-home__license-seal.public-home__license-seal {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.6rem 1.5rem;
    color: #ffffff !important;
    background: #050607;
    font-family: var(--font-primary) !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase;
}

body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note .public-home__license-message {
    display: block !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    word-spacing: normal !important;
    text-align: center !important;
}

body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note strong {
    display: inline;
    color: #050607 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: 600 !important;
}

@media (max-width: 820px) {
    body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note p {
        gap: 0.8rem !important;
        font-size: clamp(2.8rem, 7vw, 3.8rem) !important;
        line-height: 1.08 !important;
    }

    body.public-home--premium.public-home--saas.public-home--cinematic .public-home__license-note .public-home__license-seal {
        font-size: 1rem !important;
        letter-spacing: 0.14em !important;
    }
}
