/* Tienda BM Network — estilos
   Colores tomados del logo: azul diamante y oro sobre fondo nocturno. */
:root {
  --ground: #0A1020;
  --panel: #121A31;
  --panel-2: #18223F;
  --line: #1C2748;
  --line-2: #2A3964;
  --text: #EAF0FF;
  --soft: #C9D4F2;
  --muted: #9AA8CC;
  --dim: #56628A;
  --blue: #22B8FF;
  --blue-deep: #0B6FD8;
  --blue-ink: #06223A;
  --gold: #FFC61A;
  --gold-deep: #B07800;
  --gold-ink: #1A1204;
  --green: #4ADE80;
  --pink: #FF5FA2;
  --discord: #5865F2;
  --discord-deep: #3B45B8;
  --danger: #FF6B6B;
  --font-display: 'Bungee', 'Arial Black', Impact, sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --radius: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--ground);
  background-image:
    linear-gradient(rgba(34,184,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,184,255,0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--blue); }
a:hover { color: #7FD6FF; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 16px; }
.disp { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 800; color: #fff; }
.blue { color: var(--blue); }
.c-green { color: var(--green); } .c-blue { color: var(--blue); } .c-gold { color: var(--gold); } .c-pink { color: var(--pink); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 8px; }
.row .input { flex: 1; min-width: 0; }
.eyebrow { color: var(--gold); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.label { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.h2 { margin: 0; font-size: 26px; color: #fff; text-wrap: balance; }
.h2.big { font-size: 30px; margin-top: 4px; }

/* Botones con efecto de bloque */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border: 0; border-radius: 4px;
  font: 800 15px var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: none !important; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 34px; padding: 6px 16px; font-size: 14px; }
.btn-lg { min-height: 52px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 4px 0 var(--gold-deep); }
.btn-gold:hover { color: var(--gold-ink); }
.btn-blue { background: var(--blue); color: var(--blue-ink); box-shadow: 0 4px 0 var(--blue-deep); }
.btn-blue:hover { color: var(--blue-ink); }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 2px solid var(--line-2); box-shadow: 0 4px 0 #060A15; }
.btn-ghost:hover { color: #fff; }
.btn-dark { background: var(--gold-ink); color: var(--gold); box-shadow: 0 3px 0 #5C4300; }
.btn-dark:hover { color: var(--gold); }
.btn-discord { background: var(--discord); color: #fff; box-shadow: 0 4px 0 var(--discord-deep); }
.btn-discord:hover { color: #fff; }
.icon-btn { background: transparent; border: 0; color: var(--muted); cursor: pointer; width: 44px; height: 44px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { color: #fff; background: var(--panel-2); }

/* Anuncio y encabezado */
.announce { background: var(--gold); color: var(--gold-ink); padding: 10px 16px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; font-weight: 700; font-size: 15px; text-align: center; }
.header { position: sticky; top: 0; z-index: 30; background: rgba(10,16,32,.92); border-bottom: 2px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand img { height: 54px; width: auto; display: block; }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.nav a { color: var(--soft); text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 14px; border-radius: 4px; white-space: nowrap; }
.nav a:hover, .nav a.active { color: #fff; background: var(--panel-2); }
.header-actions { display: flex; gap: 10px; margin-left: auto; align-items: center; }
.count { background: var(--gold-ink); color: var(--gold); border-radius: 3px; padding: 0 7px; font-size: 13px; min-width: 22px; text-align: center; }
#user-label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Paneles */
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }

/* Hero */
.hero { padding-top: 32px; }
.banner { border-radius: var(--radius); overflow: hidden; border: 3px solid var(--line); box-shadow: 0 8px 0 #060A15; background: var(--panel); }
.banner img { display: block; width: 100%; aspect-ratio: 1237 / 541; object-fit: cover; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 20px; margin-top: 20px; }
.hero-copy { padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.hero-copy h1 { margin: 0; font-size: 40px; line-height: 1.08; color: #fff; text-wrap: balance; }
.hero-copy p { margin: 0; color: #B4C0E0; max-width: 60ch; }
.hero-side { display: grid; gap: 14px; }
.info-row { padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.info-text { flex: 1; min-width: 0; }
.ip { font-size: 20px; color: #fff; overflow-wrap: anywhere; }
.tile { width: 48px; height: 48px; border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tile-blue { background: var(--blue); box-shadow: inset 0 -5px 0 var(--blue-deep); }
.tile-discord { background: var(--discord); box-shadow: inset 0 -5px 0 var(--discord-deep); }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--green); margin-right: 6px; vertical-align: middle; }

/* Secciones */
.section { padding-top: 48px; }
.section > .h2 { margin-bottom: 18px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.cat-desc { color: var(--soft); max-width: 70ch; }
.cat-desc:empty { display: none; }
.cat-desc p { margin: 0 0 8px; }

/* Categorías */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cat {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s ease, border-color .15s ease;
}
.cat:hover { transform: translateY(-4px); border-color: var(--blue); }
.cat.active { border-color: var(--gold); box-shadow: 0 5px 0 #8A5E00; }
.cat-icon { width: 52px; height: 52px; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-name { font-family: var(--font-display); font-size: 18px; color: #fff; }
.cat-sub { color: var(--muted); font-size: 14px; }

/* Layout principal */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
.main-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; position: sticky; top: 96px; }

/* Paquetes */
.packages { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pkg {
  position: relative; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .15s ease, border-color .15s ease;
}
.pkg:hover { transform: translateY(-4px); border-color: var(--blue); }
.pkg.featured { background: #1A2446; border: 3px solid var(--gold); box-shadow: 0 6px 0 #8A5E00; }
.pkg.featured:hover { border-color: var(--gold); }
.pkg-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 3px; white-space: nowrap; }
.pkg-sale { position: absolute; top: 10px; right: 10px; background: var(--green); color: #052E16; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 3px; }
.pkg-art { height: 110px; border-radius: 4px; background: #16233F; border: 2px solid #203058; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pkg-art img { max-height: 100%; max-width: 100%; object-fit: contain; }
.pkg-art .disp { font-size: 26px; text-align: center; padding: 0 8px; line-height: 1.1; overflow-wrap: anywhere; }
.pkg-name { font-weight: 800; color: #fff; font-size: 17px; line-height: 1.3; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price .now { font-family: var(--font-display); font-size: 24px; color: #fff; font-variant-numeric: tabular-nums; }
.price .old { color: var(--danger); text-decoration: line-through; font-weight: 700; font-size: 15px; }
.price .per { color: var(--muted); font-size: 13px; }
.pkg-actions { display: flex; gap: 8px; margin-top: auto; }
.pkg-actions .btn { flex: 1; padding-inline: 10px; }
.pkg-actions .btn-ghost { flex: 0 0 auto; }
.empty { padding: 28px; text-align: center; color: var(--muted); grid-column: 1 / -1; }

/* Comparativa */
.compare { overflow: hidden; }
.compare-head { padding: 18px 20px; border-bottom: 2px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.compare-head h3 { margin: 0; font-size: 18px; color: #fff; }
.table-scroll { overflow-x: auto; }
.compare table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.compare th { background: #0F1630; color: var(--muted); padding: 12px; font-weight: 700; }
.compare th:first-child, .compare td:first-child { text-align: left; padding-left: 20px; }
.compare td { text-align: center; padding: 12px; border-top: 1px solid var(--line); }
.compare td.no { color: var(--dim); }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.step { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.num { width: 40px; height: 40px; border-radius: 4px; background: var(--blue); color: var(--blue-ink); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: inset 0 -4px 0 var(--blue-deep); }
.num-gold { background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 -4px 0 #D98A00; }
.step-title { font-weight: 800; color: #fff; font-size: 17px; }
.warning { background: #1A1A12; border: 2px solid #4A3F12; border-radius: var(--radius); padding: 16px 20px; display: flex; gap: 14px; align-items: flex-start; color: #E8DDB0; font-size: 14px; }
.warning svg { flex-shrink: 0; margin-top: 2px; }
.warning strong { color: var(--gold); }

/* Barra lateral */
.side-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.side-title { margin: 0; font-size: 16px; color: #fff; }
.who { display: flex; align-items: center; gap: 12px; }
.head { width: 44px; height: 44px; border-radius: 4px; border: 2px solid var(--line-2); image-rendering: pixelated; background: var(--panel-2); }
.head.gold { border-color: var(--gold); }
.field-label { font-size: 13px; font-weight: 700; color: var(--soft); }
.field-error { color: var(--danger); font-size: 13px; font-weight: 600; }
.input { background: var(--ground); border: 2px solid var(--line-2); border-radius: 4px; color: #fff; padding: 10px 12px; font: 600 15px var(--font-body); min-height: 44px; width: 100%; }
.input:focus { border-color: var(--blue); outline: none; }
.goal-bar { height: 18px; background: var(--ground); border: 2px solid var(--line-2); border-radius: 3px; overflow: hidden; }
.goal-fill { height: 100%; background: var(--gold); width: 0; transition: width .6s ease; }
.goal-fill.striped { background: repeating-linear-gradient(90deg, var(--gold) 0 10px, #F2A900 10px 12px); }
.heads { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px; }
.heads img { width: 100%; aspect-ratio: 1; border-radius: 3px; image-rendering: pixelated; background: var(--panel-2); display: block; }
.textbox-body { color: var(--soft); font-size: 14px; }
.textbox-body p { margin: 0 0 8px; }

/* Pie */
.footer { margin-top: 64px; background: #070B17; border-top: 2px solid var(--line); }
.foot { padding-block: 36px; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr); gap: 28px; }
.foot a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot a:hover { color: #fff; }
.foot p { margin: 0; max-width: 48ch; }
.foot-logo { height: 64px; width: auto; align-self: flex-start; }

/* Carrito */
.overlay { position: fixed; inset: 0; background: rgba(3,6,14,.7); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 50;
  background: var(--panel); border-left: 2px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .22s ease;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 2px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 20px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { padding: 16px 20px; border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 17px; }
.total-row .disp { font-size: 24px; color: var(--gold); font-variant-numeric: tabular-nums; }
.line { display: flex; gap: 12px; align-items: center; background: var(--panel-2); border: 2px solid var(--line-2); border-radius: 4px; padding: 12px; }
.line-info { flex: 1; min-width: 0; }
.line-name { font-weight: 800; color: #fff; }
.line-price { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: #13301F; color: var(--green); border-radius: 3px; padding: 4px 8px; font-size: 13px; font-weight: 700; }

/* Modal */
.modal-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(3,6,14,.75); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { position: relative; background: var(--panel); border: 2px solid var(--line-2); border-radius: var(--radius); width: min(620px, 100%); max-height: 88vh; overflow-y: auto; padding: 28px; box-shadow: 0 10px 0 #060A15; }
.modal-close { position: absolute; top: 10px; right: 10px; }
.modal h2 { margin: 0 0 6px; font-size: 26px; color: #fff; padding-right: 40px; }
.modal-desc { color: var(--soft); margin: 16px 0 20px; overflow-wrap: anywhere; }
.modal-desc img { max-width: 100%; height: auto; }
.modal-desc ul { padding-left: 20px; }

/* Aviso flotante */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; background: var(--panel-2); color: #fff; border: 2px solid var(--line-2); border-left: 6px solid var(--blue); border-radius: 4px; padding: 12px 18px; font-weight: 700; box-shadow: 0 6px 0 #060A15; max-width: calc(100% - 32px); }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--danger); }

/* Cargando */
.skeleton { background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--radius); border: 2px solid var(--line); }
.cat-skel { height: 150px; }
.pkg-skel { height: 300px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Responsivo */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0,1fr); }
  .side-col { position: static; }
  .nav { display: none; }
  .hero-grid { grid-template-columns: minmax(0,1fr); }
  .steps, .foot { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 560px) {
  .hero-copy h1 { font-size: 30px; }
  .brand img { height: 44px; }
  .header-inner { gap: 12px; }
  .hide-sm { display: none; }
  #user-label { max-width: 90px; }
  .cats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .cat { padding: 14px; }
  .cat-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
