/* PlatinumCraft Network - tema Tebex
   Paleta: Giratina (rojo / oro / gris oscuro) + Jirachi (amarillo / turquesa) */
:root {
  --bg: #0b0d17;
  --bg-2: #10132100;
  --surface: #141829;
  --surface-2: #1a1f35;
  --border: #252b45;
  --text: #eef0f8;
  --muted: #9aa1bd;
  --red: #e5303a;
  --gold: #f6c344;
  --teal: #7fe0d6;
  --accent: var(--red);
  --accent-2: var(--gold);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
body[data-game="cobblemon"] { --accent: var(--teal); --accent-2: var(--gold); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  position: relative;
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Fondo: imagen fija + degradado oscuro + tinte del color del juego.
   La imagen se define en el <body style="--bg-img:..."> del layout. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: url('../img/fondo.jpg') center top / cover no-repeat;
  filter: saturate(1.1);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--accent) 30%, transparent), transparent),
    linear-gradient(180deg, rgba(11, 13, 23, .55) 0%, rgba(11, 13, 23, .86) 38%, rgba(11, 13, 23, .95) 100%);
}
/* Destellos dorados (como los del logo) */
.sparkles { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sparkles i {
  position: absolute; width: 6px; height: 6px; background: var(--gold); opacity: 0;
  box-shadow: 0 0 10px 2px rgba(246, 195, 68, .7);
  animation: twinkle 5s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: .9; transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .sparkles { display: none; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 23, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .3px; }
.brand img { height: 96px; width: 96px; object-fit: contain; margin: -8px 0; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.brand span { font-size: 1.05rem; }
.brand small { color: var(--accent-2); font-weight: 600; margin-left: 4px; }
.game-tabs { display: flex; gap: 6px; margin-left: 12px; }
.game-tab {
  padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  color: var(--muted); border: 1px solid transparent; transition: .2s;
}
.game-tab:hover { color: var(--text); background: var(--surface); }
.game-tab.active { color: #0b0d17; background: var(--tab, var(--accent)); }
.game-tab[data-game="pixelmon"] { --tab: var(--red); color: var(--muted); }
.game-tab[data-game="pixelmon"].active { color: #fff; }
.game-tab[data-game="cobblemon"] { --tab: var(--teal); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: .92rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: .18s; font-family: inherit;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #0b0d17; }
body[data-game="pixelmon"] .btn-primary, body:not([data-game]) .btn-primary { color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1b1500; }
.btn-block { width: 100%; }
.cart-count {
  background: var(--accent-2); color: #1b1500; border-radius: 999px;
  font-size: .75rem; padding: 1px 8px; font-weight: 800;
}

/* ---------- Hero ---------- */
.hero { padding: clamp(6px, 1.5vh, 22px) 0 clamp(8px, 2vh, 28px); text-align: center; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.hero { --logo-h: clamp(240px, 54vh, 600px); }
/* el PNG del logo trae margen transparente arriba y abajo: lo recortamos con margenes negativos */
.hero img.hero-logo { display: block; height: var(--logo-h); width: auto; margin: calc(var(--logo-h) * -.14) auto calc(var(--logo-h) * -.1); max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 30px rgba(229, 48, 58, .35)); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.15; margin-bottom: 10px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 22px; }
.ip-box {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.ip-box code { font-size: 1.05rem; color: var(--accent-2); font-weight: 700; }

/* ---------- Game cards (home) ---------- */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: clamp(10px, 2.5vh, 28px) 0 clamp(16px, 3vh, 40px); }
.game-card {
  position: relative; overflow: hidden; border-radius: 18px; padding: 28px;
  background: linear-gradient(145deg, rgba(26, 31, 53, .78), rgba(20, 24, 41, .72));
  backdrop-filter: blur(8px);
  border: 1px solid var(--border); transition: .25s;
}
.game-card::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 260px; height: 260px;
  background: radial-gradient(circle, var(--c), transparent 65%); opacity: .25;
}
.game-card { cursor: pointer; }
.game-card:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: var(--shadow); }
.game-card h2 a { color: inherit; }
.game-card[data-game="pixelmon"] { --c: var(--red); }
.game-card[data-game="cobblemon"] { --c: var(--teal); }
.game-card h2 { font-size: 1.6rem; margin-bottom: 4px; position: relative; }
.game-card p { color: var(--muted); margin-bottom: 18px; position: relative; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.chip {
  padding: 6px 12px; font-size: .85rem; font-weight: 600; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border); transition: .15s;
}
.chip:hover { border-color: var(--c); color: var(--c); }

/* ---------- Layout con sidebar ---------- */
.page { padding: 32px 0 60px; flex: 1; }
.page-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.page-grid.no-side { grid-template-columns: 1fr; }
.page-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.page-title h1 { font-size: 1.8rem; }
.crumb { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.crumb b { color: var(--accent); }

.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-link {
  padding: 8px 15px; border-radius: 10px; font-weight: 600; font-size: .92rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: .15s;
}
.cat-link:hover { color: var(--text); border-color: var(--accent); }
.cat-link.active { background: var(--accent); border-color: var(--accent); color: #0b0d17; }
body[data-game="pixelmon"] .cat-link.active { color: #fff; }

/* ---------- Productos ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px; }
.product-grid.list { grid-template-columns: 1fr; }
.product {
  display: flex; flex-direction: column; background: rgba(20, 24, 41, .82); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .2s;
}
.product:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.product-img {
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--surface-2), #0e1120); position: relative;
}
.product-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.product-img .ph { font-size: 2.6rem; opacity: .5; }
.badge {
  position: absolute; top: 10px; left: 10px; background: var(--accent-2); color: #1b1500;
  font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-name { font-weight: 700; font-size: 1.02rem; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-size: 1.25rem; font-weight: 800; color: var(--accent-2); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .9rem; }

/* ---------- Paquete ---------- */
.package-view {
  display: grid; grid-template-columns: 320px 1fr; gap: 28px; background: rgba(20, 24, 41, .85); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 18px; padding: 24px;
}
.package-view .product-img { border-radius: 12px; }
.package-info h1 { font-size: 1.7rem; margin-bottom: 8px; }
.package-desc { color: var(--muted); margin: 14px 0 20px; }
.package-desc ul { margin-left: 20px; }
.package-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Sidebar / meta ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 90px; }
.widget {
  background: rgba(20, 24, 41, .82); backdrop-filter: blur(6px); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.widget h3 { font-size: .95rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.goal-bar { height: 12px; background: #0b0d17; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.goal-fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: 999px; }
.goal-meta { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.goal-meta b { color: var(--text); }
.widget .tebex-module, .widget ul { list-style: none; }
.widget-modules { display: flex; flex-direction: column; gap: 18px; }

/* ---------- Carrito ---------- */
.cart-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-total { font-size: 1.3rem; font-weight: 800; margin: 16px 0; display: flex; justify-content: space-between; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* ---------- Toast ---------- */
.toast { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface-2); }
.toast.error { border-color: var(--red); }
.toast.success { border-color: #3ecf8e; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .package-view { grid-template-columns: 1fr; }
  .games { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 10px; }
  .game-tabs { order: 3; width: 100%; margin: 0; }
  .game-tab { flex: 1; text-align: center; }
  .brand span { display: none; }
  .hero { --logo-h: 320px; }
  .hero-eyebrow { letter-spacing: .2em; font-size: .9rem; padding: 8px 18px 8px calc(18px - .2em); }
  .brand img { height: 68px; width: 68px; }
  .hero { padding-top: 36px; }
  .btn { padding: 10px 14px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-body { padding: 10px 12px 12px; }
  .package-view { padding: 16px; }
  .page-title h1 { font-size: 1.4rem; }
}
.hero-eyebrow {
  display: inline-block; position: relative; z-index: 2;
  font-size: clamp(1rem, 1.6vw, 1.35rem); letter-spacing: .32em; text-transform: uppercase; font-weight: 800;
  color: var(--gold); padding: 10px 30px 10px calc(30px - .32em);
  border: 1px solid rgba(246, 195, 68, .55); border-radius: 999px;
  background: linear-gradient(180deg, rgba(11, 13, 23, .7), rgba(11, 13, 23, .45));
  box-shadow: 0 0 24px rgba(246, 195, 68, .18), inset 0 0 14px rgba(246, 195, 68, .08);
}
.hero p { font-size: .98rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin: 4px 0 clamp(12px, 3vh, 30px); color: var(--muted); font-size: .88rem; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust b { color: var(--text); font-weight: 600; }
.terms { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: .88rem; color: var(--muted); cursor: pointer; }
.terms input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.secure { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 12px; }
.footer-note { width: 100%; font-size: .8rem; opacity: .85; }
/* Pantallas bajas (portatiles y monitores 1080p): compactar un poco todo para que quepa sin bajar */
@media (min-width: 641px) and (max-height: 1000px) {
  .header-inner { height: 72px; }
  .brand img { height: 84px; width: 84px; }
  .page { padding-top: 16px; }
  .game-card { padding: 20px 24px; }
  .game-card p { margin-bottom: 12px; }
  .hero p { margin-bottom: 8px; }
  .trust { font-size: .82rem; }
}
.section-title { font-size: 1.25rem; margin: 28px 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title:first-of-type { margin-top: 8px; }

/* ---------- Extras de la web propia ---------- */
.demo-banner { background: var(--gold); color: #1b1500; text-align: center; font-weight: 700; padding: 6px 12px; font-size: .88rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.field label { font-weight: 700; font-size: .9rem; }
.field input {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: #0b0d17; color: var(--text); font-size: 1rem; font-family: inherit;
}
.field input:focus { outline: 2px solid var(--accent); }
.field small { color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item .grow { flex: 1; }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .85rem; text-decoration: underline; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.error-box { border: 1px solid var(--red); background: rgba(229, 48, 58, .12); padding: 12px 16px; border-radius: 10px; margin-top: 14px; }
