/* Modern reset (Andy Bell style) */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.65;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
/* Suelo de 16px en TODO campo de formulario, lleve clase o no. Por debajo de
   16px, Safari en iOS hace zoom al enfocar el campo y el usuario se queda con
   la página ampliada y desplazada. Es la regla que la escala tipográfica de
   variables.css daba por hecha y no existía en ninguna parte. */
input, textarea, select { font-size: max(16px, 1em); }
button { background: none; border: 0; cursor: pointer; padding: 0; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-amber); }

::selection { background: var(--color-gold); color: var(--color-bg); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 3px; border-radius: 2px; }

/* Scrollbar custom */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-gold-dark); border-radius: 0; border: 2px solid var(--color-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }
html { scrollbar-color: var(--color-gold-dark) var(--color-bg); scrollbar-width: thin; }

/* Tipografía editorial — Fraunces (serif variable opsz) en display, Manrope en UI.
   Axis opsz sincronizado con font-size vía font-optical-sizing para display/UI crispness. */
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    font-family: var(--font-display);
    color: var(--color-text);
    font-optical-sizing: auto;
    font-feature-settings: "ss01", "ss02";
}
h1, .h1 {
    font-size: var(--fs-3xl);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.03;
    text-wrap: balance;
}
h2, .h2 {
    font-size: var(--fs-2xl);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-wrap: balance;
}
h3, .h3 {
    font-size: var(--fs-xl);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.2;
    text-wrap: balance;
}
h4, .h4 {
    font-family: var(--font-ui);
    font-size: var(--fs-lg);
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.3;
    text-wrap: balance;
}

/* Line-length natural en párrafos largos — evita huérfanos feos */
p { text-wrap: pretty; }

/* Cifras tabulares en UI y precios */
.numeric, .price, .btn, .badge, .tag, .product-card__price, .product-info__price {
    font-feature-settings: "tnum", "lnum";
}

/* Cifras old-style en titulares de precio y display */
.product-price, .product-info__price #product-price {
    font-feature-settings: "onum";
}

.eyebrow {
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-gold);
    font-weight: 500;
}

.text-muted { color: var(--color-text-muted); }
.text-dim { color: var(--color-text-dim); }
.text-gold { color: var(--color-gold); }
.text-center { text-align: center; }

/* Utilitarias */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
