/* ═══════════ WALLET GREMLINS — $GREMLIN ═══════════ */
:root {
  --bg: #0d0716;
  --bg2: #150b22;
  --card: #1c102d;
  --line: #3c2560;
  --text: #f4edff;
  --muted: #a894c7;
  --green: #a3e635;      /* verde tóxico gremlin */
  --purple: #a855f7;     /* púrpura del caos */
  --red: #ff4d5e;
  --gold: #ffd166;
  --radius: 18px;
  --font-head: 'Luckiest Guy', cursive;
  --font-body: 'Space Grotesk', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ─────────── botones ─────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.big { padding: 1rem 2.2rem; font-size: 1.1rem; }
.btn.full { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--green), #65a30d);
  color: #16220a;
  box-shadow: 0 6px 24px rgba(163, 230, 53, .35);
}
.btn-primary:hover { box-shadow: 0 10px 32px rgba(163, 230, 53, .5); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--purple);
}
.btn-outline:hover { background: rgba(168, 85, 247, .15); }
.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  position: relative;
}

/* ─────────── navbar ─────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 5vw;
  background: rgba(13, 7, 22, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--green);
}
.nav-logo em {
  font-style: normal;
  font-family: var(--font-body);
  font-size: .7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .15rem .5rem;
}
.nav-links { display: flex; gap: 1.5rem; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--green); }
.nav-actions { display: flex; align-items: center; gap: .8rem; }
.cart-count {
  position: absolute;
  top: -6px; right: -10px;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .25rem .7rem .25rem .3rem;
  font-size: .85rem;
}
.wallet-dot {
  width: 9px; height: 9px;
  margin-left: .4rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
#wallet-addr { font-family: monospace; font-size: .8rem; color: var(--green); }
.user-chip button {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: .8rem;
}
.user-chip button:hover { color: var(--red); }

/* ─────────── hero ─────────── */
.hero {
  position: relative;
  padding: 4rem 5vw 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 30%, rgba(168, 85, 247, .18), transparent),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(163, 230, 53, .1), transparent);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 4rem;
}
.hero-tag {
  color: var(--green);
  font-weight: 700;
  letter-spacing: .15em;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: .95;
  text-shadow: 4px 4px 0 rgba(168, 85, 247, .4);
}
.hero h1 span {
  background: linear-gradient(90deg, var(--green), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 34rem;
  line-height: 1.6;
}
.hero-sub strong { color: var(--green); }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-gremlin { position: relative; display: flex; justify-content: center; }
.gremlin-float { width: min(380px, 74vw); animation: floaty 3.2s ease-in-out infinite; filter: drop-shadow(0 20px 40px rgba(163, 230, 53, .25)); }
.gremlin-art { width: 100%; height: auto; border-radius: 18px; display: block; }
.cart-item-img .gremlin-art, .modal-gremlin .gremlin-art, .gremlin-mini .gremlin-art { border-radius: 12px; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}
.hero-badge {
  position: absolute;
  bottom: 8%;
  right: 5%;
  background: var(--gold);
  color: #3a2a00;
  font-weight: 700;
  font-size: .8rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  transform: rotate(-8deg);
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}

/* ─────────── ticker ─────────── */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
  padding: .7rem 0;
}
.ticker-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: scroll 22s linear infinite;
  font-weight: 700;
  color: var(--green);
}
.ticker-track span { flex-shrink: 0; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─────────── secciones ─────────── */
.section { padding: 5rem 5vw; max-width: 1200px; margin: 0 auto; }
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: .6rem;
}
.section-sub { text-align: center; color: var(--muted); margin-bottom: 3rem; }

/* lore / why / token */
.lore-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}
.lore-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform .2s, border-color .2s;
}
.lore-card:hover { transform: translateY(-6px); border-color: var(--green); }
.lore-emoji { font-size: 2.2rem; margin-bottom: .8rem; }
.lore-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.lore-card p { color: var(--muted); font-size: .92rem; line-height: 1.55; }

