/* ==========================================================================
   JustPlay Community · tema "buy menu"
   Base: menú de compra de CS 1.6 (verde oliva + ámbar de HUD). Rarezas: azul CT, púrpura, rojo T.
   Se carga después de nav.css (Bootstrap 5.3 compilado) y lo pisa con variables.
   ========================================================================== */

:root,
[data-bs-theme=dark] {
  --bg: #11140d;
  --bg-2: #171c11;
  --panel: #1e251a;
  --panel-2: #283120;
  --vgui: rgba(76, 88, 68, .46);      /* verde del menú VGUI de CS 1.6 */
  --vgui-line: #7f9070;
  --line: #3a4530;
  --line-soft: #2a3323;
  --text: #e9edda;
  --muted: #a1ac90;
  --amber: #ffb000;                   /* ámbar del HUD */
  --amber-hi: #ffc83d;
  --amber-lo: #b87f00;
  --ct: #3fa7ff;
  --t: #ff5a36;
  --ok: #8bf06b;
  --bad: #ff5c4d;

  --font-display: "Big Shoulders Stencil Display", "Arial Narrow", Impact, "DejaVu Sans Condensed", sans-serif;
  --font-body: "Chakra Petch", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;

  --cut: 12px;                         /* esquina cortada de paneles y botones */

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-body-font-family: var(--font-body);
  --bs-body-font-size: 1rem;
  --bs-secondary-color: var(--muted);
  --bs-secondary-bg: var(--panel);
  --bs-tertiary-bg: var(--panel-2);
  --bs-border-color: var(--line);
  --bs-border-color-translucent: rgba(127, 144, 112, .25);
  --bs-link-color: var(--amber);
  --bs-link-hover-color: var(--amber-hi);
  --bs-link-color-rgb: 255, 176, 0;
  --bs-link-hover-color-rgb: 255, 200, 61;
  --bs-primary: var(--amber);
  --bs-primary-rgb: 255, 176, 0;
  --bs-emphasis-color: #fff;
  --bs-heading-color: var(--text);
  --bs-border-radius: 2px;
  --bs-border-radius-sm: 2px;
  --bs-border-radius-lg: 4px;
  --bs-focus-ring-color: rgba(255, 176, 0, .35);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(1200px 520px at 78% -8%, rgba(255, 176, 0, .09), transparent 60%),
    radial-gradient(900px 600px at -10% 18%, rgba(76, 88, 68, .28), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
  background-attachment: fixed;
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Retícula de mapa, apenas visible */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(127, 144, 112, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 144, 112, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(#000 0, transparent 70%);
          mask-image: linear-gradient(#000 0, transparent 70%);
}

main { flex: 1 0 auto; padding-bottom: 4rem; }

::selection { background: var(--amber); color: #11140d; }

a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.ic {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.18em;
}

.visually-hidden-focusable:focus { z-index: 2000; }

/* ---------- Tipografía ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--text);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.45rem; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; }

.text-muted, .text-body-secondary { color: var(--muted) !important; }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(17, 20, 13, .86);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header::after {            /* filo ámbar bajo la barra */
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 140px; height: 2px;
  background: var(--amber);
}
.site-nav { padding: .6rem 0; }
.site-nav .container { gap: 1rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark { width: 34px; height: 34px; color: var(--amber); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: .9; }
.brand-text b {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.brand-text i {
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .34em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: .2rem;
}

.site-nav .nav-link {
  color: var(--muted);
  font-weight: 500;
  padding: .5rem .85rem;
  position: relative;
}
.site-nav .nav-link:hover { color: var(--text); text-decoration: none; }
.site-nav .nav-link.active { color: var(--amber); }
.nav-link-admin { color: var(--ct) !important; }

.nav-toggle {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.3rem;
}
.nav-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

@media (max-width: 991.98px) {
  .site-nav .navbar-collapse { padding: 1rem 0 .4rem; }
  .nav-actions { margin-top: .75rem; padding-top: .9rem; border-top: 1px solid var(--line-soft); }
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .32rem .75rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 .82rem/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.server-pill:hover { border-color: var(--vgui-line); color: var(--text); }
.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
[data-state=online] > .dot, [data-state=online] .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(139, 240, 107, .6); animation: ping 2.4s ease-out infinite; }
[data-state=offline] > .dot, [data-state=offline] .dot { background: var(--bad); }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(139, 240, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 240, 107, 0); } }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px; height: 38px;
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 1.15rem;
}
.icon-btn:hover { border-color: var(--amber); color: var(--amber); text-decoration: none; }
.count-badge {
  position: absolute;
  top: -7px; right: -7px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  display: grid; place-items: center;
  background: var(--amber);
  color: #11140d;
  font: 700 .7rem/1 var(--font-body);
}

.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu-list {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  z-index: 20;
  min-width: 15rem;
  margin: 0; padding: .4rem;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--vgui-line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
.user-menu-list a, .user-menu-list button {
  display: flex; align-items: center; gap: .6rem;
  width: 100%;
  padding: .55rem .7rem;
  background: none; border: 0;
  color: var(--text);
  font: inherit;
  text-align: left;
}
.user-menu-list a:hover, .user-menu-list button:hover { background: var(--panel-2); color: var(--amber); text-decoration: none; }
.user-menu-list .sep { height: 1px; margin: .35rem 0; background: var(--line-soft); }
@media (max-width: 991.98px) { .user-menu-list { position: static; margin-top: .5rem; box-shadow: none; } .user-menu { width: 100%; } }

/* ---------- Botones ---------- */
.btn {
  --bs-btn-border-radius: 0;
  --bs-btn-font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background-color .15s, color .15s, border-color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }

.btn-hud {
  --bs-btn-color: #11140d;
  --bs-btn-bg: var(--amber);
  --bs-btn-border-color: var(--amber);
  --bs-btn-hover-color: #11140d;
  --bs-btn-hover-bg: var(--amber-hi);
  --bs-btn-hover-border-color: var(--amber-hi);
  --bs-btn-active-color: #11140d;
  --bs-btn-active-bg: var(--amber-lo);
  --bs-btn-active-border-color: var(--amber-lo);
  --bs-btn-disabled-color: #11140d;
  --bs-btn-disabled-bg: #6d5a22;
  --bs-btn-disabled-border-color: #6d5a22;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  border-width: 0;
  padding-inline: 1.15rem;
}
.btn-hud.btn-sm { clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px)); padding-inline: .9rem; }
.btn-hud.btn-lg { padding: .85rem 1.7rem; font-size: 1.08rem; }

.btn-ghost {
  --bs-btn-color: var(--text);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-color: var(--amber);
  --bs-btn-hover-bg: rgba(255, 176, 0, .07);
  --bs-btn-hover-border-color: var(--amber);
  --bs-btn-active-color: var(--amber);
  --bs-btn-active-bg: rgba(255, 176, 0, .12);
  --bs-btn-active-border-color: var(--amber);
}
.btn-danger-ghost {
  --bs-btn-color: var(--bad);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: rgba(255, 92, 77, .45);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--bad);
  --bs-btn-hover-border-color: var(--bad);
}
.btn-ok {
  --bs-btn-color: #0e1a08;
  --bs-btn-bg: var(--ok);
  --bs-btn-border-color: var(--ok);
  --bs-btn-hover-color: #0e1a08;
  --bs-btn-hover-bg: #a6f58c;
  --bs-btn-hover-border-color: #a6f58c;
}

/* ---------- Formularios ---------- */
.form-control, .form-select {
  background-color: rgba(8, 10, 6, .55);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  padding: .65rem .8rem;
}
.form-control::placeholder { color: #6f7a60; }
.form-control:focus, .form-select:focus {
  background-color: rgba(8, 10, 6, .8);
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 176, 0, .18);
  color: var(--text);
}
.form-control:disabled, .form-control[readonly] { background-color: rgba(8, 10, 6, .35); color: var(--muted); }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--text); }
.form-text { color: var(--muted); }
.form-check-input { background-color: rgba(8, 10, 6, .6); border-color: var(--vgui-line); border-radius: 0; }
.form-check-input:checked { background-color: var(--amber); border-color: var(--amber); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(255, 176, 0, .2); border-color: var(--amber); }
.invalid-feedback, .field-error { color: var(--bad); font-size: .87rem; }
.is-invalid { border-color: var(--bad) !important; }
.input-group-text { background: var(--panel); border-color: var(--line); color: var(--muted); border-radius: 0; }

