/* =========================================================================
   PokMart · styles
   Palette: Pikachu yellow (#ffcb05), Pokéball red (#ee1515), TCG blue (#3b4cca)
   ========================================================================= */

:root {
  --yellow: #ffcb05;
  --yellow-dk: #f2b70d;
  --red: #ee1515;
  --red-dk: #c81010;
  --blue: #3b4cca;
  --blue-dk: #2a389c;
  --ink: #1a1a1e;
  --ink-2: #4a4a52;
  --ink-3: #8a8a92;
  --paper: #fffdf3;
  --card: #ffffff;
  --line: #e9e4c9;
  --shadow: 0 10px 30px rgba(20, 20, 40, 0.08), 0 2px 6px rgba(20, 20, 40, 0.06);
  --shadow-lg: 0 30px 80px rgba(20, 20, 40, 0.14), 0 6px 12px rgba(20, 20, 40, 0.08);
  --radius: 14px;
  --radius-lg: 22px;
  --pixel: "Press Start 2P", monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse at top, #fff8d6 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, #dbe0ff 0%, transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 253, 243, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b {
  font-family: var(--pixel);
  font-size: 15px; letter-spacing: 0.5px;
  color: var(--ink);
}
.brand-text b i { font-style: normal; color: var(--red); }
.brand-text em { font-style: normal; font-size: 11px; color: var(--ink-3); letter-spacing: 0.3px; margin-top: 4px; }

.nav-right { display: flex; align-items: center; gap: 10px; }
.token-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.token-chip b { color: var(--ink); font-weight: 700; }
.token-chip .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 4px rgba(238, 21, 21, 0.15);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(238, 21, 21, 0.05); } }

/* =========================================================================
   POKÉBALL (pure CSS)
   ========================================================================= */
.pokeball {
  --sz: 32px;
  width: var(--sz); height: var(--sz);
  border-radius: 50%;
  background:
    linear-gradient(#ee1515 0 50%, #fff 50% 100%);
  border: 3px solid var(--ink);
  position: relative;
  box-shadow: inset -4px -6px 0 rgba(0,0,0,0.12);
  display: inline-block;
  flex-shrink: 0;
}
.pokeball::before,
.pokeball::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
}
.pokeball::before {
  top: 50%; height: 3px; background: var(--ink);
  transform: translateY(-50%);
}
.pokeball::after {
  top: 50%; left: 50%;
  width: calc(var(--sz) * 0.34);
  height: calc(var(--sz) * 0.34);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 3px #fff;
}
.pokeball.small { --sz: 22px; border-width: 2px; }
.pokeball.small::before { height: 2px; }
.pokeball.small::after { border-width: 2px; box-shadow: inset 0 0 0 2px #fff; }
.pokeball.big { --sz: 72px; border-width: 4px; }
.pokeball.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  border: none; border-radius: 12px;
  padding: 10px 18px; font-weight: 700; font-size: 14px;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--red); color: #fff;
  box-shadow: 0 3px 0 var(--red-dk), 0 8px 20px rgba(238,21,21,.28);
}
.btn-primary:hover { background: #ff2a2a; }
.btn-ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
}
.btn-ghost:hover { background: #fff8d6; border-color: var(--yellow); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { padding: 40px 22px 20px; }
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px;
  align-items: center;
}
.hero-copy .tag {
  display: inline-block; padding: 6px 12px; margin-bottom: 20px;
  background: #fff8d6; color: #7a5c00;
  border: 1px solid #f0dc7a; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
}
h1 {
  font-family: var(--pixel);
  font-size: clamp(28px, 4.6vw, 52px);
  line-height: 1.1; letter-spacing: -0.5px;
  margin: 0 0 18px;
}
h1 .hl {
  color: var(--red);
  text-shadow: 4px 4px 0 var(--yellow), -1px -1px 0 var(--ink), 1px 1px 0 var(--ink);
  display: inline-block;
  transform: rotate(-2deg);
}
.lede {
  font-size: 17px; color: var(--ink-2); max-width: 520px;
  margin: 0 0 26px;
}

