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

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    /* Manrope en todo el sitio, sin excepción. */
    font-family: var(--font-heading);
    color: var(--color-body);
    font-size: 16px;
    line-height: 1.5;
    background: var(--color-fondo);
}

img, svg {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* Escala tipográfica del sistema. Cualquier selector más específico (los hay
   en cada sección) gana sobre esto — es el tamaño por defecto de un
   encabezado que todavía no tiene su propia clase. */
h1:where(:not(.ax-h1p)) { font-size: var(--text-display-h1); }
/* .ax-h1p: <h2> de bloque promovido a <h1> de la página (ver andexport_promover_h1): conserva el tamaño de h2. */
h2, :where(h1.ax-h1p) { font-size: var(--text-header-h2); }
h3 { font-size: var(--text-header-h3); }
h4 { font-size: var(--text-title-h4); }
h5 { font-size: var(--text-title-h5); }
h6 { font-size: var(--text-title-h6); }

p { margin: 0; }

/* Sin esto el navegador dibuja el <hr> con su estilo "inset" (borde en los
   4 lados + sombreado de dos tonos) — se reemplaza por una sola línea plana
   del gris que ya usa todo el sitio para bordes (--color-border, ver
   tokens.css), en vez de repetir el hex suelto en cada lugar que use <hr>. */
hr {
    border: none;
    border-top: 0.5px solid var(--color-border);
}

/* Tokens que no son un heading: cuerpo de texto, etiquetas de UI y captions. */
.text-body-lg { font-family: var(--font-heading); font-size: var(--text-body-lg); font-weight: 400; }
.text-body { font-family: var(--font-heading); font-size: var(--text-body); font-weight: 400; }
.text-body-sm { font-family: var(--font-heading); font-size: var(--text-body-sm); font-weight: 400; }
.text-caption { font-family: var(--font-heading); font-size: var(--text-caption); font-weight: 400; }

.text-label {
    font-size: var(--text-label);
    font-weight: 700;
}

.text-label-sm {
    font-size: var(--text-label-sm);
    font-weight: 700;
}

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

/* Quien edita un título desde el panel escribe <strong> o <b> — es lo
   intuitivo, sin necesidad de recordar una clase CSS. Scoped a los títulos
   de sección: un <strong> dentro de un h1/h2/h3 del contenido del editor de
   bloques (posts, páginas sueltas) no debería salir rojo. */
.section-head :where(h2, h1.ax-h1p) strong,
.section-head :where(h2, h1.ax-h1p) b,
.casos-header h1 strong,
.casos-header h1 b {
    color: var(--color-brand-red);
    font-weight: 700;
}

/* Fuera de un título, la negrita no sale roja sola (ver arriba) — para eso
   está el botón "Formato → Rojo destacado" de los campos WYSIWYG (ver
   andexport_wysiwyg_formatos() en inc/setup.php), que aplica esta clase. */
.text-brand {
    color: var(--color-brand-red-texto);
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-brand-red);
    color: var(--color-white);
    padding: 0.75rem 1.25rem;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* Botones: los 4 del sistema (primary/secondary/ghost/danger) + outline-light,
   que no es del sistema pero hace falta para un botón sobre fondo oscuro. */
.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: var(--text-label-sm);
    text-align: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    background: var(--color-brand-red);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-brand-red-dark);
}

.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
    background: #f3b4b5;
    color: var(--color-white);
    cursor: not-allowed;
}

.btn-secondary {
    border-color: var(--color-brand-red);
    color: var(--color-brand-red);
}

.btn-secondary:hover:not(:disabled):not([aria-disabled="true"]) {
    border-color: var(--color-brand-red);
    background: var(--color-brand-red);
    color: var(--color-white);
}

.btn-ghost {
    padding-inline: 0;
    color: var(--color-ink);
}

.btn-ghost:hover {
    text-decoration: underline;
}

.btn-danger {
    background: var(--color-warning);
    color: var(--color-ink);
}

.btn-danger:hover {
    background: #d98c14;
}

.btn-outline-light {
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-outline-light:hover {
    background: var(--color-white);
    color: var(--color-ink);
}

/* Glass: tratamiento que tenía .mega-menu-sub-label (layout.css, ya sin glass) — un botón
   sobre foto, no un badge estático. Valores tal cual, sin tokenizar: el
   recipe de rgba ya se repite sin tokens en esa etiqueta, así que esta es la
   segunda vez, no la primera. */
.btn-glass {
    background-color: rgba(255, 255, 255, 0.10);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.55), inset -1px -1px 0 rgba(255, 255, 255, 0.14), inset 2px 2px 1px rgba(150, 220, 255, 0.10), inset -2px -2px 1px rgba(255, 150, 210, 0.08), 0 8px 32px rgba(0, 0, 0, 0.28);
    color: var(--color-white);
}

.btn-glass:hover {
    background-color: rgba(255, 255, 255, 0.18);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-whatsapp);
    color: var(--color-white);
    border-radius: var(--radius-pill);
}

.btn-whatsapp:hover {
    background: var(--color-whatsapp-dark);
}

.btn-whatsapp svg {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
}

.btn-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-linkedin);
    color: var(--color-white);
}

.btn-linkedin:hover {
    background: var(--color-linkedin-dark);
}

.btn-linkedin svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.btn-lg {
    padding: 1rem 2rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.link-accent {
    color: var(--color-brand-red);
    font-weight: 600;
    font-size: 0.875rem;
}

.link-accent:hover {
    color: var(--color-brand-red-dark);
}

/* Sección Showroom
 * título*/
.showroom :where(h2, h1.ax-h1p) {
    max-width: 90%;
}

@media (max-width: 1024px) {
    .showroom :where(h2, h1.ax-h1p) {
        max-width: 100%;
    }
}