/* Tienda pública. Usa los tokens de base.css. */

body {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.view {
  flex: 1;
  outline: none;
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.page.narrow {
  width: min(820px, 100%);
}

.page-loading {
  display: grid;
  place-items: center;
  min-height: 40vh;
}

.noscript {
  text-align: center;
  padding: 40px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-weight: 700;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--gold);
  text-decoration: none;
}

.center {
  text-align: center;
}

.big-404 {
  font-size: 5rem;
  color: var(--gold);
}

/* ---------- Fondo de cueva ---------- */

.cave-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 50% -120px, rgba(255, 194, 61, 0.14), transparent 70%),
    radial-gradient(600px 400px at 90% 30%, rgba(127, 228, 255, 0.05), transparent 70%),
    radial-gradient(600px 500px at 5% 70%, rgba(184, 140, 255, 0.05), transparent 70%),
    var(--bg);
}

.twinkle {
  position: absolute;
  width: 8px;
  height: 8px;
  transform: scale(var(--s, 1));
  opacity: 0;
  animation: twinkle 5s ease-in-out infinite;
}

.twinkle::before,
.twinkle::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(calc(var(--s, 1) * 0.4)) rotate(0deg);
  }
  50% {
    opacity: 0.75;
    transform: scale(var(--s, 1)) rotate(45deg);
  }
}

/* ---------- Anuncio + cabecera ---------- */

.announcement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--gold);
  color: #2a1a02;
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  border-bottom: var(--stroke) solid var(--outline);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 16, 13, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 10px 20px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand:hover .logo-gem {
  animation: wobble 0.6s var(--ease-bounce);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px 4px 5px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}

.balance-chip:hover {
  border-color: var(--gold);
}

.balance-coin {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #2a1a02;
  border: 2px solid var(--outline);
}

.account-btn {
  max-width: 180px;
}

.account-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: var(--stroke) solid var(--outline);
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--outline);
}

.cart-button:hover {
  text-decoration: none;
  background: var(--surface-2);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 2px solid var(--outline);
  background: var(--gold);
  color: #2a1a02;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  transition: transform 0.2s var(--ease-bounce);
}

.cart-count.empty {
  transform: scale(0);
}

.menu-toggle {
  display: none;
}

/* ---------- Portada ---------- */

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 72px 20px 36px;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: pop-in 0.5s var(--ease-bounce) both;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.1rem);
  font-weight: 700;
  line-height: 1.05;
  max-width: 16ch;
  animation: pop-in 0.6s 0.05s var(--ease-bounce) both;
}

.hero-highlight {
  background: linear-gradient(100deg, var(--gold) 10%, var(--gold-2) 45%, var(--diamond) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: shimmer 6s ease-in-out infinite;
}

.hero-sub {
  max-width: 56ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 1.1rem;
  animation: pop-in 0.6s 0.1s var(--ease-bounce) both;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  color: var(--ink-3);
  font-weight: 700;
  font-size: 0.88rem;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust .icon {
  color: var(--emerald);
}

.discord-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  padding: 12px 18px 12px 12px;
  border: var(--stroke) solid var(--outline);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  color: var(--ink);
  text-align: left;
  transition: transform 0.15s var(--ease-bounce);
}

.discord-card:hover {
  transform: translateY(-3px) rotate(-1deg);
  text-decoration: none;
}

.discord-card strong,
.discord-card small {
  display: block;
}

.discord-card small {
  color: var(--ink-3);
}

.discord-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid var(--outline);
  background: #5865f2;
  color: #fff;
}

.hero-floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floater {
  position: absolute;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35));
}

.f1 {
  left: 4%;
  top: 22%;
}

.f2 {
  right: 6%;
  top: 16%;
  animation-delay: -1.5s;
}

.f3 {
  left: 12%;
  bottom: 8%;
  animation-delay: -3s;
}

.f4 {
  right: 14%;
  bottom: 14%;
  animation-delay: -2s;
}

.f5 {
  left: 24%;
  top: 6%;
  animation-delay: -4s;
  opacity: 0.8;
}

.f6 {
  right: 22%;
  top: 4%;
  animation: swing 4s ease-in-out infinite;
  opacity: 0.9;
}

.rock-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-top: 10px;
}

.rock-divider svg {
  width: 100%;
  height: 70px;
}