.search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 8px 8px 8px 16px;
  box-shadow: 4px 4px 0 var(--ink);
  max-width: 560px;
  margin-bottom: 16px;
}
.search-icon { font-size: 18px; opacity: 0.65; }
.search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 16px; padding: 8px 4px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
}
.chip:hover { border-color: var(--red); color: var(--red); background: #fff5f5; }

/* Hero art (TCG card) */
.hero-art { display: flex; justify-content: center; }
.tcg-card {
  width: 280px; aspect-ratio: 2.5 / 3.5;
  perspective: 1000px;
}
.tcg-frame {
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at top left, #fff9c9, #ffe07a 60%, #ffb400 100%);
  border-radius: 18px;
  border: 8px solid #ffd94a;
  outline: 3px solid #a67a08;
  padding: 10px 12px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.tcg-frame::before {
  content: "";
  position: absolute; inset: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.28) 0%, transparent 40%);
  pointer-events: none;
  border-radius: 12px;
}
.tcg-header { display: flex; justify-content: space-between; font-family: var(--pixel); font-size: 9px; margin-bottom: 6px; }
.tcg-header .hp { color: var(--red); }
.tcg-header .stage { color: var(--ink-2); }
.tcg-art {
  flex: 1;
  background:
    radial-gradient(ellipse at center, #c9f0ff 0%, #9dd6ff 60%, #6aa9e6 100%);
  border-radius: 10px;
  border: 2px solid #d4a90a;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
  position: relative;
}
.tcg-name {
  font-family: var(--pixel);
  font-size: 14px; margin-top: 8px; letter-spacing: 0.5px;
}
.tcg-flavor {
  font-size: 11px; font-style: italic; color: var(--ink-2);
  margin: 4px 0 6px; line-height: 1.3;
}
.tcg-footer {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--ink-2);
  border-top: 1px dashed #b78e08;
  padding-top: 4px;
}
.float { animation: float 4s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

/* CSS Pikachu */
.pikachu {
  width: 140px; height: 120px; position: relative; margin-bottom: -6px;
}
.pikachu-body {
  position: absolute; inset: auto 0 0 0;
  height: 100px; margin: 0 auto; width: 110px;
  background: #ffcb05;
  border-radius: 55% 55% 45% 45%;
  border: 3px solid var(--ink);
  box-shadow: inset -8px -8px 0 rgba(0,0,0,0.08);
}
.pikachu-body::before,
.pikachu-body::after {
  content: ""; position: absolute; top: -22px;
  width: 24px; height: 40px;
  background: #ffcb05; border: 3px solid var(--ink);
  border-radius: 60% 60% 20% 20%;
}
.pikachu-body::before { left: 6px; transform: rotate(-18deg); }
.pikachu-body::after  { right: 6px; transform: rotate(18deg); }
.pikachu-body::before,
.pikachu-body::after {
  box-shadow: inset 0 -12px 0 rgba(0,0,0,0.55);
}
.pikachu-eye {
  position: absolute; top: 32px;
  width: 10px; height: 12px; background: var(--ink);
  border-radius: 50%;
}
.pikachu-eye.left { left: calc(50% - 26px); }
.pikachu-eye.right { left: calc(50% + 16px); }
.pikachu-eye::after {
  content: ""; position: absolute; top: 1px; right: 1px;
  width: 4px; height: 4px; background: #fff; border-radius: 50%;
}
.pikachu-cheek {
  position: absolute; top: 46px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #ff5959; border: 2px solid rgba(0,0,0,0.15);
}
.pikachu-cheek.left { left: calc(50% - 40px); }
.pikachu-cheek.right { left: calc(50% + 26px); }
.pikachu-mouth {
  position: absolute; top: 54px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 6px;
  border: 2px solid var(--ink);
  border-top: none;
  border-radius: 0 0 12px 12px;
}

/* Hero bar */
.hero-bar {
  max-width: 1200px; margin: 40px auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 22px; box-shadow: var(--shadow);
}
.hero-bar > div { display: flex; flex-direction: column; align-items: flex-start; }
.hero-bar b { font-family: var(--pixel); font-size: 18px; color: var(--red); letter-spacing: 0.3px; }
.hero-bar span { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* =========================================================================
   CATEGORIES
   ========================================================================= */
.cats { padding: 40px 22px; }
.cats-inner { max-width: 1200px; margin: 0 auto; }
.cats h2 {
  font-family: var(--pixel); font-size: 22px; margin: 0 0 24px;
}
.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.cat {
  background: #fff; border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px 18px; text-align: left;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
  display: flex; flex-direction: column; gap: 6px;
}
.cat:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.cat:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--ink); }
.cat-emoji { font-size: 34px; margin-bottom: 6px; }
.cat b { font-family: var(--pixel); font-size: 13px; }
.cat em { font-style: normal; font-size: 13px; color: var(--ink-3); }

