/* ═══════════════════════════════════════════════
   BESTO FRIENDO — STOREFRONT STYLES v2
   Filters, Wishlist, Enhanced Modal
   ═══════════════════════════════════════════════ */

/* --- TAB NAVIGATION --- */
.nav-tabs {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 50; display: flex;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px);
  padding: 4px; border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.tab-btn {
  background: transparent; border: none; color: rgba(255,255,255,0.6);
  padding: 10px 24px; border-radius: 25px;
  font-family: 'Quicksand', sans-serif; font-weight: 700;
  cursor: pointer; transition: 0.25s; text-transform: uppercase; font-size: 13px;
}
.tab-btn:hover { color: #fff; }
.tab-btn.active {
  background: var(--neon-pink); color: #fff;
  box-shadow: 0 0 15px rgba(255, 92, 141, 0.5);
}

/* --- TOP ACTIONS ROW --- */
.top-actions {
  position: absolute; top: 26px; right: 24px; z-index: 210;
  display: flex; align-items: center; gap: 10px;
  transition: right 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

/* ═══════════════════════════════════════════════
   MARKETPLACE VIEW — holistic layout
   ═══════════════════════════════════════════════ */
#market-view {
  position: absolute; inset: 0; z-index: 20;
  background: transparent; overflow-y: auto; overflow-x: hidden;
  padding: 90px 24px 40px;
  display: none;
  -webkit-overflow-scrolling: touch;
}
#market-view.active { display: block; }

.market-layout {
  display: flex;
  gap: 0;

}

.market-main {
  flex: 1;
  min-width: 0;
  padding-left: 28px;
  display: flex;
  gap: 20px;
}

.market-grid-wrap {
  flex: 1;
  min-width: 0;
}

.market-gacha-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

/* ── FILTER SIDEBAR ───────────────────────────── */
.filter-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding-right: 20px;
  box-sizing: content-box;
}

.filter-toggle {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7); padding: 10px 18px;
  border-radius: 10px; cursor: pointer;
  font-family: 'Quicksand', sans-serif; font-weight: 700;
  font-size: 13px; transition: 0.2s; margin-bottom: 16px;
  backdrop-filter: blur(8px); width: fit-content;
}
.filter-toggle:hover { background: rgba(255,255,255,0.06); color: #fff; }
.filter-toggle .filter-icon { transition: transform 0.3s; display: inline-block; }
.filter-toggle.open .filter-icon { transform: rotate(90deg); }

.filter-panel { display: none; }
.filter-panel.open { display: block; }
.filter-panel-inner { width: 220px; }

.filter-section { margin-bottom: 18px; }
.filter-section-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.35); margin-bottom: 8px; font-weight: 700;
}

.filter-search-wrap { position: relative; margin-bottom: 18px; }
.filter-search {
  width: 100%; padding: 9px 10px 9px 32px; box-sizing: border-box;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; border-radius: 8px; font-family: 'Quicksand', sans-serif;
  font-size: 12px; outline: none; transition: 0.2s;
}
.filter-search:focus {
  border-color: var(--neon-pink);
  box-shadow: 0 0 12px rgba(255,92,141,0.1);
}
.filter-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.3); font-size: 13px; pointer-events: none;
}

.filter-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-pill {
  padding: 4px 10px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.5); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: 0.2s;
  font-family: 'Quicksand', sans-serif;
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.filter-pill:hover {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
}
.filter-pill.active {
  border-color: var(--neon-pink);
  background: rgba(255,92,141,0.12);
  color: #fff;
}

.filter-color-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15); flex-shrink: 0;
}

.franchise-filter-input {
  width: 100%; padding: 7px 10px; box-sizing: border-box;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; border-radius: 6px; font-size: 11px;
  font-family: 'Quicksand', sans-serif; outline: none; margin-bottom: 6px;
}
.franchise-filter-input:focus { border-color: var(--neon-blue); }

.franchise-list {
  max-height: 110px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,92,141,0.35) rgba(255,255,255,0.05);
}
.franchise-list::-webkit-scrollbar { width: 6px; }
.franchise-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05); border-radius: 3px;
}
.franchise-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-pink), var(--neon-blue));
  border-radius: 3px;
}
.franchise-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff7aa8, #7aeaff);
}
.franchise-item {
  padding: 5px 8px; border-radius: 6px;
  font-size: 11px; color: rgba(255,255,255,0.5);
  cursor: pointer; transition: 0.15s;
}
.franchise-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.franchise-item.active {
  background: rgba(255,92,141,0.12); color: var(--neon-pink);
}

.price-range-row { display: flex; gap: 6px; align-items: center; }
.price-range-input {
  flex: 1; min-width: 0; padding: 7px 4px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); color: #fff;
  border-radius: 6px; font-size: 11px; text-align: center;
  font-family: 'Quicksand', sans-serif; outline: none; box-sizing: border-box;
}
.price-range-input:focus { border-color: var(--neon-blue); }
.price-range-sep { color: rgba(255,255,255,0.3); font-size: 11px; }

.filter-count {
  background: var(--neon-pink); color: #fff;
  font-size: 10px; min-width: 18px; height: 18px;
  border-radius: 9px; display: none;
  align-items: center; justify-content: center; font-weight: 700;
}
.filter-count.show { display: flex; }