.products-section {
  padding-top: 8px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.section-head h1,
.section-head h2 {
  font-size: 1.8rem;
}

/* ---------- Tarjetas de producto ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: var(--stroke) solid var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard-lg);
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s;
  animation: card-in 0.5s var(--ease-bounce) both;
}

.product-card:hover {
  transform: translateY(-5px) rotate(-0.4deg);
  box-shadow: 0 11px 0 var(--outline);
}

.product-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-bottom: var(--stroke) solid var(--outline);
  background: var(--bg-2);
  cursor: pointer;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .cover-img {
  transform: scale(1.04);
}

.cover-fallback {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 16px;
  --tint: var(--diamond);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tint) 28%, transparent), transparent 65%),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.02) 18px 36px),
    var(--bg-2);
}

.cover-emerald {
  --tint: var(--emerald);
}

.cover-gold {
  --tint: var(--gold);
}

.cover-ruby {
  --tint: var(--ruby);
}

.cover-amethyst {
  --tint: var(--amethyst);
}

.cover-gem {
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.4));
  transition: transform 0.35s var(--ease-bounce);
}

.product-card:hover .cover-gem {
  transform: translateY(-6px) rotate(-8deg) scale(1.06);
}

.cover-title {
  max-width: 90%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--ink);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  transform: rotate(-4deg);
}

.product-body {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
  flex: 1;
  align-content: start;
}

.product-title {
  font-size: 1.08rem;
  line-height: 1.25;
  min-height: 2.5em;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.btn-buy {
  flex: 1;
}

.btn-buy:hover .pick-icon {
  animation: pick 0.45s ease-in-out infinite alternate;
}

.pick-icon {
  display: inline-grid;
  transform-origin: 80% 80%;
}

.product-price {
  display: grid;
  justify-items: end;
  line-height: 1.1;
}

.product-price strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.product-price s {
  font-size: 0.85rem;
}

.product-card.sold-out {
  filter: grayscale(0.9);
  opacity: 0.6;
}

.product-card.sold-out:hover {
  transform: none;
  box-shadow: var(--shadow-hard-lg);
}

.product-card.sold-out .product-media {
  cursor: not-allowed;
}

.sold-ribbon {
  position: absolute;
  top: 18px;
  right: -38px;
  width: 150px;
  padding: 4px 0;
  transform: rotate(35deg);
  background: var(--ruby);
  border-block: 2px solid var(--outline);
  color: #2b0408;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- Modal de compra ---------- */

.buy-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 24px;
}

.buy-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: var(--stroke) solid var(--outline);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.buy-info {
  display: grid;
  gap: 14px;
  align-content: start;
}

.buy-title {
  padding-right: 40px;
}

.buy-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.buy-desc {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.buy-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.buy-row .label {
  display: block;
  margin-bottom: 6px;
}

.buy-total-wrap {
  text-align: right;
}

.buy-total {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--gold);
}

.buy-actions {
  display: grid;
  gap: 10px;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: var(--stroke) solid var(--outline);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}

.qty-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.qty-btn:hover:not(:disabled) {
  background: var(--surface-3);
}

.qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.qty-value {
  min-width: 36px;
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
}

/* ---------- Checkout ---------- */

.checkout-lines {
  display: grid;
  gap: 6px;
  margin: 10px 0 16px;
}

.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  font-weight: 700;
}

.checkout-panel {
  display: grid;
  gap: 12px;
}

.promo-row {
  display: flex;
  gap: 8px;
}

.promo-row .input {
  text-transform: uppercase;
}

.promo-applied {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 2px dashed var(--emerald);
  border-radius: 12px;
  color: var(--emerald);
  font-weight: 700;
}

.promo-applied .link-btn {
  margin-left: auto;
}

.summary-rows {
  display: grid;
  gap: 2px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  color: var(--ink-2);
  font-weight: 600;
}

.summary-row.discount {
  color: var(--emerald);
}

.summary-row.total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.summary-row.balance {
  font-size: 0.9rem;
}

.pay-note {
  margin: 0;
  text-align: center;
}

/* ---------- Éxito ---------- */

.success-view {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.success-view p {
  margin: 0;
}

.cart-scene {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
}

.cart-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 8px;
  border-block: 2px solid var(--outline);
  background: repeating-linear-gradient(90deg, #6b4a32 0 10px, #4a3323 10px 22px);
}

.cart-mover {
  position: absolute;
  left: 50%;
  bottom: 10px;
  margin-left: -75px;
}

.order-code-big {
  display: grid;
  gap: 4px;
  padding: 12px 22px;
  border: 2px dashed var(--gold);
  border-radius: 14px;
}

.order-code-big strong {
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.success-coin {
  animation: coin-flip 1.2s ease-in-out;
}

/* ---------- Autenticación ---------- */

.auth-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.auth-head svg {
  animation: wobble 0.8s var(--ease-bounce);
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  overflow-x: auto;
}

.tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  background: var(--surface-3);
  border-color: var(--outline);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--outline);
}

.code-input {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
}

/* ---------- Recarga ---------- */

.recharge {
  display: grid;
  gap: 14px;
}

.recharge > p {
  margin: 0;
}

.box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
}