/* =========================================================================
   RESULTS
   ========================================================================= */
.results { padding: 20px 22px 40px; }
.results-inner { max-width: 1200px; margin: 0 auto; }
.results-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.results h2 { font-family: var(--pixel); font-size: 20px; margin: 0; }
.results-sort { display: flex; align-items: center; gap: 8px; }
.results-sort label { font-size: 13px; color: var(--ink-2); }
.results-sort select {
  background: #fff; border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 10px; font-size: 14px;
}

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.product {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease;
}
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-img {
  aspect-ratio: 1;
  background: #ffffff no-repeat center / contain;
  border-bottom: 2px solid var(--ink);
  padding: 10px;
  box-sizing: border-box;
  transition: transform .3s ease;
  position: relative;
}
.product:hover .product-img { transform: scale(1.04) rotate(-1deg); }
.product-img::before {
  /* subtle checker pattern for empty state */
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  z-index: -1;
}
.product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 34px;
}
.product-price {
  display: flex; align-items: baseline; gap: 6px; margin-top: 4px;
}
.product-price b { font-family: var(--pixel); font-size: 14px; color: var(--red); }
.product-price em { font-style: normal; color: var(--ink-3); font-size: 12px; }
.product-cta {
  margin-top: 8px;
  background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 10px;
  padding: 8px 12px; font-weight: 800; font-size: 13px;
  box-shadow: 2px 2px 0 var(--ink);
}
.product-cta:hover { background: var(--yellow-dk); }
.product-cta:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

.results-foot { text-align: center; padding: 26px 0 0; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-2); padding: 40px 0; }