/* ---------- Avisos ---------- */
.notices { padding-top: 1rem; display: grid; gap: .6rem; }
.notice {
  display: flex; align-items: center; gap: .7rem;
  padding: .75rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left-width: 4px;
}
.notice > .ic { font-size: 1.2rem; }
.notice-ok { border-left-color: var(--ok); } .notice-ok > .ic { color: var(--ok); }
.notice-info { border-left-color: var(--ct); } .notice-info > .ic { color: var(--ct); }
.notice-error { border-left-color: var(--bad); } .notice-error > .ic { color: var(--bad); }
.notice span { flex: 1; }
.notice-close { background: none; border: 0; color: var(--muted); padding: .2rem; }
.notice-close:hover { color: var(--text); }

/* ---------- Paneles ---------- */
.hud {
  position: relative;
  background: linear-gradient(180deg, rgba(40, 49, 32, .78), rgba(30, 37, 26, .78));
  border: 1px solid var(--line);
}
.hud::before, .hud::after {      /* corchetes de mira en dos esquinas */
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--amber);
  pointer-events: none;
}
.hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.35rem;
}
.panel-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.badge { border-radius: 0; font-weight: 600; letter-spacing: .02em; }
.status {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .22rem .6rem;
  font-size: .82rem; font-weight: 600;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.status-pending { color: var(--amber); background: rgba(255, 176, 0, .08); }
.status-paid { color: var(--ok); background: rgba(139, 240, 107, .08); }
.status-cancelled { color: var(--bad); background: rgba(255, 92, 77, .08); }
.status-muted { color: var(--muted); }

/* ---------- Cabecera de página ---------- */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem;
  padding: 2.6rem 0 1.6rem;
}
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0; }
.page-head p { margin: .5rem 0 0; color: var(--muted); max-width: 52ch; }
.page-head > div { min-width: 0; }
.page-head h1, .page-head p { overflow-wrap: anywhere; }
.crumbs { display: flex; gap: .4rem; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--amber); }

