:root {
  --bg: #0b1426;
  --surface: #13223f;
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #f5b800;
  --primary-hover: #ffd23f;
  --border: #253d6b;
  --skeleton-base: #192d52;
  --skeleton-highlight: #243f70;
  --radius: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 107, 43, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 43, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--primary);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.925rem;
  transition: color 0.15s ease;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.75rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-btn:focus-visible,
.add-to-cart-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.cart-badge {
  font-family: "IBM Plex Mono", monospace;
  background-color: var(--primary);
  color: #0e1116;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
}

/* Main */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.hero {
  position: relative;
  margin-bottom: 2.25rem;
  padding: 1.75rem 2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #1b3464 0%, #102040 55%, #0c172e 100%);
  border: 1.5px solid rgba(245, 184, 0, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 210, 63, 0.25);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f5b800, #ffe066, #f5b800);
}

.hero h1 {
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 0.5rem;
  color: #ffe066;
  text-shadow: 0 2px 10px rgba(245, 184, 0, 0.28);
}

.hero p {
  color: #cbd5e1;
  font-size: 1rem;
}

/* Grid de productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

/* Tarjeta de producto estilo RoyaleAPI */
.product-card {
  background: linear-gradient(180deg, #1b2436 0%, #131a28 100%);
  border: 1px solid #2b3852;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: #4f8ef7;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(79, 142, 247, 0.25);
}

.product-card.fade-in {
  animation: fadeInUp 0.45s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-image {
  width: 100%;
  height: 190px;
  object-fit: contain;
  padding: 0.75rem;
  background: radial-gradient(circle at 50% 45%, #243b6b 0%, #111827 100%);
  border-bottom: 1px solid #2b3852;
  display: block;
}

.product-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.product-description {
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.product-price {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
}

.add-to-cart-btn {
  background-color: var(--primary);
  color: #0e1116;
  border: none;
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.add-to-cart-btn:hover {
  background-color: var(--primary-hover);
}

/* Skeleton Loader */
.skeleton-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skeleton-box {
  background: linear-gradient(
    90deg,
    var(--skeleton-base) 25%,
    var(--skeleton-highlight) 50%,
    var(--skeleton-base) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

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

.skeleton-image {
  width: 100%;
  height: 185px;
}

.skeleton-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.skeleton-title {
  height: 18px;
  width: 70%;
  border-radius: var(--radius);
}

.skeleton-text {
  height: 13px;
  width: 100%;
  border-radius: var(--radius);
}

.skeleton-text.short {
  width: 55%;
}

.skeleton-price {
  height: 22px;
  width: 35%;
  border-radius: var(--radius);
  margin-top: 0.45rem;
}

.scroll-sentinel {
  height: 20px;
  margin-top: 1.5rem;
}

.site-footer {
  text-align: center;
  padding: 1.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  .product-card.fade-in,
  .skeleton-box {
    animation: none;
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 720px) {
  body {
    padding-bottom: 4.5rem;
  }

  .main-nav {
    display: none;
  }

  .btn-label {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(19, 34, 63, 0.96);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--border);
    padding: 0.45rem 0.25rem;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    transition: color 0.15s ease, transform 0.15s ease;
  }

  .mobile-nav-item.active,
  .mobile-nav-item:hover {
    color: var(--primary);
  }

  .mobile-nav-item.active svg {
    filter: drop-shadow(0 0 6px rgba(245, 184, 0, 0.55));
  }
}

@media (pointer: fine) {
  html,
  body,
  * {
    cursor: none !important;
  }
}

.page-mascot {
  position: fixed;
  top: 0;
  left: 0;
  width: 96px;
  height: 96px;
  object-fit: contain;
  z-index: 9998;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  will-change: transform;
}

.jumpscare-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jumpscare-overlay[hidden] {
  display: none;
}

.jumpscare-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  user-select: none;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.1s ease;
  text-shadow: 0 0 10px currentColor;
  animation: cursor-rainbow 2s linear infinite;
}

.custom-cursor.clicking {
  transform: translate(-50%, -50%) scale(1.45) rotate(-10deg);
}

.cursor-ripple {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid var(--primary);
  box-shadow: 0 0 12px var(--primary);
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%) scale(0.4);
  animation: cursor-click-burst 0.45s ease-out forwards;
}

@keyframes cursor-click-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.8);
  }
}

.deck-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  padding: 0.75rem;
  background: radial-gradient(circle, #1e3a6e 0%, #0f1d38 100%);
}

.deck-cards-row img {
  width: 100%;
  height: 64px;
  object-fit: contain;
}

@keyframes cursor-rainbow {
  0% {
    color: #ff6b2b;
  }
  20% {
    color: #fde047;
  }
  40% {
    color: #4ade80;
  }
  60% {
    color: #38bdf8;
  }
  80% {
    color: #c084fc;
  }
  100% {
    color: #ff6b2b;
  }
}