.amount-btn,
.method-tab {
  min-height: 44px;
  padding: 8px 10px;
  border: var(--stroke) solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s var(--ease-bounce), border-color 0.15s;
}

.amount-btn:hover {
  transform: translateY(-2px);
}

.amount-btn.active,
.method-tab.active {
  border-color: var(--outline);
  background: var(--gold);
  color: #2a1a02;
  box-shadow: 0 3px 0 var(--outline);
}

.method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.method-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.method-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.credited {
  margin: 0;
  font-weight: 700;
  color: var(--ink-2);
}

.method-area {
  display: grid;
  gap: 12px;
}

.method-area .hint {
  margin: 0;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  gap: 8px;
}

ol.steps:not(.method-area ol) {
  padding-left: 20px;
  list-style: decimal;
  color: var(--ink-2);
}

/* ---------- Carrito ---------- */

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-line {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  animation: card-in 0.35s var(--ease-bounce) both;
}

.cart-thumb {
  width: 92px;
  height: 70px;
  overflow: hidden;
  border: 2px solid var(--outline);
  border-radius: 12px;
}

.cart-thumb .cover-gem svg {
  width: 40px;
  height: 40px;
}

.cart-thumb .cover-title {
  display: none;
}

.cart-line-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cart-line-controls {
  margin-top: 4px;
}

.cart-line-end {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.cart-line-end strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.cart-summary {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 14px;
  border-color: var(--outline);
  box-shadow: var(--shadow-hard-lg);
}

/* ---------- Mi cuenta ---------- */

.account-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 24px;
  margin-bottom: 22px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 22px;
  border: var(--stroke) solid var(--outline);
  background: radial-gradient(circle, rgba(127, 228, 255, 0.25), transparent 70%), var(--bg-2);
}

.account-avatar svg {
  animation: float 5s ease-in-out infinite;
}