/* ---------- Portada ---------- */
.hero { padding: 3.2rem 0 1.6rem; }
.hero-grid { display: grid; gap: 2.4rem; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; }
.hero h1 { font-size: clamp(3rem, 8.4vw, 6.6rem); font-weight: 900; margin: 0 0 1.2rem; }
.hero h1 .hl { color: var(--amber); }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin-bottom: 1.8rem; }
.hero-lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (max-width: 991.98px) { .hero { padding-top: 2rem; } .hero-grid { grid-template-columns: 1fr; } }

/* Tarjeta del estado del servidor */
.server-card { padding: 1.3rem 1.4rem 1.2rem; }
.server-card-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); margin-bottom: .9rem; }
.status-badge { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .88rem; color: var(--muted); }
.server-name { font-size: 1.7rem; margin: 0 0 1rem; line-height: 1.05; overflow-wrap: anywhere; }
.server-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0 0 1rem; }
.server-facts dt { font-size: .8rem; color: var(--muted); font-weight: 500; }
.server-facts dd { margin: 0; font-size: 1.15rem; font-weight: 600; }
.server-facts b { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; color: var(--amber); line-height: 1; }
.server-facts dd span { color: var(--muted); font-weight: 500; }
.slots { display: flex; gap: 3px; height: 14px; margin-bottom: 1rem; }
.slots i { flex: 1; min-width: 2px; background: var(--line-soft); transform: skewX(-20deg); }
.slots i.on { background: var(--amber); }
.server-connect { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .9rem; border-top: 1px dashed var(--line); }
.server-connect[hidden] { display: none; }
.server-connect code { font-family: var(--font-mono); color: var(--text); font-size: .95rem; overflow-wrap: anywhere; }

