/* Tokens y piezas compartidas por la tienda y el panel. */
:root {
  --bg: #1B1420;
  --card: #261D2C;
  --card-2: #30253A;
  --card-3: #3A2E45;
  --text: #F3EDF5;
  --muted: #B3A5BB;
  --bronce: #C39A5B;
  --bronce-claro: #DDBB84;
  --coral: #D9645F;
  --wa: #25D366;
  --wa-texto: #06301A;
  --linea: rgba(195, 154, 91, .28);
  --linea-suave: rgba(243, 237, 245, .09);
  --serif: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --radio: 14px;
  --radio-sm: 10px;
  --sombra: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--bronce-claro); outline-offset: 2px; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.eyebrow {
  font-size: .72rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--bronce); font-weight: 500;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .7em 1.4em;
  border-radius: 999px; border: 1px solid transparent;
  font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-bronce { background: var(--bronce); color: #1B1420; }
.btn-bronce:hover { background: var(--bronce-claro); }
.btn-borde { border-color: var(--linea); background: transparent; color: var(--text); }
.btn-borde:hover { border-color: var(--bronce); color: var(--bronce-claro); }
.btn-wa { background: var(--wa); color: var(--wa-texto); font-weight: 600; }
.btn-wa:hover { box-shadow: 0 0 0 4px rgba(37, 211, 102, .18); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-sm { min-height: 38px; padding: .5em 1em; font-size: .72rem; }
.btn-ancho { width: 100%; }
.btn-texto { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: .5em; font-size: .9rem; }
.btn-texto:hover { color: var(--text); }
.btn-icono {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid var(--linea-suave); background: transparent; color: var(--text);
}
.btn-icono:hover { border-color: var(--bronce); color: var(--bronce-claro); }

/* Formularios */
.campo { display: grid; gap: .35rem; margin: 0 0 1rem; border: 0; padding: 0; min-width: 0; }
.campo > span, .campo > legend {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 0;
}
.campo input:not([type=radio]):not([type=checkbox]):not([type=range]), .campo select, .campo textarea, .select select {
  width: 100%; min-height: 46px; padding: .65rem .9rem;
  background: var(--bg); border: 1px solid var(--linea-suave); border-radius: var(--radio-sm);
  font-size: 16px; /* evita el zoom automático de iOS */
  transition: border-color .2s;
}
.campo textarea { min-height: 100px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .select select:focus { outline: none; border-color: var(--bronce); }
.campo small { color: var(--muted); font-size: .8rem; }
.error-form { color: var(--coral); font-size: .9rem; min-height: 0; margin: 0 0 .6rem; }
.error-form:empty { display: none; }

.aviso {
  border: 1px solid rgba(217, 100, 95, .45); background: rgba(217, 100, 95, .1);
  border-radius: var(--radio-sm); padding: .8rem 1rem; font-size: .92rem; margin-bottom: 1rem;
}
.aviso.info { border-color: var(--linea); background: rgba(195, 154, 91, .08); }

/* Etiquetas */
.tag {
  display: inline-block; padding: .3em .75em; border-radius: 999px;
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
  background: rgba(27, 20, 32, .82); border: 1px solid var(--linea); color: var(--bronce-claro);
  backdrop-filter: blur(6px);
}
.tag-oferta { border-color: rgba(217, 100, 95, .7); color: #F1A29E; }
.tag-nuevo { color: var(--text); border-color: rgba(243, 237, 245, .35); }

/* Aviso flotante */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: .8rem 1.2rem;
  background: var(--card-2); border: 1px solid var(--linea); border-radius: 12px; box-shadow: var(--sombra);
  font-size: .92rem; text-align: center;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--coral); }

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