.filter-clear {
  font-size: 11px; color: var(--neon-blue); cursor: pointer;
  font-weight: 600; padding: 6px 0; transition: 0.15s; display: none;
}
.filter-clear.show { display: block; }
.filter-clear:hover { color: #fff; }


/* ═══════════════════════════════════════════════
   PRODUCT CARDS
   ═══════════════════════════════════════════════ */
.market-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.market-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 16px;
  cursor: pointer; position: relative;
  animation: cardEnter 0.4s ease-out both;
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
              border-color 0.4s ease,
              box-shadow 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.market-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow:
    0 14px 36px rgba(255, 215, 0, 0.08),
    0 0 20px rgba(255, 215, 0, 0.04),
    inset 0 0 16px rgba(255, 215, 0, 0.02);
}
.market-card:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.12);
  transition-duration: 0.12s;
}

.market-card.just-added {
  border-color: var(--neon-green) !important;
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.2) !important;
  animation: none !important;
}

.card-img-container {
  aspect-ratio: 1 / 1; display: flex; align-items: center;
  justify-content: center; margin-bottom: 14px;
  border-radius: 10px; overflow: hidden;
  background: rgba(0,0,0,0.2); position: relative;
}
.card-img {
  max-height: 100%; max-width: 100%; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
              filter 0.4s ease;
}
.market-card:hover .card-img {
  transform: scale(1.03);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)) drop-shadow(0 0 12px rgba(255,215,0,0.15));
}

/* ── HEART / WISHLIST BUTTON ON CARDS ──────────── */
.card-heart {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5; transition: 0.2s;
  backdrop-filter: blur(4px);
}
.card-heart:hover { background: rgba(0,0,0,0.7); transform: scale(1.1); }

.card-heart svg {
  width: 18px; height: 18px; transition: 0.3s;
}
.card-heart .heart-outline { stroke: rgba(255,255,255,0.6); fill: none; stroke-width: 2; }
.card-heart .heart-filled { fill: var(--neon-pink); stroke: var(--neon-pink); stroke-width: 2; opacity: 0; transform: scale(0); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: center; }

.card-heart.active .heart-filled { opacity: 1; transform: scale(1); }
.card-heart.active .heart-outline { opacity: 0; }

/* Heart burst animation */
@keyframes heartBurst {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.card-heart.burst { animation: heartBurst 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* Heart particles */
.heart-particle {
  position: absolute; width: 6px; height: 6px;
  border-radius: 50%; background: var(--neon-pink);
  pointer-events: none; z-index: 10;
  animation: heartParticle 0.6s forwards;
}
@keyframes heartParticle {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0); }
}

.card-title {
  font-family: 'Fredoka', sans-serif; font-size: 18px;
  margin: 0 0 6px 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.card-meta {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 6px;
}
.card-price {
  font-size: 18px; color: var(--neon-pink); font-weight: 700;
}
.card-category {
  font-size: 11px; color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* Card tags (franchise, sizes preview) */
.card-tags {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px;
}
.card-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  background: rgba(255,92,141,0.1); color: rgba(255,92,141,0.7);
}
.card-tag.size-tag {
  background: rgba(92,225,255,0.08); color: rgba(92,225,255,0.6);
}

.btn-add-grid {
  width: 100%; background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: white; padding: 10px; border-radius: 50px;
  cursor: pointer; font-weight: 700; font-size: 13px;
  transition: all 0.3s; font-family: 'Quicksand', sans-serif;
  text-transform: uppercase; letter-spacing: 0.5px;
  position: relative; overflow: hidden;
}
.btn-add-grid::before {
  content: ''; position: absolute; inset: -1.5px; z-index: -1;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink), #D442FF, var(--neon-blue));
  background-size: 300% 300%;
  opacity: 0; transition: opacity 0.3s;
  animation: gridBtnShimmer 4s ease-in-out infinite;
}
.btn-add-grid::after {
  content: ''; position: absolute; top: 0; left: -100%; z-index: 1;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg);
  opacity: 0; transition: opacity 0.3s;
}
@keyframes gridBtnShimmer {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.market-card:hover .btn-add-grid:not(:disabled) {
  background: linear-gradient(135deg, rgba(92,225,255,0.15), rgba(212,66,255,0.15));
  border-color: transparent;
  box-shadow: 0 0 12px rgba(92,225,255,0.2), inset 0 0 12px rgba(92,225,255,0.06);
  color: #fff;
}
.market-card:hover .btn-add-grid:not(:disabled)::before {
  opacity: 1;
}
.market-card:hover .btn-add-grid:not(:disabled)::after {
  opacity: 1;
  animation: gridBtnSweep 3.5s ease-in-out infinite;
}
@keyframes gridBtnSweep {
  0%,75% { left: -100%; }
  100% { left: 150%; }
}
.btn-add-grid:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(92,225,255,0.25), rgba(212,66,255,0.25));
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 20px rgba(92,225,255,0.3), 0 0 40px rgba(212,66,255,0.15);
}
.btn-add-grid:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Sold out card ── */
.market-card.sold-out { opacity: 0.55; }
.market-card.sold-out:hover { transform: translateY(-2px); }
.market-card.sold-out .card-img-container::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(0,0,0,0.35); pointer-events: none; z-index: 2;
}
.card-sold-out-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  background: rgba(255, 42, 42, 0.85); color: #fff;
  font-weight: 800; font-size: 14px; letter-spacing: 2px;
  padding: 6px 18px; border-radius: 4px; z-index: 3;
  pointer-events: none; font-family: 'Quicksand', sans-serif;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.no-results-msg {
  grid-column: 1 / -1; text-align: center; padding: 60px 0;
  color: rgba(255,255,255,0.3); font-size: 15px;
}


