/* =========================================================
   Mil cositas de Leah · Sistema visual (tokens + componentes) y tienda
   ========================================================= */

:root {
  --bg: #FFF7F9;
  --surface: #FFFFFF;
  --border: #F2DDE4;
  --border-strong: #E6C9D3;
  --input-border: #A8899A;
  --ink: #3A2A33;
  --muted: #6E5A65;
  --primary: #C24D74;
  --primary-hover: #AA3E63;
  --accent: #9B5C86;
  --pink-soft: #FBE3EA;
  --lavender: #EDE4F7;
  --lavender-ink: #5B3F8A;
  --mint: #E2F3EC;
  --mint-ink: #2F6B52;
  --peach: #FDF1DC;
  --peach-ink: #7A4B00;
  --sky: #E3ECFA;
  --sky-ink: #1D4E89;
  --lilac: #EEE7F6;
  --lilac-ink: #5B3A8C;
  --gray: #EEEAEC;
  --gray-ink: #5E5459;
  --danger: #9B2E57;
  --disabled: #CDB7C1;

  --font-title: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-card: 18px;
  --r-ctl: 12px;
  --shadow: 0 1px 2px rgba(58, 42, 51, .04), 0 6px 20px rgba(194, 77, 116, .06);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

:focus-visible { outline: 3px solid rgba(194, 77, 116, .45); outline-offset: 2px; }

.icon { flex: none; display: block; }
[data-icon] { display: inline-flex; }

.sr-only {
  position: absolute; 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: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-ctl);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-ctl);
  font-weight: 700; font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer; background: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled { cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { background: var(--disabled); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: #FFF0F4; }
.btn-lg { min-height: 56px; font-size: 17px; width: 100%; }
.btn-block { width: 100%; }
.btn-link { background: none; color: var(--accent); min-height: 44px; }
.btn-link:hover { text-decoration: underline; }

/* ---------- Etiquetas ---------- */

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap;
}
.tag-lavender { background: var(--lavender); color: var(--lavender-ink); }
.tag-mint { background: var(--mint); color: var(--mint-ink); }
.tag-peach { background: var(--peach); color: var(--peach-ink); }
.tag-danger { background: var(--pink-soft); color: var(--danger); }
.tag-sky { background: var(--sky); color: var(--sky-ink); }
.tag-lilac { background: var(--lilac); color: var(--lilac-ink); }
.tag-gray { background: var(--gray); color: var(--gray-ink); }

/* ---------- Formularios ---------- */

.field { display: block; margin-bottom: 14px; }
.field > label, .field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--input-border); border-radius: var(--r-ctl);
  background: var(--surface); font-size: 16px;
}
.textarea { padding: 12px 14px; min-height: 96px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 13px; color: var(--danger); font-weight: 600; margin-top: 6px; }

.seg { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 8px; }
.seg button {
  min-height: 48px; padding: 0 8px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-ctl);
  font-weight: 600; font-size: 15px; cursor: pointer;
}
.seg button[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--pink-soft); }

.notice {
  background: var(--lavender); color: var(--lavender-ink);
  border-radius: var(--r-ctl); padding: 12px 14px; font-size: 14px; margin-bottom: 14px;
}
.error-box {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--pink-soft); color: var(--danger);
  border-radius: var(--r-ctl); padding: 12px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px;
}

