:root {
  --bg: #0f0724; --panel: #17142b; --panel2: #1e1a38; --card: #221e3d; --line: rgba(255,255,255,.08);
  --text: #ece9ff; --soft: #a79fd0; --gold: #ffc933; --purple: #8b5cf6; --purple2: #5b2fc9;
  --green: #3fa55a; --green2: #2f8a47; --blue: #5b8fe0; --err: #f87171; --r: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 Poppins, system-ui, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.mono { font-weight: 700; letter-spacing: .3px; }

/* fondo */
.bg { position: fixed; inset: 0; z-index: -2; background:
  radial-gradient(900px 500px at 15% 0%, #5b2fc966, transparent 60%),
  radial-gradient(800px 500px at 90% 10%, #c026d355, transparent 60%),
  radial-gradient(900px 700px at 50% 100%, #3b1c8c66, transparent 60%), #150a33; background-size: cover; background-position: center; }
.bg.img::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(6px); background: rgba(15,7,36,.72); }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

/* barra superior */
.topbar { position: sticky; top: 12px; z-index: 30; padding: 0 16px; }
.pill { max-width: 1080px; margin: 12px auto 0; display: flex; align-items: center; gap: 22px; padding: 8px 12px 8px 20px; border-radius: 16px;
  background: linear-gradient(90deg, #4c25b0, #7a3fe0 60%, #6a35cf); border: 1px solid #ffffff2a; box-shadow: 0 8px 30px #0008; }
.mini-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; text-transform: uppercase; color: var(--gold); letter-spacing: .5px; white-space: nowrap; }
.mini-logo img { height: 34px; }
.gem { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--gold), #ff8a00); color: #3b1c8c; }
.links { display: flex; gap: 22px; flex: 1; }
.links a { text-decoration: none; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; opacity: .92; }
.links a:hover { color: var(--gold); }
.who { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.who-text { text-align: right; line-height: 1.15; }
.who-text small { display: block; font-weight: 800; font-size: .7rem; letter-spacing: .6px; }
.who-text em { font-style: normal; font-size: .62rem; opacity: .75; }
.who img { border-radius: 8px; image-rendering: pixelated; background: #0006; }
.btn-nick { background: #ffffff26; border: 1px solid #ffffff33; border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: .78rem; white-space: nowrap; }
.btn-nick:hover { background: #ffffff3d; }
.btn-nick b { color: var(--gold); }
.btn-cart { position: relative; background: #0003; border: 1px solid #ffffff33; border-radius: 10px; padding: 7px 12px; font-size: 1rem; }
.btn-cart span { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--gold); color: #2b1466; font-size: .7rem; font-weight: 800; display: grid; place-items: center; }

/* cabecera de marca */
.brand-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 26px 0 18px; }
.brand { text-align: center; }
.brand img { max-height: 140px; max-width: 100%; }
.brand h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 4.4rem); font-weight: 800; text-transform: uppercase; line-height: 1;
  color: #ffd84d; letter-spacing: 1px; text-shadow: 0 4px 0 #b3400a, 0 8px 0 #5a1d05, 0 0 40px #ff8a0088; -webkit-text-stroke: 1px #7a2a06; }
.brand h1 span { display: block; font-size: .55em; color: #ff7a3d; text-shadow: 0 3px 0 #5a1d05; }
.side-info { display: grid; gap: 2px; justify-items: start; background: none; border: 0; padding: 0; text-align: left; text-decoration: none; }
.side-info.right { justify-items: end; text-align: right; }
.side-info small { color: var(--gold); font-weight: 800; font-size: .72rem; letter-spacing: 1px; }
.side-info .mono { font-size: .85rem; text-transform: uppercase; }
.side-info .hint { color: var(--soft); font-size: .7rem; }
.side-info:hover .mono { color: var(--gold); }

/* layout */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; padding-top: 6px; }
.sidebar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; position: sticky; top: 92px; }
.sidebar h3 { margin: 0; padding: 16px; text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: 1px; color: var(--gold); border-bottom: 1px solid var(--line); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.cat { --h: 265; display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 14px 0 0; height: 62px; border: 0; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, hsl(var(--h) 60% 25% / .55), transparent 60%), var(--panel); text-align: left; font-weight: 700; font-size: .85rem; }
.cat:hover { background: linear-gradient(90deg, hsl(var(--h) 70% 32% / .75), transparent 70%), var(--panel2); }
.cat.on { background: linear-gradient(90deg, hsl(var(--h) 70% 35% / .9), #3b3210 90%); color: var(--gold); box-shadow: inset 0 0 0 1px #ffc93355; }
.cat .ico { flex: none; width: 70px; height: 100%; display: grid; place-items: center; font-size: 1.9rem; background: radial-gradient(circle at 50% 50%, hsl(var(--h) 90% 60% / .55), transparent 70%); filter: drop-shadow(0 2px 6px #000a); }
.cat .ico img { max-width: 44px; max-height: 44px; image-rendering: pixelated; }
.cat .nm { flex: 1; text-align: center; }
.cat .chev { opacity: .6; transition: transform .2s; font-size: .8rem; }
.cat.open .chev { transform: rotate(180deg); }
.sub { background: #110d22; }
.sub .cat { height: 46px; padding-left: 18px; font-size: .8rem; background: none; border-bottom-color: #ffffff0d; }
.sub .cat .ico { width: 40px; font-size: 1.2rem; background: none; }
.sub .cat.on { background: #ffc93318; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; min-height: 420px; outline: none; }
.p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.p-head small { display: block; color: var(--gold); font-weight: 800; font-size: .66rem; letter-spacing: 1px; }
.p-head h2 { margin: 2px 0 0; font-size: 1.05rem; font-weight: 700; text-transform: uppercase; }
.goal { min-width: 260px; flex: 1; max-width: 360px; padding: 10px 14px; border-radius: 8px; background: linear-gradient(90deg, #3b2a86, #24184f); border: 1px solid #ffffff1c; }
.goal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.goal small { color: var(--soft); font-size: .62rem; letter-spacing: .8px; }
.goal .txt { font-size: .74rem; font-weight: 600; }
.goal .pct { font-size: 1.5rem; font-weight: 800; }
.bar { height: 5px; border-radius: 9px; background: #ffffff1c; margin-top: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #ff8a00); transition: width 1.1s ease; }

.intro { display: grid; grid-template-columns: 1fr 240px; gap: 20px; align-items: center; }
.tag { display: inline-block; background: var(--blue); color: #fff; font-weight: 600; font-size: .95rem; padding: 6px 16px; margin: 20px 0 10px; }
.tag.first { margin-top: 0; }
.blk p { margin: 0 0 6px; color: #c9c3e6; font-size: .86rem; white-space: pre-line; max-width: 62ch; }
h3.gold { color: var(--gold); font-size: 1.2rem; font-weight: 600; margin: 34px 0 0; padding-bottom: 6px; border-bottom: 3px solid var(--blue); display: inline-block; }
.planet { width: 100%; max-width: 240px; justify-self: center; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.support { margin-top: 28px; color: var(--soft); font-size: .82rem; }

.cat-desc { text-align: center; color: #b79cff; background: #120e26; border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 22px; font-size: .82rem; white-space: pre-line; }
.sec-title { margin: 26px 0 12px; font-size: .95rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.pcard { --c: #8b5cf6; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 26px 14px 14px; cursor: pointer; transition: transform .15s, border-color .15s; }
.pcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 70%, transparent); }
.pcard .flag { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #3a2a00; font-weight: 800; font-size: .58rem; letter-spacing: .5px; padding: 2px 12px 3px; border-radius: 0 0 6px 6px; white-space: nowrap; }
.pcard .bonus { position: absolute; top: 10px; right: 10px; background: var(--gold); color: #3a2a00; font-weight: 800; font-size: .72rem; line-height: 1.1; padding: 5px 7px; border-radius: 6px; transform: rotate(6deg); text-align: center; }
.pcard .bonus small { display: block; font-size: .5rem; }
.pimg { width: 110px; height: 110px; display: grid; place-items: center; font-size: 3.6rem; margin-bottom: 4px; background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent), transparent 68%); filter: drop-shadow(0 6px 10px #000a); }
.pimg img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.pname { font-weight: 700; font-size: .78rem; text-transform: uppercase; }
.pprice { color: var(--gold); font-weight: 700; font-size: .74rem; margin-bottom: 8px; }
.pprice s { color: var(--soft); font-weight: 500; margin-right: 6px; }
.buy-btn { border: 0; background: var(--green); color: #fff; font-weight: 700; font-size: .78rem; padding: 9px 12px; border-radius: 4px; width: 100%; box-shadow: inset 0 -3px 0 #0003; }
.buy-btn:hover { background: #4bbd69; }
.buy-btn.wide { width: 100%; }
.buy-btn.big { padding: 14px; font-size: .95rem; }
.buy-btn:disabled { opacity: .5; cursor: wait; }
.empty { text-align: center; color: var(--soft); padding: 60px 0; }

/* banda inferior */
.band { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-top: 20px; }
.top-buyer, .recent { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.top-buyer small, .recent small { color: var(--gold); font-weight: 800; font-size: .66rem; letter-spacing: 1px; }
.top-buyer .who2 { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.top-buyer img, .rc img { border-radius: 6px; image-rendering: pixelated; }
.top-buyer b { display: block; }
.top-buyer span { font-size: .72rem; color: var(--soft); }
.rc-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.rc { display: grid; justify-items: center; gap: 3px; width: 64px; font-size: .62rem; color: #cfc8f0; }
.rc.ghost { opacity: .45; }
.rc.ghost .q { width: 40px; height: 40px; border-radius: 6px; background: #ffffff10; display: grid; place-items: center; font-weight: 800; }
.rc span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot { text-align: center; color: var(--soft); font-size: .76rem; padding: 34px 0 40px; }
.foot p { margin: 2px 0; }

/* modal producto */
.overlay { position: fixed; inset: 0; background: rgba(5,2,15,.7); backdrop-filter: blur(3px); z-index: 40; }
.modal { position: fixed; z-index: 50; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, 94vw); max-height: 90vh; overflow-y: auto; background: var(--panel2); border: 1px solid #ffffff22; border-radius: 12px; padding: 26px; }
.modal.small { width: min(400px, 94vw); }
.modal h3 { margin: 0 0 6px; text-transform: uppercase; }
.modal .x { position: absolute; top: 10px; right: 12px; }
.m-top { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.m-top .pimg { width: 96px; height: 96px; flex: none; font-size: 3.2rem; }
.m-desc { color: var(--soft); font-size: .86rem; margin: 0 0 12px; }
.perks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; font-size: .88rem; }
.perks li::before { content: "✓"; color: var(--gold); font-weight: 800; margin-right: 8px; }
.m-buy { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.m-buy .buy-btn { width: auto; padding: 11px 22px; }
.m-price { color: var(--gold); font-weight: 800; font-size: 1.3rem; }
.m-price s { color: var(--soft); font-size: .85rem; font-weight: 500; margin-right: 6px; }
.soft { color: var(--soft); font-size: .85rem; }

/* carrito */
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(440px, 100%); z-index: 50; background: var(--panel2); border-left: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s ease; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; text-transform: uppercase; font-size: 1rem; color: var(--gold); }
.x { background: none; border: 0; color: var(--soft); font-size: 1.15rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 20px; display: grid; align-content: start; gap: 10px; }
.ci { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ci .ico { width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.ci .ico img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.ci .nm { flex: 1; min-width: 0; font-weight: 600; font-size: .88rem; }
.ci .nm small { display: block; color: var(--gold); font-weight: 600; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); }
.rm { background: none; border: 0; color: var(--err); }
.cart-empty { text-align: center; color: var(--soft); padding: 50px 0; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.drawer-foot label { display: grid; gap: 6px; font-weight: 600; font-size: .85rem; }
.drawer-foot label small { color: var(--soft); font-weight: 400; }
input:not([type=checkbox]):not([type=radio]) { background: #0f0b20; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 14px; font: inherit; width: 100%; }
input:focus { outline: 2px solid var(--purple); border-color: transparent; }
.user-in { display: flex; align-items: center; gap: 10px; }
.user-in img { border-radius: 6px; image-rendering: pixelated; }
.pay { display: flex; flex-wrap: wrap; gap: 8px; }
.pay label { flex: 1 1 120px; display: block; }
.pay input { position: absolute; opacity: 0; }
.pay span { display: block; text-align: center; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; font-size: .82rem; }
.pay input:checked + span { border-color: var(--gold); background: #ffc93317; }
.pay input:focus-visible + span { outline: 2px solid var(--purple); }
.total { display: flex; justify-content: space-between; font-size: 1.15rem; }
.total b { color: var(--gold); }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--soft); font-size: .78rem; }
.err { color: var(--err); font-size: .84rem; min-height: 1.1em; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: #2a1f5c; border: 1px solid var(--gold); padding: 10px 18px; border-radius: 10px; z-index: 60; transition: .3s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 900px) {
  .links { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .sidebar ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .cat { height: 54px; }
  .cat .ico { width: 54px; }
  .band { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; }
  .planet { display: none; }
  .brand-head { grid-template-columns: 1fr 1fr; }
  .brand { grid-column: 1 / -1; order: -1; }
  .who-text { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