/* ═══════════════════════════════════════════════
   WISHLIST DRAWER
   ═══════════════════════════════════════════════ */
.wishlist-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 360px; max-width: 90vw;
  background: #110b1f; z-index: 200;
  box-shadow: -10px 0 40px rgba(0,0,0,0.6);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.08);
}
.wishlist-drawer.open { transform: translateX(0); }

.wishlist-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wishlist-items {
  flex: 1; overflow-y: auto; padding: 16px 24px;
}
.wishlist-empty {
  text-align: center; color: #555; padding: 60px 0; font-size: 14px;
}
.wishlist-item {
  display: flex; gap: 12px; margin-bottom: 12px;
  background: rgba(255,255,255,0.04); padding: 10px;
  border-radius: 10px; align-items: center; cursor: pointer;
  transition: 0.2s;
}
.wishlist-item:hover { background: rgba(255,255,255,0.07); }
.wishlist-item img {
  width: 50px; height: 50px; object-fit: cover;
  border-radius: 6px; background: #000;
}
.wishlist-item-info { flex: 1; min-width: 0; }
.wishlist-item-name {
  font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wishlist-item-price { font-size: 12px; color: #888; margin-top: 2px; }
.wishlist-item-remove {
  background: none; border: none; color: #555;
  cursor: pointer; font-size: 16px; padding: 4px; transition: 0.15s;
}
.wishlist-item-remove:hover { color: var(--neon-red); }


/* ═══════════════════════════════════════════════
   CART DRAWER
   ═══════════════════════════════════════════════ */
.cart-trigger {
  background: rgba(0,0,0,0.5); border: 1px solid rgba(92, 225, 255, 0.4);
  color: #fff; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 22px; transition: 0.2s;
  position: relative; flex-shrink: 0;
}
.cart-trigger:hover {
  background: rgba(92, 225, 255, 0.1); border-color: var(--neon-blue);
}

.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--neon-red); color: white;
  font-size: 11px; min-width: 20px; height: 20px;
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-weight: bold; padding: 0 5px;
}

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 360px; max-width: 90vw;
  background: #110b1f; z-index: 200;
  box-shadow: -10px 0 40px rgba(0,0,0,0.6);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.08);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cart-header h2 { margin: 0; font-size: 20px; }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { text-align: center; color: #555; padding: 60px 0; font-size: 14px; }

.cart-item {
  display: flex; gap: 12px; margin-bottom: 12px;
  background: rgba(255,255,255,0.04); padding: 10px;
  border-radius: 10px; align-items: center;
}
.cart-item img {
  width: 50px; height: 50px; object-fit: cover;
  border-radius: 6px; background: #000;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-price { font-size: 12px; color: #888; margin-top: 2px; }
.cart-item-variant { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 2px; }
.cart-item-qty {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
}
.qty-sm {
  background: rgba(255,255,255,0.1); border: none; color: white;
  width: 22px; height: 22px; border-radius: 4px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: 0.15s;
}
.qty-sm:hover { background: var(--neon-blue); color: #000; }
.cart-item-remove {
  background: none; border: none; color: #555;
  cursor: pointer; font-size: 16px; padding: 4px; transition: 0.15s;
}
.cart-item-remove:hover { color: var(--neon-red); }

.cart-footer {
  border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 24px;
}
.total-row {
  display: flex; justify-content: space-between;
  font-size: 18px; font-weight: 700; margin-bottom: 16px;
}


/* ═══════════════════════════════════════════════
   PRODUCT DETAIL MODAL — 75% viewport
   ═══════════════════════════════════════════════ */
.product-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13, 8, 22, 0.95);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.product-modal-overlay.open { opacity: 1; pointer-events: auto; }

.product-modal-card {
  display: flex; gap: 40px;
  width: 90vw; max-width: 1100px;
  height: 75vh; max-height: 800px;
  flex-wrap: nowrap; align-items: stretch;
  background: rgba(26, 18, 48, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; overflow: hidden;
}

.pm-image-section {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-width: 0; padding: 40px;
  background: rgba(0,0,0,0.3);
}

.pm-image {
  width: 100%; max-height: calc(100% - 70px); object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.12));
  animation: pmFloat 6s ease-in-out infinite;
  flex: 1; min-height: 0;
}

/* ── GALLERY THUMBNAILS ─────────────────────── */
.pm-thumbnails {
  display: flex; gap: 8px; margin-top: 14px;
  justify-content: center; flex-shrink: 0;
  max-width: 100%; overflow-x: auto;
  padding: 4px 0;
}
.pm-thumb {
  width: 52px; height: 52px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.12);
  object-fit: cover; cursor: pointer;
  transition: 0.2s; opacity: 0.6;
  flex-shrink: 0; background: #000;
}
.pm-thumb:hover { opacity: 0.85; border-color: rgba(255,255,255,0.3); }
.pm-thumb.active {
  opacity: 1; border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(92,225,255,0.25);
}

