/* Estilos base compartidos por la tienda y el admin. Tema oscuro con un acento naranja. */
:root {
  --fondo: #0d1014; --panel: #151a21; --panel2: #1c232c; --linea: #2a323d;
  --texto: #f4f4f2; --suave: #a3acb7; --foto: #f2f1ee;
  --acento: #ff5a1f; --acento2: #ffb020; --sobre-acento: #0d1014;
  --ok: #3ddc84; --aviso: #ffb020; --mal: #ff6b5e;
  --radio: 14px;
  --titulo: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", Impact, sans-serif;
  --cuerpo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 1rem/1.5 var(--cuerpo); -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--titulo); text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--acento2); outline-offset: 2px; }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--acento); color: var(--sobre-acento); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.saltar:focus { top: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 2px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 800; text-decoration: none; text-align: center; background: var(--acento); color: var(--sobre-acento); transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.08); }
.btn.borde { background: transparent; border-color: var(--linea); color: var(--texto); }
.btn.borde:hover { border-color: var(--suave); }
.btn.peligro { background: transparent; border-color: var(--mal); color: var(--mal); }
.btn.verde { background: var(--ok); color: #06210f; }
.btn.chico { min-height: 44px; padding: 0 14px; font-size: .92rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; transform: none; }

.campo { display: grid; gap: 6px; font-weight: 600; }
.campo input, .campo select, .campo textarea { background: var(--panel2); border: 2px solid var(--linea); border-radius: 10px; min-height: 48px; padding: 10px 12px; color: var(--texto); font-weight: 400; width: 100%; }
.campo textarea { min-height: 76px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--acento2); }
.campo small { color: var(--suave); font-weight: 400; }

.insignia { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--linea); white-space: nowrap; }
.insignia::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--suave); }
.insignia.disponible { color: var(--ok); } .insignia.disponible::before { background: var(--ok); }
.insignia.ultimas { color: var(--aviso); } .insignia.ultimas::before { background: var(--aviso); }
.insignia.agotado { color: var(--mal); } .insignia.agotado::before { background: var(--mal); }
.rareza { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; background: #000a; color: #fff; }
.rareza.especial { background: var(--acento2); color: #1b1200; }
.rareza.ultra_raro { background: #ff3d2e; color: #fff; }
.rareza.combiner { background: #8f5cff; color: #fff; }

/* Cuadros de diálogo: hoja inferior en móvil, centrados en pantallas grandes */
dialog { width: min(100vw, 560px); max-height: 92vh; padding: 0; border: 0; background: var(--panel); color: var(--texto); border-radius: 20px 20px 0 0; margin: auto auto 0; box-shadow: 0 -10px 50px #0009; overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #000a; backdrop-filter: blur(2px); }
@media (min-width: 640px) { dialog { margin: auto; border-radius: 20px; } }
.dlg-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 8px; flex: none; }
.dlg-cab h2 { font-size: 1.35rem; }
.dlg-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--panel2); font-size: 1.5rem; line-height: 1; cursor: pointer; flex: none; }
.dlg-cuerpo { padding: 6px 18px 20px; overflow-y: auto; display: grid; gap: 14px; }

#avisos { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.aviso { background: var(--panel2); border: 1px solid var(--linea); border-left: 5px solid var(--ok); padding: 12px 16px; border-radius: 10px; box-shadow: 0 8px 30px #0008; max-width: 480px; pointer-events: auto; }
.aviso.error { border-left-color: var(--mal); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
