/*
 * Tokens y base. Contrastes verificados contra el fondo indicado (WCAG 2.2 AA):
 *  --color-text   #1f2328 sobre #ffffff  = 15.8:1
 *  --color-muted  #57606a sobre #ffffff  =  6.4:1
 *  --color-primary #0b5cad sobre #ffffff =  6.6:1  (texto blanco sobre primario = 6.6:1)
 *  --color-success #116329 sobre #ffffff =  7.5:1
 *  --color-danger  #b3261e sobre #ffffff =  6.5:1
 *  --color-warning-text #7a4a00 sobre #fff4d6 = 7.0:1
 *  --color-border  #8c959f sobre #ffffff =  3.1:1  (componentes ≥ 3:1)
 */
:root {
  /* Spec 003 (RM-06): tokens del tema de la tienda. Valores neutros; la hoja
     /media/theme/{clave}-v{n}.css de cada tienda los reemplaza (contraste AA garantizado). */
  --brand: #0B5CAD;
  --on-brand: #FFFFFF;
  --brand-accent: #0B5CAD;
  --brand-soft: #EEF2F7;
  --focus-ring: #0B5CAD;
  --color-bg: #ffffff;
  --color-surface: #f6f8fa;
  --color-text: #1f2328;
  --color-muted: #57606a;
  --color-border: #8c959f;
  --color-border-soft: #d0d7de;
  --color-primary: #0b5cad;
  --color-primary-hover: #094a8c;
  --color-on-primary: #ffffff;
  --color-success: #116329;
  --color-success-bg: #dafbe1;
  --color-danger: #b3261e;
  --color-danger-bg: #ffebe9;
  --color-warning-text: #7a4a00;
  --color-warning-bg: #fff4d6;
  --color-info-bg: #ddf4ff;
  --color-focus: #0b5cad;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  --radius: 0.5rem;
  --target-min: 44px; /* UMB-10 */
  --motion-fast: 150ms;
  --motion-base: 250ms;
  --shadow: 0 1px 3px rgba(31, 35, 40, 0.12), 0 8px 24px rgba(31, 35, 40, 0.08);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-3); }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
p { margin: 0 0 var(--space-3); }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-hover); }

button, input, select, textarea { font: inherit; color: inherit; }

button, .btn, input[type="checkbox"], input[type="radio"], select,
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="datetime-local"], textarea {
  min-height: var(--target-min);
}

input[type="checkbox"], input[type="radio"] { min-width: 24px; min-height: 24px; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus-ring, var(--color-focus));
  outline-offset: 2px;
  border-radius: 2px;
}

.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;
}

.skip-link {
  position: absolute; left: var(--space-2); top: -100px;
  background: var(--color-primary); color: var(--color-on-primary);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius); z-index: 1000;
}
.skip-link:focus { top: var(--space-2); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); }

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