/* ── CARD HOVER IMAGE CYCLER ─────────────────── */
.card-cycle-img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain; opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: opacity 0.35s ease;
  background: #151025;
}
.card-cycle-img.active {
  opacity: 1;
}
/* Hide the base image whenever an overlay is showing */
.card-img-container.cycling > .card-img {
  opacity: 0;
  transition: opacity 0.35s ease;
}
/* Cycle images follow the same hover zoom as the base */
.market-card:hover .card-cycle-img {
  transform: scale(1.03);
}
@keyframes pmFloat {
  0%   { transform: translate(0, 0) rotate(0deg); }
  20%  { transform: translate(3px, -8px) rotate(0.4deg); }
  40%  { transform: translate(-2px, -14px) rotate(-0.3deg); }
  60%  { transform: translate(4px, -6px) rotate(0.5deg); }
  80%  { transform: translate(-3px, -11px) rotate(-0.2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.pm-info-section {
  flex: 1; min-width: 320px; padding: 40px 40px 40px 0;
  overflow-y: auto; display: flex; flex-direction: column;
}
.pm-title {
  font-family: 'Fredoka', sans-serif; font-size: 36px;
  margin: 0 0 8px; line-height: 1.1;
}
.pm-price {
  font-size: 28px; color: var(--neon-pink);
  font-weight: 700; margin-bottom: 8px;
}
.pm-stock {
  font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 16px;
}
.pm-franchise {
  font-size: 12px; color: var(--neon-pink); opacity: 0.7;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.pm-desc {
  color: rgba(255,255,255,0.5); line-height: 1.6; font-size: 15px;
  border-left: 2px solid var(--neon-blue); padding-left: 14px;
  margin-bottom: 24px;
}

/* Size & Color selectors in modal */
.pm-variant-section { margin-bottom: 20px; }
.pm-variant-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4); margin-bottom: 8px;
}

.pm-size-pills, .pm-color-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pm-size-pill {
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent; color: rgba(255,255,255,0.6);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: 0.2s; font-family: 'Quicksand', sans-serif;
}
.pm-size-pill:hover { border-color: rgba(255,255,255,0.35); color: #fff; }
.pm-size-pill.active {
  border-color: var(--neon-blue); background: rgba(92,225,255,0.12);
  color: #fff; box-shadow: 0 0 10px rgba(92,225,255,0.15);
}

.pm-color-pill {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer; transition: 0.2s; position: relative;
}
.pm-color-pill:hover { border-color: rgba(255,255,255,0.4); transform: scale(1.1); }
.pm-color-pill.active {
  border-color: #fff; box-shadow: 0 0 12px rgba(255,255,255,0.2);
  transform: scale(1.1);
}
.pm-color-pill.active::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Modal heart */
.pm-heart {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.2s; flex-shrink: 0;
}
.pm-heart:hover { border-color: var(--neon-pink); background: rgba(255,92,141,0.08); }
.pm-heart svg { width: 22px; height: 22px; }
.pm-heart .heart-outline { stroke: rgba(255,255,255,0.5); fill: none; stroke-width: 2; }
.pm-heart .heart-filled { fill: var(--neon-pink); stroke: var(--neon-pink); stroke-width: 2; opacity: 0; transform: scale(0); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: center; }
.pm-heart.active .heart-filled { opacity: 1; transform: scale(1); }
.pm-heart.active .heart-outline { opacity: 0; }
.pm-heart.active { border-color: var(--neon-pink); }

.pm-controls {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: auto;
}
.qty-selector {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.08);
  padding: 6px 16px; border-radius: 30px; font-weight: 700;
}
.qty-btn {
  background: transparent; border: none; color: white;
  font-size: 18px; cursor: pointer; padding: 2px 4px; transition: 0.15s;
}
.qty-btn:hover { color: var(--neon-blue); }

.btn-modal-add {
  background: linear-gradient(135deg, var(--neon-blue), #2D5BFF);
  border: none; padding: 14px 36px; border-radius: 30px;
  color: white; font-weight: 800; text-transform: uppercase;
  cursor: pointer; font-size: 14px;
  font-family: 'Quicksand', sans-serif;
  box-shadow: 0 0 20px rgba(45, 91, 255, 0.3); transition: 0.2s;
  flex: 1;
}
.btn-modal-add:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(45, 91, 255, 0.5);
}

.pm-close {
  position: absolute; top: 24px; right: 24px;
  background: none; border: none; color: #555;
  font-size: 28px; cursor: pointer; z-index: 10;
  transition: 0.15s; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.pm-close:hover { color: white; background: rgba(255,255,255,0.1); }


/* ═══════════════════════════════════════════════
   ORDER HISTORY (in account panel)
   ═══════════════════════════════════════════════ */
.acct-orders-section {
  margin-top: 16px; flex: 1; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,92,141,0.3) rgba(255,255,255,0.05);
}
.acct-orders-section::-webkit-scrollbar { width: 6px; }
.acct-orders-section::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05); border-radius: 3px;
}
.acct-orders-section::-webkit-scrollbar-thumb {
  background: rgba(255,92,141,0.3); border-radius: 3px;
}
.acct-orders-section::-webkit-scrollbar-thumb:hover {
  background: rgba(255,92,141,0.5);
}
.acct-orders-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.3); margin-bottom: 10px;
}
.acct-order {
  background: rgba(255,255,255,0.04); border-radius: 10px;
  padding: 12px; margin-bottom: 8px;
}
.acct-order-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.acct-order-id { font-size: 11px; color: #666; }
.acct-order-status {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px;
}
.acct-order-status.paid { background: rgba(57,255,20,0.15); color: var(--neon-green); }
.acct-order-status.pending { background: rgba(92,225,255,0.15); color: var(--neon-blue); }
.acct-order-items {
  display: flex; gap: 6px; margin-bottom: 6px; overflow-x: auto;
}
.acct-order-thumb {
  width: 36px; height: 36px; border-radius: 6px;
  object-fit: cover; background: #000; flex-shrink: 0;
}
.acct-order-total {
  font-size: 14px; font-weight: 700; color: var(--neon-pink);
}
.acct-order-date {
  font-size: 11px; color: #555;
}
.acct-no-orders {
  text-align: center; color: #444; font-size: 13px; padding: 20px 0;
}


/* ═══════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════ */
.toast-msg {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--neon-green); color: #000;
  padding: 12px 24px; border-radius: 8px;
  font-weight: 700; font-size: 14px; z-index: 9999;
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  pointer-events: none; font-family: 'Quicksand', sans-serif;
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* ═══════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .product-modal-card {
    flex-direction: column; height: 90vh; max-height: none;
  }
  .pm-image-section { padding: 20px; max-height: 40vh; }
  .pm-thumbnails { gap: 6px; margin-top: 8px; }
  .pm-thumb { width: 40px; height: 40px; }
  .pm-info-section { min-width: 0; padding: 20px; }
  .pm-title { font-size: 28px; }
  .pm-price { font-size: 22px; }
  .market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-sidebar { width: 160px; }
  .market-main { padding-left: 20px; }
  .market-gacha-sidebar { width: 180px; }
}