/* Menú de compra */
.buymenu {
  margin-top: 2.4rem;
  background: var(--vgui);
  border: 1px solid var(--vgui-line);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.buymenu-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.3rem;
  color: var(--amber);
  font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid var(--vgui-line);
}
.buymenu-head small { font: 500 .85rem var(--font-body); letter-spacing: 0; text-transform: none; color: #cdd6bd; }
.buymenu-list { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.buymenu-list > li { display: flex; } /* para que la raya divisoria llegue hasta abajo aunque una descripción ocupe más líneas */
.buymenu-item {
  flex: 1;
  display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; align-items: center;
  padding: 1.2rem 1.1rem;
  color: var(--text);
  border-right: 1px solid var(--vgui-line);
  transition: background-color .15s;
}
.buymenu-list li:last-child .buymenu-item { border-right: 0; }
.buymenu-item:hover { background: rgba(255, 176, 0, .1); text-decoration: none; color: var(--text); }
.buymenu-item .key {
  grid-row: span 2;
  display: grid; place-items: center;
  width: 3rem; height: 3rem;
  background: var(--amber); color: #11140d;
  font-family: var(--font-display); font-weight: 900; font-size: 2rem; line-height: 1;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.buymenu-item .name { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; text-transform: uppercase; line-height: 1; align-self: end; color: var(--amber); }
.buymenu-item .desc { font-size: .92rem; color: #cdd6bd; align-self: start; }
@media (max-width: 991.98px) {
  .buymenu-list { grid-template-columns: repeat(2, 1fr); }
  .buymenu-list li:nth-child(even) .buymenu-item { border-right: 0; }
  .buymenu-list li:nth-child(-n+2) .buymenu-item { border-bottom: 1px solid var(--vgui-line); }
}
@media (max-width: 767.98px) {
  .buymenu-list { grid-template-columns: 1fr; }
  .buymenu-item { border-right: 0; border-bottom: 1px solid var(--vgui-line); padding: 1rem; }
  .buymenu-list li:last-child .buymenu-item { border-bottom: 0; }
  .buymenu-head small { display: none; }
}

/* Secciones y pasos */
.section { padding-top: 3.8rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: .4rem 0 0; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.step { position: relative; padding: 1.5rem 1.4rem 1.4rem; background: var(--panel); border: 1px solid var(--line); counter-increment: step; }
.step::before {
  content: counter(step);
  position: absolute; top: -1px; right: -1px;
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; color: var(--amber);
}
.step .ic { font-size: 1.7rem; color: var(--amber); margin-bottom: .8rem; display: block; }
.step h3 { font-size: 1.5rem; margin-bottom: .4rem; }
.step p { margin: 0; color: var(--muted); }
.step code, .inline-code { font-family: var(--font-mono); background: rgba(0, 0, 0, .35); border: 1px solid var(--line); padding: .05rem .4rem; color: var(--amber); font-size: .92em; }
@media (max-width: 767.98px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Catálogo ---------- */
.shop-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.cat-tab {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}
.cat-tab:hover { color: var(--text); border-color: var(--vgui-line); text-decoration: none; }
.cat-tab.active { background: var(--amber); border-color: var(--amber); color: #11140d; }
.cat-tab kbd {
  font: 700 .72rem var(--font-mono);
  padding: 0 .35rem; line-height: 1.4;
  background: rgba(0, 0, 0, .3); color: inherit; border-radius: 0;
}
/* Filtro por arma dentro de la categoría Skins */
.weapon-filter { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin: -.6rem 0 1.6rem; }
.weapon-filter label { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-weight: 600; }
.weapon-filter .form-select { width: auto; min-width: 14rem; }
.search { display: flex; min-width: min(100%, 22rem); }
.search .form-control { border-right: 0; }
.search .btn { border-radius: 0; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.4rem; }

.empty {
  text-align: center;
  padding: 3.5rem 1rem;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.empty .ic { font-size: 2.4rem; color: var(--line); margin-bottom: .8rem; display: block; margin-inline: auto; }
.empty h3 { color: var(--text); }

/* ---------- Detalle de producto ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 2.4rem; padding-top: 1rem; }
.detail-art {
  position: relative;
  aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 24%, transparent), transparent 62%), var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
}
.detail-art img { width: 100%; height: 100%; object-fit: cover; }
.detail-art .art-icon { width: 38%; height: 38%; color: var(--rc); opacity: .9; }
.detail-art::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--rc); box-shadow: 0 0 24px 2px var(--rc); }
.detail-info h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: .3rem 0 .6rem; }
.detail-tagline { font-size: 1.15rem; color: var(--muted); margin-bottom: 1.4rem; }
.detail-price { font-family: var(--font-display); font-weight: 900; font-size: 3.4rem; line-height: 1; color: var(--amber); }
.detail-price small { font: 500 .9rem var(--font-body); color: var(--muted); margin-left: .5rem; }
.facts { display: grid; gap: 0; margin: 1.6rem 0; border-top: 1px solid var(--line-soft); }
.facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.detail-desc { color: #d3dac2; white-space: pre-line; max-width: 60ch; }
.owned-note { display: flex; gap: .8rem; padding: 1rem 1.1rem; margin-bottom: 1.2rem; background: rgba(139, 240, 107, .07); border: 1px solid rgba(139, 240, 107, .4); }
.owned-note .ic { color: var(--ok); font-size: 1.3rem; margin-top: .15rem; }
.owned-note p { margin: 0; }
@media (max-width: 991.98px) { .detail { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------- Carrito / checkout ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.6rem; align-items: start; }
.cart-lines { display: grid; gap: 1rem; }
.cart-line {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 1.1rem; align-items: center;
  padding: 1rem; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--rc, var(--line));
}
.cart-line.is-blocked { opacity: .9; border-left-color: var(--bad); }
.cart-thumb { width: 96px; height: 72px; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .ic { font-size: 1.8rem; color: var(--rc, var(--muted)); }
.cart-line h3 { font-size: 1.35rem; margin: 0 0 .15rem; }
.cart-line h3 a { color: var(--text); }
.cart-line .meta { color: var(--muted); font-size: .9rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.cart-line .blocked { color: var(--bad); font-size: .9rem; margin-top: .3rem; display: flex; gap: .4rem; align-items: center; }
.cart-line .line-price { font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; color: var(--amber); text-align: right; }
.summary { position: sticky; top: 92px; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 0 1.2rem; }
.summary-total span:last-child { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; color: var(--amber); line-height: 1; }
.delivery-target { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; margin-bottom: 1.1rem; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.delivery-target .ic { font-size: 1.4rem; color: var(--ct); }
.delivery-target small { display: block; color: var(--muted); font-size: .8rem; }
.delivery-target b { font-family: var(--font-mono); font-weight: 600; overflow-wrap: anywhere; }
.delivery-target.warn .ic { color: var(--amber); }
@media (max-width: 991.98px) { .cart-layout { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 575.98px) {
  .cart-line { grid-template-columns: 72px minmax(0, 1fr); }
  .cart-thumb { width: 72px; height: 56px; }
  .cart-line .line-price { grid-column: 1 / -1; text-align: left; }
}

/* ---------- Vinculación de SteamID ---------- */
.link-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 1.6rem; align-items: start; }
.link-state { display: flex; gap: 1rem; align-items: center; padding: 1.2rem 1.3rem; margin-bottom: 1.4rem; }
.link-state .ic { font-size: 1.9rem; flex: none; }
.link-state b { display: block; font-size: 1.05rem; }
.link-state .sid { font-family: var(--font-mono); overflow-wrap: anywhere; color: var(--text); }
.link-state.ok { border-color: rgba(139, 240, 107, .5); } .link-state.ok .ic { color: var(--ok); }
.link-state.warn { border-color: rgba(255, 176, 0, .5); } .link-state.warn .ic { color: var(--amber); }
.link-state.none .ic { color: var(--muted); }
.code-box { text-align: center; padding: 1.8rem 1rem 1.5rem; margin: 1rem 0; background: rgba(0, 0, 0, .35); border: 1px dashed var(--amber); }
.code-box .code { font-family: var(--font-mono); font-weight: 700; font-size: clamp(2rem, 7vw, 3.2rem); letter-spacing: .12em; color: var(--amber); line-height: 1.1; }
.code-box .ttl { margin-top: .6rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.code-box .btn { margin-top: 1rem; }
.chat {
  font-family: var(--font-mono); font-size: .92rem; line-height: 1.7;
  background: #0a0c07; border: 1px solid var(--line); padding: 1rem 1.1rem; overflow-x: auto;
}
.chat .sys { color: #7e8a6e; }
.chat .you { color: var(--ct); }
.chat .cmd { color: var(--amber); }
.chat .ok { color: var(--ok); }
.chat .caret { display: inline-block; width: .55em; height: 1em; background: var(--amber); vertical-align: -.12em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.how-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; color: var(--muted); }
.how-list li::marker { color: var(--amber); font-weight: 700; }
.how-list b { color: var(--text); }
.divider-or { display: flex; align-items: center; gap: .8rem; margin: 1.5rem 0; color: var(--muted); font-size: .88rem; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
@media (max-width: 991.98px) { .link-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pedidos ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--line-soft); --bs-table-hover-bg: rgba(255, 176, 0, .05); --bs-table-hover-color: var(--text); --bs-table-striped-bg: rgba(255, 255, 255, .02); }
.table > :not(caption) > * > * { padding: .85rem .8rem; vertical-align: middle; }
.table thead th {
  font-weight: 600; font-size: .85rem; color: var(--muted);
  border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .22); white-space: nowrap;
}
.table-wrap { border: 1px solid var(--line); background: var(--panel); overflow-x: auto; }
.table-wrap .table { margin: 0; }
.order-no { font-family: var(--font-mono); color: var(--amber); font-weight: 600; }

.track { display: flex; align-items: center; gap: 0; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.track li { flex: 1; display: flex; align-items: center; gap: .6rem; color: var(--muted); font-weight: 600; position: relative; }
.track li::before { content: ""; width: 1.7rem; height: 1.7rem; flex: none; display: grid; place-items: center; border: 2px solid var(--line); background: var(--bg-2); }
.track li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line); margin-inline: .6rem; }
.track li.done { color: var(--text); }
.track li.done::before { content: "✓"; border-color: var(--ok); background: var(--ok); color: #0e1a08; font-size: .9rem; }
.track li.done:not(:last-child)::after { background: var(--ok); }
.track li.current::before { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 176, 0, .18); }
.track li.current { color: var(--amber); }
.track li.bad::before { content: "✕"; border-color: var(--bad); background: var(--bad); color: #fff; font-size: .9rem; }
.track li.bad { color: var(--bad); }
@media (max-width: 575.98px) { .track li span { display: none; } .track li.current span, .track li.bad span { display: inline; } }

.order-item { display: flex; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
.order-item:last-child { border-bottom: 0; }
.order-item .ic { font-size: 1.5rem; color: var(--muted); }
.order-item .grow { flex: 1; min-width: 0; }
.order-item .name { font-weight: 600; }
.order-item .sub { color: var(--muted); font-size: .88rem; }

/* ---------- Inventario ---------- */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; }
.inv-item { padding: 1.1rem 1.2rem 1.2rem; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--rc, var(--line)); }
.inv-art { aspect-ratio: 16 / 7; margin: -1.1rem -1.2rem .95rem; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--rc, #9aa58a) 25%, transparent), transparent 70%), #151a10; }
.inv-art img { width: 100%; height: 100%; object-fit: cover; }
.inv-art .ic { width: 2.4rem; height: 2.4rem; color: var(--rc, var(--muted)); }
.inv-item.queued .inv-art { filter: grayscale(.6); }
.inv-item header { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; margin-bottom: .8rem; }
.inv-item h3 { font-size: 1.4rem; margin: 0; line-height: 1.05; }
.inv-item .kind { color: var(--muted); font-size: .85rem; display: flex; gap: .4rem; align-items: center; }
.meter { height: 8px; background: var(--line-soft); transform: skewX(-20deg); margin: .6rem 0 .45rem; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--rc, var(--amber)); }
.inv-item .left { display: flex; justify-content: space-between; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.inv-item.queued { opacity: .75; border-top-style: dashed; }

/* ---------- Acceso / registro ---------- */
.auth { display: grid; place-items: center; padding: 3rem 0 1rem; }
.auth-card { width: min(100%, 460px); padding: 2rem 1.9rem; }
.auth-card h1 { font-size: 2.6rem; margin-bottom: .4rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.6rem; }
.auth-foot { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line-soft); color: var(--muted); text-align: center; }

/* ---------- Pantalla de error ---------- */
.error-screen { text-align: center; padding: 5rem 0 3rem; }
.error-code { font-family: var(--font-display); font-weight: 900; font-size: clamp(7rem, 24vw, 15rem); line-height: .85; color: transparent; -webkit-text-stroke: 2px var(--amber); letter-spacing: .02em; }
.error-screen h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 1rem 0 .6rem; }
.error-screen p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.6rem; }

/* ---------- Pago simulado ---------- */
.pay-sim { width: min(100%, 560px); margin: 3rem auto; padding: 2rem; }

/* ---------- Pie ---------- */
.site-footer { margin-top: 2rem; padding: 2.4rem 0 1.6rem; border-top: 1px solid var(--line-soft); background: rgba(0, 0, 0, .25); }
.footer-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; text-transform: uppercase; letter-spacing: .03em; }
.footer-note { color: var(--muted); max-width: 40ch; margin: .3rem 0 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--amber); }
.footer-legal { margin: 2rem 0 0; font-size: .8rem; color: #7e8a6e; max-width: 80ch; }

/* ---------- Paginación ---------- */
.pagination { --bs-pagination-bg: transparent; --bs-pagination-border-color: var(--line); --bs-pagination-color: var(--muted); --bs-pagination-hover-bg: var(--panel-2); --bs-pagination-hover-color: var(--amber); --bs-pagination-hover-border-color: var(--vgui-line); --bs-pagination-active-bg: var(--amber); --bs-pagination-active-color: #11140d; --bs-pagination-active-border-color: var(--amber); --bs-pagination-disabled-bg: transparent; --bs-pagination-disabled-border-color: var(--line-soft); --bs-pagination-focus-bg: var(--panel-2); --bs-pagination-focus-color: var(--amber); --bs-pagination-border-radius: 0; }
.page-link { border-radius: 0 !important; font-weight: 600; }

/* ---------- Panel de administración ---------- */
.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.8rem; padding-top: 2rem; align-items: start; }
.admin-sidebar { position: sticky; top: 92px; padding: .6rem; }
.admin-sidebar .group { padding: .7rem .8rem .35rem; font-size: .78rem; color: var(--muted); font-weight: 600; }
.admin-sidebar a { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; color: var(--text); font-weight: 500; border-left: 3px solid transparent; }
.admin-sidebar a:hover { background: var(--panel-2); text-decoration: none; color: var(--amber); }
.admin-sidebar a.active { background: var(--panel-2); border-left-color: var(--amber); color: var(--amber); }
.admin-sidebar hr { border-color: var(--line-soft); opacity: 1; margin: .5rem 0; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.admin-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.8rem; }
@media (max-width: 575.98px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 1.1rem 1.2rem; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--sc, var(--line)); }
.stat .label { color: var(--muted); font-size: .86rem; display: flex; align-items: center; gap: .45rem; }
.stat .value { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.05; margin-top: .2rem; white-space: nowrap; }
.stat.amber { --sc: var(--amber); } .stat.amber .value { color: var(--amber); }
.stat.ok { --sc: var(--ok); } .stat.ok .value { color: var(--ok); }
.stat.ct { --sc: var(--ct); } .stat.ct .value { color: var(--ct); }
.stat.t { --sc: var(--t); } .stat.t .value { color: var(--t); }
.admin-thumb { width: 56px; height: 42px; object-fit: cover; background: var(--bg-2); }
.admin-table-actions { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: nowrap; }
.form-section { margin-bottom: 1.4rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 767.98px) { .form-grid { grid-template-columns: 1fr; } }
.rarity-pick { display: flex; gap: .5rem; flex-wrap: wrap; }
.rarity-pick label { cursor: pointer; }
.rarity-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rarity-pick span { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--line); font-weight: 600; color: var(--muted); }
.rarity-pick input:checked + span { color: #11140d; background: var(--rc); border-color: var(--rc); }
.rarity-pick input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.preview-img { max-width: 220px; border: 1px solid var(--line); background: var(--bg-2); display: block; margin-bottom: .6rem; }
@media (max-width: 991.98px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar { position: static; display: flex; overflow-x: auto; padding: .3rem; }
  .admin-sidebar .group, .admin-sidebar hr { display: none; }
  .admin-sidebar a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .admin-sidebar a.active { border-bottom-color: var(--amber); }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Avatar ---------- */
.avatar {
  width: 72px; height: 72px;
  object-fit: cover;
  display: grid; place-items: center;
  background: var(--panel-2);
  border: 2px solid var(--amber);
  color: var(--muted);
  font-size: 1.8rem;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

/* Selects: espacio a la derecha para la flecha (el padding general lo pisaba) */
.form-select { padding-right: 2.4rem; }
.form-select-sm { padding: .3rem 2rem .3rem .6rem; font-size: .9rem; }