.why-banner {
  margin-top: 3rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(168, 85, 247, .15), rgba(163, 230, 53, .1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3rem 2rem;
}
.why-banner p {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  line-height: 1.25;
  margin-bottom: 1.6rem;
}
.why-banner p span {
  background: linear-gradient(90deg, var(--green), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.token-dyor { font-family: var(--font-body) !important; font-size: .8rem !important; color: var(--muted); margin-top: 1.2rem; }

/* shop */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.product:hover { transform: translateY(-8px); border-color: var(--green); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.product-img {
  background: var(--bg2);
  display: flex;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.product-img .gremlin-art { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product:hover .product-img .gremlin-art { transform: scale(1.06); }
.product-body { padding: 1.2rem 1.4rem 1.5rem; }
.product-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(255, 209, 102, .4);
  border-radius: 999px;
  padding: .15rem .6rem;
  margin-bottom: .6rem;
}
.product-body h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.product-body p { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; min-height: 2.6em; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.product-price { font-family: var(--font-head); font-size: 1.2rem; color: var(--green); }
.product-actions { display: flex; gap: .4rem; }
.product-foot .btn { padding: .55rem 1rem; font-size: .85rem; }

/* ─────────── carrito ─────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 3, 12, .7);
  backdrop-filter: blur(3px);
  z-index: 90;
}
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100dvh;
  width: min(400px, 92vw);
  background: var(--bg2);
  border-left: 1px solid var(--line);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform .3s ease;
}
.cart-drawer.open { transform: translateX(0); }
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 3rem; line-height: 1.8; }
.cart-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-item-img { width: 54px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: .9rem; }
.cart-item-info p { color: var(--green); font-size: .85rem; font-weight: 700; }
.cart-qty { display: flex; align-items: center; gap: .5rem; }
.cart-qty button {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.cart-qty button:hover { border-color: var(--green); }
.cart-foot { padding: 1.2rem 1.4rem; border-top: 1px solid var(--line); display: grid; gap: .7rem; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.05rem; }
.cart-total strong { color: var(--green); font-family: var(--font-head); }

/* ─────────── modal ─────────── */
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, 92vw);
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  z-index: 110;
  text-align: center;
}
.modal-gremlin { width: 110px; margin: 0 auto 1rem; animation: floaty 3.2s ease-in-out infinite; }
.modal h3 { font-family: var(--font-head); font-size: 1.6rem; color: var(--gold); margin-bottom: 1rem; }
.modal p { color: var(--muted); font-size: .95rem; line-height: 1.6; margin-bottom: 1rem; }
.modal p strong { color: var(--green); }
.modal .btn + .btn { margin-top: .6rem; }

/* payment modal */
.pay-summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem 1.1rem;
  margin-bottom: 1rem;
  text-align: left;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .88rem;
  padding: .25rem 0;
  color: var(--muted);
}
.pay-row strong { color: var(--text); }
.pay-row-total {
  border-top: 1px solid var(--line);
  margin-top: .4rem;
  padding-top: .55rem;
  color: var(--text);
  font-weight: 700;
}
.pay-row-total strong { color: var(--green); font-size: 1.05rem; }
.pay-note { font-size: .8rem !important; }
.pay-error-detail { font-size: .68rem !important; color: var(--muted) !important; opacity: .6; word-break: break-all; }
.pay-addr {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem .7rem;
  font-size: .68rem;
  color: var(--gold);
  word-break: break-all;
  margin-bottom: 1.2rem;
}
.txlink {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 1.2rem;
  text-decoration: underline;
}
.spinner {
  width: 54px; height: 54px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  border: 5px solid var(--line);
  border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────── toast ─────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--green);
  color: var(--text);
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 500;
  z-index: 120;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ─────────── footer ─────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem 5vw;
  text-align: center;
  background: var(--bg2);
}
.gremlin-mini { width: 70px; margin: 0 auto 1rem; }
.footer-small { color: var(--muted); font-size: .8rem; margin-top: .4rem; }

/* ─────────── responsive ─────────── */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .nav-links { display: none; }
}