@media (max-width: 600px) {
  .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .card-title { font-size: 15px; }
  .card-price { font-size: 15px; }
  .cart-drawer, .wishlist-drawer { width: 100vw; max-width: 100vw; }
  .market-layout { flex-direction: column; gap: 16px; }
  .filter-sidebar { width: 100%; border-right: none; padding-right: 0; border-bottom: 1px solid rgba(255,255,255,0.06); padding-bottom: 16px; }
  .filter-panel-inner { width: 100%; }
  .market-main { padding-left: 0; flex-direction: column; }
  .market-gacha-sidebar { width: 100%; position: static; order: -1; }
}


/* ════════════════════════════════════════════════
   FALLING BUGS SYSTEM
════════════════════════════════════════════════ */
#bugs-container {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 50;
  overflow: visible;
}

/* The wrapper is the clickable area — 3× the emoji size via padding */
.falling-bug-wrap {
  position: absolute; top: -80px;
  pointer-events: auto;
  
  user-select: none; display: inline-flex;
  align-items: center; justify-content: center;
  animation: bugFall linear forwards;
  border-radius: 50%;
  
  z-index: 51;
}


.falling-bug {
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
  transform-origin: center;
  display: block;
  pointer-events: none;
}

@keyframes bugFall {
  0%   { top: -80px; transform: translateX(0) rotate(0deg); }
  20%  { transform: translateX(var(--wb,40px)) rotate(18deg); }
  40%  { transform: translateX(0) rotate(-5deg); }
  60%  { transform: translateX(calc(var(--wb,40px) * -0.6)) rotate(14deg); }
  80%  { transform: translateX(10px) rotate(-8deg); }
  100% { top: 108vh; transform: translateX(0) rotate(0deg); }
}

.falling-bug.squashed {
  animation: bugSquash 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
  pointer-events: none;
}

@keyframes bugSquash {
  0%   { transform: scale(1,1); opacity: 1; }
  15%  { transform: scale(3.2, 0.10) rotate(3deg); }
  45%  { transform: scale(2.6, 0.06) rotate(-2deg); opacity: 0.85; }
  100% { transform: scale(3.0, 0.03); opacity: 0; }
}

.bug-splat {
  position: fixed; font-size: 32px; pointer-events: none;
  transform: translate(-50%, -50%);
  animation: splatPop 0.6s forwards; z-index: 31;
}
@keyframes splatPop {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(0.3) rotate(-20deg); }
  40%  { opacity: 1; transform: translate(-50%,-50%) scale(1.4) rotate(10deg); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(0.9) rotate(0deg); }
}

.bug-xp-pop {
  position: fixed; pointer-events: none;
  font-weight: 900; font-size: 16px;
  color: var(--neon-green); font-family: 'Fredoka', sans-serif;
  text-shadow: 0 0 12px var(--neon-green), 0 2px 4px rgba(0,0,0,0.6);
  transform: translateX(-50%); z-index: 32;
  animation: bugXpFloat 0.95s forwards;
}
@keyframes bugXpFloat {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(0.7); }
  30%  { opacity: 1; transform: translateX(-50%) translateY(-16px) scale(1.25); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-56px) scale(1.0); }
}


/* ════════════════════════════════════════════════
   GACHA FAB BUTTON (Player View)
════════════════════════════════════════════════ */
.gacha-fab {
  position: relative; z-index: 55;
  background: linear-gradient(135deg, #FFD700 0%, #FF8C00 60%, #FF5500 100%);
  border: 2px solid rgba(255,255,255,0.35);
  color: #1a0800; border-radius: 50px;
  padding: 13px 22px; font-size: 14px; font-weight: 900;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  font-family: 'Fredoka', sans-serif; letter-spacing: 1px;
  box-shadow: 0 4px 24px rgba(255,140,0,0.5), 0 0 0 0 rgba(255,215,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
  animation: gachaFabPulse 2.5s ease-in-out infinite;
}
.gacha-fab:hover {
  animation: none;
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 10px 36px rgba(255,140,0,0.7), 0 0 30px rgba(255,215,0,0.3);
}

@keyframes gachaFabPulse {
  0%,100% { transform: translateY(0); box-shadow: 0 4px 24px rgba(255,140,0,0.5), 0 0 0 0 rgba(255,215,0,0.35); }
  50%     { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(255,140,0,0.6), 0 0 0 12px rgba(255,215,0,0); }
}


/* ════════════════════════════════════════════════
   GACHA MARKET CARD (in grid)
════════════════════════════════════════════════ */
.gacha-market-card {
  background: linear-gradient(145deg, rgba(255,180,0,0.07), rgba(255,90,0,0.04));
  border: 1.5px dashed rgba(255,200,0,0.35);
  border-radius: 14px; padding: 20px 16px;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; min-height: 240px;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.35s cubic-bezier(0.19,1,0.22,1),
              border-color 0.3s, box-shadow 0.3s, background 0.3s;
  animation: cardEnter 0.4s ease-out both;
  position: relative; overflow: hidden;
}
.gacha-market-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(255,215,0,0.06), transparent 70%);
  pointer-events: none;
}
.gacha-market-card:hover {
  border-color: rgba(255,215,0,0.75);
  background: linear-gradient(145deg, rgba(255,180,0,0.13), rgba(255,90,0,0.08));
  transform: translateY(-7px);
  box-shadow: 0 16px 40px rgba(255,165,0,0.2), 0 0 24px rgba(255,215,0,0.08);
}