.account-id {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-id h1 {
  font-size: 1.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.account-wallet {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.wallet-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-balance {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--gold);
}

.account-tabs {
  max-width: 640px;
}

.tab-body {
  min-height: 200px;
}

.tab-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.list-count {
  margin: 0 0 8px;
}

.day-group {
  margin-bottom: 18px;
}

.day-label {
  position: sticky;
  top: 70px;
  z-index: 2;
  margin-bottom: 8px;
  padding: 6px 0;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 0.95rem;
  text-transform: capitalize;
}

.rows {
  display: grid;
  overflow: hidden;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.order-row {
  display: grid;
  grid-template-columns: 60px 150px 1fr auto 100px 24px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.15s;
}

.order-row:last-child {
  border-bottom: 0;
}

.order-row:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.order-row:hover .order-go {
  transform: translateX(4px);
  color: var(--gold);
}

.order-time {
  color: var(--ink-3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.order-code {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.order-products {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ink-2);
}

.order-total {
  font-family: var(--font-display);
  text-align: right;
}

.order-go {
  display: grid;
  color: var(--ink-3);
  transition: transform 0.15s;
}

.ledger-row {
  display: grid;
  grid-template-columns: 36px 1fr auto 100px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.ledger-row:last-child {
  border-bottom: 0;
}

.ledger-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid var(--outline);
  background: var(--surface-3);
}

.ledger-icon.in {
  background: var(--emerald);
  color: #062417;
}

.ledger-icon.out {
  background: var(--surface-3);
  color: var(--ink-2);
}

.ledger-info {
  display: grid;
  min-width: 0;
}

.ledger-info .faint {
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-amount {
  font-family: var(--font-display);
}

.ledger-after {
  text-align: right;
  font-size: 0.85rem;
}

.topup-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.topup-row:last-child {
  border-bottom: 0;
}

.topup-note {
  grid-column: 1 / -1;
  margin: 0;
}

.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.security-grid h3 {
  margin-bottom: 14px;
}

.stack {
  display: grid;
  gap: 18px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secret-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 8px;
  padding: 12px 14px;
  border: 2px dashed var(--gold);
  border-radius: 12px;
  background: var(--bg-2);
}

.secret-box code {
  font-size: 1rem;
  letter-spacing: 0.08em;
  word-break: break-all;
}

/* ---------- Pedido ---------- */

.order-page {
  display: grid;
  gap: 18px;
}

.order-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.order-head p {
  margin: 4px 0 0;
}

.order-head-gem svg {
  animation: wobble 1s var(--ease-bounce);
}

.order-head .order-code {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.5rem;
}

.icon-btn.inline {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--ink-2);
}

.order-head-total {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.order-head-total strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.order-items {
  display: grid;
  gap: 14px;
}

.order-item {
  display: grid;
  gap: 14px;
}

.order-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-item-head h3 {
  font-size: 1.1rem;
}

.delivery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.delivery-list {
  display: grid;
  gap: 10px;
}

.delivery-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--line);
  border-left: 6px solid var(--emerald);
  border-radius: 12px;
  background: var(--bg-2);
  animation: card-in 0.4s var(--ease-bounce) both;
}

.delivery-index {
  color: var(--ink-3);
  font-weight: 800;
}

.delivery-content {
  margin: 0;
  min-width: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
}

.order-totals {
  display: grid;
  gap: 2px;
}

/* ---------- Pie ---------- */

.site-footer {
  border-top: 2px solid var(--line);
  background: var(--bg-2);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-text {
  margin: 0;
  flex: 1 1 260px;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-weight: 700;
}

/* ---------- Efectos ---------- */

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  overflow: hidden;
}

.fx-node {
  position: absolute;
  will-change: transform;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-14px) rotate(5deg);
  }
}

@keyframes swing {
  0%,
  100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(18deg);
  }
}

@keyframes wobble {
  0% {
    transform: rotate(0) scale(1);
  }
  30% {
    transform: rotate(-14deg) scale(1.12);
  }
  60% {
    transform: rotate(10deg) scale(0.96);
  }
  100% {
    transform: rotate(0) scale(1);
  }
}

@keyframes pick {
  from {
    transform: rotate(10deg);
  }
  to {
    transform: rotate(-35deg);
  }
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

@keyframes coin-flip {
  0% {
    transform: rotateY(0) translateY(-30px);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: rotateY(720deg) translateY(0);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }

  .order-row {
    grid-template-columns: 52px 1fr auto 20px;
    grid-template-areas:
      'time code total go'
      'time products status go';
    row-gap: 4px;
  }

  .order-time {
    grid-area: time;
  }

  .order-code {
    grid-area: code;
  }

  .order-products {
    grid-area: products;
  }

  .order-status {
    grid-area: status;
    justify-self: end;
  }

  .order-total {
    grid-area: total;
  }

  .order-go {
    grid-area: go;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-grid;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
  }

  .header-actions {
    margin-left: auto;
    gap: 8px;
  }

  .main-nav {
    display: none;
    order: 10;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 6px 0 4px;
  }

  .menu-open .main-nav {
    display: flex;
  }

  .account-name {
    display: none;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .page {
    padding: 20px 16px 48px;
  }

  .hero {
    padding: 44px 16px 24px;
  }

  .floater {
    opacity: 0.35;
  }

  .f5,
  .f6 {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 16px;
  }

  .buy-layout {
    grid-template-columns: 1fr;
  }

  .buy-media {
    aspect-ratio: 16 / 10;
  }

  .modal {
    padding: 20px 16px;
  }

  .account-hero {
    grid-template-columns: auto 1fr;
    padding: 18px;
  }

  .account-wallet {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    justify-items: start;
    align-items: center;
  }

  .account-wallet .label {
    grid-column: 1 / -1;
  }

  .account-avatar {
    width: 64px;
    height: 64px;
  }

  .account-avatar svg {
    width: 44px;
    height: 44px;
  }

  .ledger-row {
    grid-template-columns: 32px 1fr auto;
  }

  .ledger-after {
    display: none;
  }

  .order-head {
    grid-template-columns: 1fr;
  }

  .order-head-gem {
    display: none;
  }

  .order-head-total {
    justify-items: start;
    grid-auto-flow: column;
    align-items: center;
  }

  .cart-line {
    grid-template-columns: 64px 1fr;
  }

  .cart-thumb {
    width: 64px;
    height: 56px;
  }

  .cart-line-end {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }

  .delivery-item {
    grid-template-columns: 1fr;
  }

  .topup-row {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 420px) {
  .balance-chip {
    padding-right: 8px;
  }

  .brand-name {
    display: none;
  }
}

.share-link {
  justify-self: center;
  font-size: 0.85rem;
}

.memo-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 2px dashed var(--gold);
  border-radius: 12px;
  font-size: 0.9rem;
}

.memo-box strong {
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.check.consent {
  align-items: flex-start;
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.check.consent input {
  flex: none;
  margin-top: 1px;
}

.btn-discord {
  --btn-bg: #5865f2;
  --btn-ink: #fff;
}

.ticket-data {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.ticket-data dt {
  color: var(--ink-3);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ticket-data dd {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 700;
}

.paid-form {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}

.paid-form summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 700;
  list-style: none;
}

.paid-form summary::-webkit-details-marker {
  display: none;
}

.paid-form[open] summary {
  margin-bottom: 12px;
}

.no-refund {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-2);
}

.policy-page {
  display: grid;
  gap: 14px;
}

.policy-page h1 {
  font-size: 2rem;
}

.policy-page p {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink-2);
}

.policy-page h3 {
  margin-bottom: 8px;
}

input.qty-value {
  width: 52px;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
}

input.qty-value:focus {
  outline: none;
  background: var(--bg-2);
}