/* Loading state */
.skeleton {
  background: linear-gradient(90deg, #f4f0d8 25%, #faf6de 50%, #f4f0d8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* =========================================================================
   HOW IT WORKS
   ========================================================================= */
.how {
  background:
    linear-gradient(180deg, transparent 0, #fff8d6 40%, #fff8d6 100%);
  padding: 60px 22px;
  border-top: 1px solid var(--line);
}
.how-inner { max-width: 1200px; margin: 0 auto; }
.how h2 { font-family: var(--pixel); font-size: 22px; margin: 0 0 30px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 22px; box-shadow: 4px 4px 0 var(--ink);
}
.step-num {
  font-family: var(--pixel); font-size: 20px;
  color: var(--red);
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--ink);
  margin-bottom: 12px;
}
.step h3 { font-family: var(--pixel); font-size: 13px; margin: 0 0 8px; }
.step p { font-size: 14px; color: var(--ink-2); margin: 0; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.foot { padding: 40px 22px; border-top: 1px solid var(--line); background: #fff; }
.foot-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center;
}
.foot-brand { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.foot-links a:hover { color: var(--red); }
.foot small { color: var(--ink-3); font-size: 12px; max-width: 640px; }

/* =========================================================================
   MODAL
   ========================================================================= */
[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 20, 40, 0.5);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-inner {
  background: #fff; border-radius: var(--radius-lg); border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 26px; max-width: 480px; width: 100%;
  position: relative;
}
.modal-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 28px; color: var(--ink-3);
}
.modal-close:hover { color: var(--red); }
.modal h3 { font-family: var(--pixel); font-size: 16px; margin: 0 0 16px; }

/* =========================================================================
   MOBILE
   ========================================================================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-art { order: -1; margin-top: 8px; }
  .tcg-card { width: 220px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; }
  .hero-bar { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 30px; }
  .brand-text em { display: none; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-title { font-size: 12px; }
  .nav-inner { padding: 12px 16px; }
  .btn-ghost { padding: 8px 12px; font-size: 13px; }
  .token-chip { display: none; }
}

/* =========================================================================
   FUN v2 — Ticker, mobile bar, type-colored tiles, sparkles, playful mobile
   ========================================================================= */

/* -------- Live ticker under the nav -------- */
.ticker {
  overflow: hidden;
  background: linear-gradient(90deg, #ffcb05 0%, #ffd94d 50%, #ffcb05 100%);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  position: relative;
}
.ticker::before, .ticker::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2;
  pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, #ffcb05, transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, #ffcb05, transparent); }
.ticker-track {
  display: inline-flex; gap: 32px; padding: 8px 0;
  white-space: nowrap;
  animation: ticker-scroll 44s linear infinite;
}
.ticker-track span {
  font-family: var(--pixel); font-size: 10px; letter-spacing: 0.5px;
  color: var(--ink);
  display: inline-flex; align-items: center;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* -------- Type-colored category tiles (Fire/Water/Electric/Psychic) -------- */
.cat { position: relative; overflow: hidden; }
.type-badge {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--pixel); font-size: 8px;
  padding: 4px 8px; border-radius: 10px;
  border: 2px solid var(--ink);
  background: #fff; color: var(--ink);
  letter-spacing: 0.5px;
}
.cat-fire {
  background: linear-gradient(135deg, #ffe4b3 0%, #ffb877 100%);
}
.cat-fire .type-badge { background: #ee1515; color: #fff; }
.cat-water {
  background: linear-gradient(135deg, #cfe6ff 0%, #7aaef7 100%);
}
.cat-water .type-badge { background: #3b4cca; color: #fff; }
.cat-electric {
  background: linear-gradient(135deg, #fff4a3 0%, #ffcb05 100%);
}
.cat-electric .type-badge { background: #ffcb05; color: var(--ink); }
.cat-psychic {
  background: linear-gradient(135deg, #f2ceff 0%, #d194ff 100%);
}
.cat-psychic .type-badge { background: #b03fdb; color: #fff; }
.cat-emoji {
  font-size: 44px; margin-bottom: 8px;
  display: inline-block;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.15));
  animation: cat-bob 3.2s ease-in-out infinite;
}
.cat-fire .cat-emoji     { animation-delay: 0s; }
.cat-water .cat-emoji    { animation-delay: 0.4s; }
.cat-electric .cat-emoji { animation-delay: 0.8s; }
.cat-psychic .cat-emoji  { animation-delay: 1.2s; }
@keyframes cat-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-6px) rotate(3deg); }
}
.cat b { font-size: 14px; }
.cat em { color: rgba(31, 32, 65, 0.7); }
.cat:hover .cat-emoji { animation-duration: 1.2s; }

/* -------- Product image improvements — real photos fit the tile -------- */
.product { position: relative; overflow: hidden; }
.product-image, .product img {
  width: 100%; aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f8f8fb;
  border-bottom: 2px solid var(--ink);
  padding: 6px;
  transition: transform .3s ease;
}
.product:hover img { transform: scale(1.06) rotate(-1deg); }
.product::after {
  /* subtle holo sheen on hover */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  transform: translateX(-100%);
  pointer-events: none;
  transition: transform .6s ease;
}
.product:hover::after { transform: translateX(100%); }

/* -------- Sparkle burst on click -------- */
#sparkleLayer {
  position: fixed; inset: 0; pointer-events: none; z-index: 55;
}
.sparkle {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffcb05 40%, #ee1515 100%);
  box-shadow: 0 0 8px #ffcb05;
  animation: sparkle-fly .9s ease-out forwards;
}
@keyframes sparkle-fly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* -------- Mobile bottom nav (only visible on mobile) -------- */
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .mobile-bar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 50;
    background: #fff;
    border-top: 3px solid var(--ink);
    box-shadow: 0 -4px 0 rgba(31,32,65,0.15);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around; align-items: center;
    gap: 8px;
  }
  .mb-btn {
    background: none; border: none;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--ink); flex: 1;
    padding: 6px 0;
  }
  .mb-icon { font-size: 22px; }
  .mb-btn em { font-family: var(--pixel); font-size: 9px; font-style: normal; }
  .mb-search {
    background: var(--yellow); border: 3px solid var(--ink);
    border-radius: 999px; padding: 12px;
    width: 68px; height: 68px;
    justify-content: center;
    box-shadow: 0 4px 0 var(--ink);
    margin-top: -22px; /* pops up above the bar */
    flex: 0 0 auto;
    animation: search-pulse 2.4s ease-in-out infinite;
  }
  .mb-search .pokeball {
    width: 40px; height: 40px;
  }
  @keyframes search-pulse {
    0%, 100% { transform: translateY(0); box-shadow: 0 4px 0 var(--ink); }
    50%      { transform: translateY(-4px); box-shadow: 0 8px 0 var(--ink); }
  }
  /* Add breathing room at the bottom for the fixed bar */
  .foot { padding-bottom: 100px; }
}

/* -------- Mobile-specific "make it fun" tweaks -------- */
@media (max-width: 900px) {
  /* Bigger, more central Pikachu at the top of hero */
  .hero { padding: 20px 16px 30px; }
  .hero-art { margin-top: 0; margin-bottom: 8px; }
  .tcg-card {
    width: 260px;
    animation: card-float 4s ease-in-out infinite;
  }
  @keyframes card-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-8px) rotate(2deg); }
  }
  /* Big playful headline on mobile */
  h1 { font-size: 34px; line-height: 1.05; }
  .hl {
    padding: 4px 10px; display: inline-block;
    background: var(--red); color: #fff;
    transform: rotate(-2deg);
    box-shadow: 4px 4px 0 var(--yellow), 4px 4px 0 3px var(--ink);
  }
  /* Category tiles: 2x2 grid, taller, more pop */
  .cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .cat { padding: 20px 14px 32px; min-height: 130px; }
  .cat b { font-size: 12px; }
  .cat em { font-size: 11px; }
  .cat-emoji { font-size: 40px; }
  .type-badge { top: 6px; right: 6px; font-size: 7px; padding: 3px 6px; }

  /* Bigger product tiles on mobile */
  .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  .product-title { font-size: 12px !important; padding: 8px; line-height: 1.3; }
  .product-price { padding: 0 8px 10px; font-size: 14px; font-weight: 700; }
  .product .btn { margin: 0 8px 10px; font-size: 12px; padding: 8px; width: calc(100% - 16px); }

  /* Stat bar: 2x2 on mobile, chunkier */
  .hero-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-bar div {
    padding: 12px 10px;
    border-radius: 12px;
    border: 2px solid var(--ink);
    background: #fff;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .hero-bar b { font-size: 20px; }

  /* Chunky search bar */
  .search-box { border-width: 3px; box-shadow: 4px 4px 0 var(--ink); }
  .search-box input { font-size: 16px; padding: 14px 12px; } /* 16px prevents iOS zoom */
  .search-btn { padding: 12px 18px; font-size: 14px; }
}

/* =========================================================================
   BRAND MARK — PokMart Pokéball with "P" monogram (distinct from generic Pokéball)
   ========================================================================= */
.pokeball.brand-mark {
  --sz: 36px;
  /* keep top red, but the bottom half is subtle grey to feel "shop/receipt" not "toy" */
  background: linear-gradient(#ee1515 0 50%, #f5f5f7 50% 100%);
  border-width: 3px;
}
.pokeball.brand-mark::after {
  /* Bigger center circle to fit the P */
  width: calc(var(--sz) * 0.5);
  height: calc(var(--sz) * 0.5);
  background: var(--yellow);
  box-shadow: inset 0 0 0 3px #fff, 0 0 0 1px var(--ink);
}
.pokeball.brand-mark .pm-p {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  z-index: 3;
  font-family: var(--pixel);
  font-size: calc(var(--sz) * 0.34);
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.6);
}
/* Bigger size in the mobile bottom bar */
.mobile-bar .pokeball.brand-mark { --sz: 44px; }
.mobile-bar .pokeball.brand-mark .pm-p { font-size: 16px; }