.gacha-mc-icon {
  font-size: 52px; line-height: 1;
  animation: gachaMcBob 2.2s ease-in-out infinite;
}
@keyframes gachaMcBob {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%     { transform: translateY(-8px) rotate(3deg); }
}
.gacha-mc-title {
  font-family: 'Fredoka', sans-serif; font-size: 22px;
  background: linear-gradient(90deg, #FFD700, #FF6B00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.gacha-mc-pips {
  display: flex; gap: 6px; margin: 2px 0;
}
.gmc-pip {
  width: 10px; height: 10px; border-radius: 50%;
  background: #FFD700; box-shadow: 0 0 6px rgba(255,215,0,0.6);
}
.gacha-mc-sub {
  font-size: 11px; color: rgba(255,255,255,0.45);
  text-align: center;
}
.gacha-mc-cta {
  font-size: 12px; font-weight: 700; color: #FFD700;
  padding: 6px 16px; border-radius: 20px;
  border: 1px solid rgba(255,215,0,0.3);
  background: rgba(255,215,0,0.07);
  margin-top: 4px; transition: 0.2s;
}
.gacha-market-card:hover .gacha-mc-cta {
  background: rgba(255,215,0,0.15);
  border-color: rgba(255,215,0,0.6);
}


/* ════════════════════════════════════════════════
   GACHA MODAL
════════════════════════════════════════════════ */
.gacha-overlay {
  position: fixed; inset: 0; z-index: 9900;
  background: rgba(8, 4, 18, 0.93);
  backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.gacha-overlay.open {
  opacity: 1; pointer-events: auto;
}

.gacha-card {
  background: linear-gradient(160deg, #1c0e3a 0%, #2a1550 50%, #1a0a2e 100%);
  border: 1px solid rgba(255, 200, 0, 0.25);
  border-radius: 22px; padding: 38px 36px 30px;
  width: 400px; max-width: 92vw;
  text-align: center; position: relative;
  box-shadow:
    0 0 80px rgba(255, 140, 0, 0.12),
    0 30px 70px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,215,0,0.1);
  transform: scale(0.88) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.19,1,0.22,1);
}
.gacha-overlay.open .gacha-card {
  transform: scale(1) translateY(0);
}

.gacha-close-btn {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: #554; font-size: 22px; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: 0.15s;
}
.gacha-close-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

.gacha-title {
  font-family: 'Fredoka', sans-serif; font-size: 30px; margin: 0 0 4px;
  background: linear-gradient(90deg, #FFE033, #FF8000, #FFE033);
  background-size: 200% 100%; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleShimmer 3s linear infinite;
}
@keyframes titleShimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.gacha-subtitle {
  font-size: 12px; color: rgba(255,255,255,0.4); margin: 0 0 20px;
}

/* Pips */
.gacha-chances {
  display: flex; gap: 10px; justify-content: center; margin-bottom: 6px;
}
.chance-pip {
  width: 16px; height: 16px; border-radius: 50%;
  transition: background 0.3s, box-shadow 0.3s;
}
.chance-pip.active {
  background: #FFD700; box-shadow: 0 0 10px rgba(255,215,0,0.7);
}
.chance-pip.used {
  background: #2a2040; box-shadow: none; border: 1px solid #3a3060;
}
.chance-label {
  font-size: 11px; color: rgba(255,255,255,0.35); margin-bottom: 20px;
}

/* Mystery Box */
.gacha-box-wrap {
  position: relative; width: 150px; margin: 0 auto 18px;
  cursor: pointer;
}
.mystery-box {
  width: 140px; position: relative;
  transition: transform 0.2s;
}
.gacha-box-wrap:hover .mystery-box:not(.shaking):not(.opened) {
  transform: scale(1.06) translateY(-3px);
}

.box-lid {
  width: 148px; height: 42px; margin-left: -4px;
  background: linear-gradient(135deg, #FFEE22 0%, #FF9500 100%);
  border-radius: 8px 8px 0 0;
  border: 2px solid rgba(255,255,255,0.3);
  border-bottom: none;
  display: flex; align-items: center; justify-content: center;
  transform-origin: left bottom;
  transition: transform 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative; z-index: 3;
  box-shadow: 0 -6px 18px rgba(255,165,0,0.3);
}
.lid-bow { font-size: 22px; line-height: 1; }

.box-body {
  width: 140px; height: 110px;
  background: linear-gradient(160deg, #FFD700 0%, #FF8C00 100%);
  border-radius: 0 0 12px 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top: none;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(255,140,0,0.4), inset 0 -6px 15px rgba(0,0,0,0.15);
}
.box-cross-h, .box-cross-v {
  position: absolute; background: rgba(255,255,255,0.28);
  pointer-events: none; transition: opacity 0.3s;
}
.box-cross-h { width: 100%; height: 4px; top: 50%; transform: translateY(-50%); }
.box-cross-v { height: 100%; width: 4px; left: 50%; transform: translateX(-50%); }
.box-question {
  font-size: 44px; font-weight: 900; color: rgba(255,255,255,0.92);
  font-family: 'Fredoka', sans-serif; z-index: 1;
  text-shadow: 0 3px 10px rgba(0,0,0,0.3);
  transition: opacity 0.2s;
}

/* Box animations */
.mystery-box.shaking {
  animation: gachaShake 0.1s ease-in-out infinite;
}
@keyframes gachaShake {
  0%,100% { transform: rotate(0deg) translateX(0); }
  25%     { transform: rotate(-5deg) translateX(-5px); }
  75%     { transform: rotate(5deg) translateX(5px); }
}

.mystery-box.opened .box-lid {
  transform: rotate(-115deg) translateX(-8px) translateY(-4px);
}
.mystery-box.opened .box-cross-h,
.mystery-box.opened .box-cross-v { opacity: 0; }
.mystery-box.opened .box-question { opacity: 0.2; }

/* Sparkle particles */
.box-sparkles {
  position: absolute; inset: 0; pointer-events: none; z-index: 10;
  top: 50%; left: 50%;
}
.sparkle-particle {
  position: absolute; font-size: 18px; top: 0; left: 0;
  animation: sparkleOut 0.8s cubic-bezier(0.22,0.61,0.36,1) forwards;
  pointer-events: none;
}
@keyframes sparkleOut {
  0%   { opacity: 1; transform: rotate(var(--sa)) translateX(0) scale(0.5); }
  60%  { opacity: 1; transform: rotate(var(--sa)) translateX(var(--sd)) scale(1.2); }
  100% { opacity: 0; transform: rotate(var(--sa)) translateX(var(--sd)) scale(0.6); }
}

/* Rewards */
.gacha-result {
  min-height: 52px; display: flex; align-items: center;
  justify-content: center; margin: 0 0 8px;
}
.reward-badge {
  padding: 10px 22px; border-radius: 30px;
  font-weight: 900; font-size: 14px;
  font-family: 'Fredoka', sans-serif; letter-spacing: 0.5px;
  animation: rewardPop 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes rewardPop {
  0%   { transform: scale(0) rotate(-6deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.reward-badge.common {
  background: rgba(92,225,255,0.1); color: #5CE1FF;
  border: 1px solid rgba(92,225,255,0.3);
}
.reward-badge.rare {
  background: rgba(212,66,255,0.12); color: #D442FF;
  border: 1px solid rgba(212,66,255,0.35);
  box-shadow: 0 0 20px rgba(212,66,255,0.15);
}
.reward-badge.epic {
  background: rgba(255,215,0,0.12); color: #FFD700;
  border: 1px solid rgba(255,215,0,0.4);
  box-shadow: 0 0 28px rgba(255,215,0,0.2);
  text-shadow: 0 0 12px rgba(255,215,0,0.5);
}

.gacha-hint {
  font-size: 12px; color: rgba(255,255,255,0.45); margin: 4px 0 0;
}

/* ── GACHA INVENTORY SLOTS ─────────────────── */
.gacha-inventory {
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 16px;
}
.gacha-inv-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.28); text-align: center; margin-bottom: 10px;
}



/* ════════════════════════════════════════════════
   GACHA PLAYER ROW (FAB + inline inventory)
════════════════════════════════════════════════ */
#gacha-player-row {
  position: fixed; bottom: 24px; right: 24px; z-index: 55;
  display: flex; align-items: center; gap: 10px;
}

/* ── Market card inventory ─────────────────── */
.gacha-inv-market-wrap {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  width: 100%;
}
.ginv-market-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.25); text-align: center; margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════
   CHECKOUT MODAL
══════════════════════════════════════════════════ */
.co-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(8, 4, 18, 0.88);
  backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.co-overlay.open { opacity: 1; pointer-events: auto; }

.co-card {
  background: #110b1f;
  border: 1px solid rgba(255, 92, 141, 0.2);
  border-radius: 20px;
  width: 100%; max-width: 540px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 0 60px rgba(255, 92, 141, 0.12), 0 30px 80px rgba(0,0,0,0.6);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}
.co-overlay.open .co-card { transform: translateY(0) scale(1); }

.co-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255, 92, 141, 0.04);
  flex-shrink: 0;
  border-radius: 20px 20px 0 0;
}
.co-header-left { display: flex; align-items: center; gap: 12px; }
.co-icon { font-size: 26px; line-height: 1; }
.co-title { font-family: 'Fredoka', sans-serif; font-size: 22px; font-weight: 600; color: #fff; line-height: 1; }
.co-subtitle { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 3px; }
.co-close {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); width: 34px; height: 34px; border-radius: 50%;
  font-size: 16px; cursor: pointer; transition: 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.co-close:hover { background: rgba(255,42,42,0.2); border-color: var(--neon-red); color: var(--neon-red); }

.co-body {
  flex: 1; overflow-y: auto; padding: 8px 0;
  scrollbar-width: thin; scrollbar-color: rgba(255,92,141,0.3) transparent;
}
.co-body::-webkit-scrollbar { width: 4px; }
.co-body::-webkit-scrollbar-thumb { background: rgba(255,92,141,0.3); border-radius: 4px; }

.co-section { padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.co-section:last-child { border-bottom: none; }
.co-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: rgba(255,255,255,0.35); margin-bottom: 12px;
}

.co-fields { display: flex; flex-direction: column; gap: 10px; }
.co-fields-row { display: flex; gap: 10px; }
.co-fields-row .co-field-group { flex: 1; }
.co-field-group { display: flex; flex-direction: column; gap: 5px; }
.co-label { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 600; }
.co-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: #fff;
  font-family: 'Quicksand', sans-serif; font-size: 14px;
  padding: 10px 14px; outline: none; transition: 0.2s; width: 100%;
  box-sizing: border-box;
}
.co-input:focus { border-color: var(--neon-pink); background: rgba(255,92,141,0.06); box-shadow: 0 0 0 3px rgba(255,92,141,0.12); }
.co-input::placeholder { color: rgba(255,255,255,0.2); }
.co-input[readonly] { cursor: default; color: var(--neon-blue); }
.co-input[readonly]:focus { border-color: var(--neon-blue); box-shadow: 0 0 0 3px rgba(92,225,255,0.12); background: rgba(92,225,255,0.04); }

.co-ship-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.co-ship-btn {
  background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 14px 12px; color: rgba(255,255,255,0.55);
  cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: 'Quicksand', sans-serif;
}
.co-ship-btn:hover { border-color: rgba(255,92,141,0.4); background: rgba(255,92,141,0.06); color: #fff; }
.co-ship-btn.active { background: rgba(255,92,141,0.12); border-color: var(--neon-pink); color: #fff; box-shadow: 0 0 18px rgba(255,92,141,0.15); }
.co-ship-icon { font-size: 22px; line-height: 1; }
.co-ship-name { font-size: 14px; font-weight: 700; }
.co-ship-desc { font-size: 11px; opacity: 0.6; text-align: center; }
.co-ship-btn.active .co-ship-desc { opacity: 0.8; }

.co-map-hint { font-size: 12px; color: rgba(255,255,255,0.35); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
#co-leaflet-map { width: 100%; height: 180px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 10px; }
.co-map-addr-row { display: flex; align-items: center; gap: 8px; }
.co-map-addr-pin { font-size: 18px; flex-shrink: 0; }
.co-addr-input { flex: 1; }
.co-addr-search-wrap { position: relative; margin-bottom: 10px; }
.co-addr-suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1100;
  background: #1a1230; border: 1px solid rgba(255,92,141,0.25);
  border-top: none; border-radius: 0 0 10px 10px;
  max-height: 200px; overflow-y: auto;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.co-addr-suggestions.open { display: block; }
.co-addr-suggestion {
  padding: 10px 14px; font-size: 13px; color: #ccc;
  cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
  line-height: 1.4;
}
.co-addr-suggestion:last-child { border-bottom: none; }
.co-addr-suggestion:hover { background: rgba(255,92,141,0.1); color: #fff; }
.co-addr-suggestion .co-addr-sug-main { font-weight: 600; color: #fff; }
.co-addr-suggestion .co-addr-sug-secondary { font-size: 11px; color: #888; margin-top: 1px; }
.co-addr-searching { padding: 12px 14px; font-size: 12px; color: #666; text-align: center; }
.co-addr-no-results { padding: 12px 14px; font-size: 12px; color: #888; text-align: center; }

.co-suc-note {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px;
  padding: 10px 14px; background: rgba(92,225,255,0.06);
  border: 1px solid rgba(92,225,255,0.15); border-radius: 10px;
  font-size: 12px; color: rgba(92,225,255,0.8); line-height: 1.5;
}

.co-footer { padding: 20px 24px; border-top: 1px solid rgba(255,255,255,0.07); background: rgba(255,92,141,0.03); flex-shrink: 0; border-radius: 0 0 20px 20px; }
.co-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.co-total-label { font-size: 14px; color: rgba(255,255,255,0.5); font-weight: 600; }
.co-total-amount {
  font-size: 26px; font-weight: 700; font-family: 'Fredoka', sans-serif;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.co-total-prices { display: flex; align-items: baseline; gap: 10px; }
.co-total-original {
  font-size: 15px; color: rgba(255,255,255,0.3); text-decoration: line-through;
  font-family: 'Fredoka', sans-serif; font-weight: 500;
}
.co-confirm-btn {
  width: 100%; padding: 15px 24px;
  background: linear-gradient(135deg, var(--neon-pink), #c040a0);
  border: none; border-radius: 14px; color: #fff;
  font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 16px;
  cursor: pointer; transition: 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(255,92,141,0.35); letter-spacing: 0.5px;
}
.co-confirm-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,92,141,0.5); }
.co-confirm-btn:active { transform: translateY(0); }
.co-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.co-confirm-arrow { font-size: 18px; transition: transform 0.2s; }
.co-confirm-btn:hover .co-confirm-arrow { transform: translateX(4px); }

@media (max-width: 480px) {
  .co-overlay { padding: 0; align-items: flex-end; }
  .co-card { max-height: 100vh; max-height: 100dvh; border-radius: 16px 16px 0 0; }
  .co-fields-row { flex-direction: column; }
  #co-leaflet-map { height: 180px; }
}
