/* ========== Shop CSS - Obsidian Pulse Redesign (v3 Soft) ========== */
/* Fixes: letter g/y cutoff via proper line-height + Inter font */
/* Aesthetic: warm dark obsidian, soft teal accent, editorial precision */
/* Typography: Inter (display+body) + Noto Sans SC (CJK) */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap');

:root {
  /* -- Palette (v4 Soft Twilight — warm dark, muted accents) -- */
  --bg-primary: #13141d;
  --bg-surface: #1a1b28;
  --bg-elevated: #22243a;
  --bg-card: rgba(26, 27, 40, 0.78);
  --bg-card-hover: rgba(34, 36, 58, 0.88);
  --bg-modal: #1a1b28;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(139, 162, 220, 0.22);
  --border-glow: rgba(139, 162, 220, 0.1);
  --text-primary: #dfe1ea;
  --text-secondary: #a0a3b8;
  --text-muted: #6e7190;
  --accent: #8ba2dc;
  --accent-light: #a4b8e8;
  --accent-glow: rgba(139, 162, 220, 0.1);
  --accent-subtle: rgba(139, 162, 220, 0.05);
  --accent-purple: #b49cef;
  --accent-purple-glow: rgba(180, 156, 239, 0.12);
  --success: #6dd4a0;
  --warning: #e8c46a;
  --danger: #e07878;
  --price-color: #e8c46a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  /* Inter has compact descenders, no g/y clipping */
  --font-display: 'Sora', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Mobile tap highlight removal for better touch UX */
a, button, label, input, select, textarea, [onclick] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  /* KEY FIX: generous global line-height prevents descender clipping */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent pinch-to-zoom on mobile */
  touch-action: manipulation;
}

/* Noise texture overlay on body */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: -1;
}

#app { position: relative; z-index: 1; }

/* ================================================================
   ANNOUNCEMENT POPUP -- centered modal, glassmorphism
   ================================================================ */
.announcement-bar {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 18, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: announceFadeIn 0.35s ease;
  flex-direction: column;
}
@keyframes announceFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes announcePop {
  from { opacity: 0; transform: translateY(28px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.announcement-popup {
  background: linear-gradient(145deg, rgba(30, 32, 52, 0.95), rgba(22, 23, 38, 0.98));
  border: 1px solid rgba(139, 162, 220, 0.15);
  border-radius: 20px;
  max-width: 460px;
  width: 100%;
  padding: 32px 28px 24px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(139, 162, 220, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: announcePop 0.45s var(--ease-out-expo) 0.1s both;
  position: relative;
  overflow: hidden;
}
/* Top accent line */
.announcement-popup::before { display: none; }
/* Subtle glow orb */
.announcement-popup::after {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(139, 162, 220, 0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.announcement-popup-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
  position: relative;
}
.announcement-popup-title .announcement-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.announcement-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}
.announcement-icon { font-size: 1.1rem; flex-shrink: 0; }
.announcement-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.75;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px 18px;
  width: 100%;
  word-break: break-word;
  position: relative;
}
.announcement-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  position: relative;
}
.announcement-dismiss-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
}
.announcement-dismiss-label:hover { color: var(--text-secondary); }
.announcement-dismiss-label input {
  width: 15px; height: 15px; cursor: pointer;
  border-radius: 4px;
}
.announcement-close {
  background: var(--accent);
  border: none;
  color: var(--bg-primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  transition: all 0.25s var(--ease-out-expo);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
}
.announcement-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 162, 220, 0.2);
}

/* ================================================================
   NAVIGATION �?Desktop: top bar / Mobile: bottom tab bar
   ================================================================ */
.shop-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 14, 24, 0.88);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  transition: background 0.3s;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  gap: 12px;
  height: 60px;
  min-width: 0;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 800;
  color: var(--accent);
  letter-spacing: 0;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  white-space: nowrap;
  flex-shrink: 0;
  /* KEY FIX: explicit line-height and padding to prevent g/y clipping */
  line-height: 1.5;
  padding: 4px 0;
}
.nav-brand:hover { opacity: 0.75; }

.nav-links {
  display: flex; gap: 4px;
  flex: 1; min-width: 0;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  position: relative;
  scroll-behavior: smooth;
}
.nav-links::-webkit-scrollbar { display: none; }

/* Scroll hint arrow �?shown when nav overflows */
.nav-scroll-hint {
  display: none;
  position: absolute;
  right: -2px; top: 50%; transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 900;
  animation: scrollHintGlide 2.2s var(--ease-out-expo) 2;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 0 8px var(--accent-glow);
  filter: drop-shadow(0 0 4px rgba(139, 162, 220, 0.25));
  /* Visible on all viewports when nav overflows �?controlled by JS */
}
@keyframes scrollHintGlide {
  0%   { opacity: 0; transform: translateY(-50%) translateX(0); }
  18%  { opacity: 1; transform: translateY(-50%) translateX(0); }
  68%  { opacity: 1; transform: translateY(-50%) translateX(-16px); }
  100% { opacity: 0; transform: translateY(-50%) translateX(-16px); }
}
.nav-link {
  color: var(--text-muted); text-decoration: none;
  padding: 8px 14px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.25s var(--ease-out-expo);
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  /* KEY FIX: line-height for descenders */
  line-height: 1.5;
}
.nav-link.nav-announcement { appearance:none; border:0; background:transparent; font:inherit; cursor:pointer; }
.nav-link::after {
  content: '';
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.3s var(--ease-out-expo);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { transform: translateX(-50%) scaleX(.78); }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { transform: translateX(-50%) scaleX(1); }

/* ── Auth buttons ── */
.nav-auth, .nav-user {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.nav-auth-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 7px 16px; border-radius: 8px;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
  letter-spacing: 0.3px;
  transition: all 0.25s var(--ease-out-expo);
  white-space: nowrap;
  line-height: 1.5;
}
.nav-auth-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.nav-auth-btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #13141d;
  font-weight: 700;
}
.nav-auth-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow), 0 0 0 1px var(--accent);
}
.nav-username {
  color: var(--accent-light);
  font-size: 0.8rem; font-weight: 600;
  max-width: 90px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.5;
}
.nav-balance {
  color: var(--warning);
  font-size: 0.8rem; font-weight: 700;
  line-height: 1.5;
}
.nav-points {
  color: var(--success) !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  line-height: 1.5;
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.shop-hero {
  position: relative;
  text-align: center;
  padding: 60px 24px 40px;
  overflow: visible; /* KEY FIX: no clipping */
}

/* Animated mesh gradient */
.shop-hero::before {
  content: '';
  position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 45% 45% at 20% 50%, rgba(139, 162, 220, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 30%, rgba(180, 156, 239, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(232, 196, 106, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 30% 30% at 60% 20%, rgba(139, 162, 220, 0.06) 0%, transparent 50%);
  pointer-events: none;
  animation: meshFloat 12s ease-in-out infinite alternate;
}

/* Floating orb */
.shop-hero::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  top: -80px; right: -60px;
  background: radial-gradient(circle, rgba(139, 162, 220, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: orbFloat 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes meshFloat {
  0% { transform: rotate(0deg); opacity: 0.7; }
  50% { transform: rotate(2deg); opacity: 1; }
  100% { transform: rotate(-1deg); opacity: 0.8; }
}

@keyframes orbFloat {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-20px, 14px); }
}

.shop-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0;
  /* KEY FIX: generous line-height + padding ensures descenders never clip */
  line-height: 1.3;
  padding-bottom: 8px;
  margin-bottom: 10px;
  position: relative;
  animation: heroTitle 0.9s var(--ease-out-expo) both;
  overflow: visible;
}

.shop-hero p {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 6px;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.6;
  position: relative;
  animation: heroSub 0.9s var(--ease-out-expo) 0.12s both;
}

@keyframes heroTitle {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes heroSub {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   SEARCH BAR
   ================================================================ */
.shop-search-bar {
  max-width: 460px; margin: 0 auto 36px;
  position: relative;
  animation: heroSub 0.9s var(--ease-out-expo) 0.2s both;
}
.shop-search-bar input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 20px 14px 48px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.5;
  transition: all 0.3s var(--ease-out-expo);
}
.shop-search-bar input::placeholder { color: var(--text-muted); font-weight: 400; }
.shop-search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow), 0 8px 32px rgba(139, 162, 220, 0.06);
  background: rgba(139, 162, 220, 0.02);
}
.shop-search-bar::before {
  content: '�?;
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.15rem; color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s;
}
.shop-search-bar:focus-within::before { color: var(--accent); }

/* ================================================================
   GROUP TABS
   ================================================================ */
.group-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto 32px; padding: 0 28px;
  animation: heroSub 0.9s var(--ease-out-expo) 0.25s both;
}
.group-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 20px; border-radius: 100px;
  cursor: pointer;
  font-size: 0.8rem; font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.4px;
  line-height: 1.5;
  transition: all 0.3s var(--ease-out-expo);
}
.group-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
  background: var(--accent-subtle);
}
.group-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #13141d;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ================================================================
   PRODUCTS GRID
   ================================================================ */
.shop-products {
  max-width: 1200px; margin: 0 auto;
  padding: 0 28px 100px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Product Card ── */
.product-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: all 0.4s var(--ease-out-expo);
  animation: cardReveal 0.6s var(--ease-out-expo) both;
  /* KEY FIX: overflow visible so text is never clipped */
  overflow: visible;
  /* Isolate stacking context so card content never bleeds above modal */
  isolation: isolate;
}

/* Animated gradient border on hover */
.product-card::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--accent) 50%, var(--accent-purple) 60%, transparent 70%);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s, background-position 0.6s;
  pointer-events: none;
  z-index: -1;
}

.product-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.25),
    0 0 48px rgba(139, 162, 220, 0.03);
}
.product-card:hover::before {
  opacity: 1;
  animation: borderGlow 3s linear infinite;
}

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

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stagger cards */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.4s; }
.product-card:nth-child(9) { animation-delay: 0.45s; }
.product-card:nth-child(10) { animation-delay: 0.5s; }
.product-card:nth-child(11) { animation-delay: 0.55s; }
.product-card:nth-child(12) { animation-delay: 0.6s; }

.product-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.product-group-tag {
  background: var(--accent-subtle);
  color: var(--accent);
  padding: 5px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(139, 162, 220, 0.1);
  line-height: 1.4;
}
.product-stock {
  font-size: 0.72rem; color: var(--success); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  line-height: 1.4;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.12rem; font-weight: 700;
  margin-bottom: 8px;
  /* KEY FIX: proper line-height for g/y/p/q descenders */
  line-height: 1.5;
  letter-spacing: 0;
  overflow: visible;
}
.product-attrs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px;
}
.attr-tag {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  padding: 4px 10px; border-radius: 100px;
  font-size: 0.7rem; font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.5;
}
.product-labels,.buy-product-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 10px}.product-labels span,.product-label{display:inline-flex;min-height:22px;align-items:center;padding:3px 7px;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:5px;font-size:.68rem;font-weight:600;line-height:1.35}.buy-product-meta{margin:10px 0 14px}.buy-product-meta .product-group-tag{padding:3px 8px;border-radius:5px}.buy-product-meta .product-stock{margin-left:auto;padding:3px 7px;border:1px solid color-mix(in srgb,var(--success) 28%,var(--border));border-radius:5px}.buy-product-meta .product-stock.stock-low{color:var(--warning);border-color:color-mix(in srgb,var(--warning) 28%,var(--border))}
.product-desc {
  color: var(--text-muted); font-size: 0.84rem;
  line-height: 1.65; margin-bottom: 16px; flex: 1;
  font-weight: 400;
}

.product-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.product-price {
  color: var(--price-color); font-weight: 800;
  line-height: 1.5;
}
.price-num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1.4;
}

.btn-buy {
  background: var(--accent);
  color: #13141d; border: none;
  padding: 10px 24px; border-radius: 10px;
  font-weight: 700; font-size: 0.82rem;
  cursor: pointer; font-family: var(--font-body);
  letter-spacing: 0.3px;
  line-height: 1.5;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  z-index: 2;
  /* Ensure minimum touch target for mobile */
  min-height: 44px;
  min-width: 44px;
}
.btn-buy::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
  pointer-events: none;
}
.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow), 0 0 0 1px var(--accent);
}
.btn-buy:hover::after { transform: translateX(100%); }
.btn-buy:active { transform: scale(0.97); }
.btn-buy:disabled {
  opacity: 0.25; cursor: not-allowed;
  transform: none; box-shadow: none;
}

/* ================================================================
   MODAL
   ================================================================ */
.shop-modal-overlay {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  background: rgba(6, 6, 11, 0.75);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  z-index: 9990;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: overlayIn 0.2s ease;
  /* Ensure overlay captures all interactions */
  isolation: isolate;
}
.shop-modal {
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%; max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto; position: relative;
  z-index: 9991;
  animation: modalSlideIn 0.45s var(--ease-out-expo);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(139, 162, 220, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  /* Prevent scrolling bleed-through on iOS */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(32px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes mobileModalSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close-btn {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 40px; height: 40px;
  border-radius: 50%; font-size: 0.9rem;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  /* Ensure touch target is large enough */
  min-width: 44px; min-height: 44px;
}
.modal-close-btn:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
  color: var(--danger);
  transform: rotate(90deg);
}

/* ── Buy Modal ── */
.buy-modal {
  padding: 32px;
}
/* Mobile drag handle indicator */
.buy-modal::before {
  content: '';
  display: none;
  width: 48px; height: 5px;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
  margin: 0 auto 4px;
}
/* Swipe hint text �?injected as first child in mobile buy modal */
.swipe-hint {
  display: none;
  text-align: center;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 2px;
  margin-bottom: 10px;
  user-select: none;
}
.buy-header { margin-bottom: 20px; }
.buy-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
  /* KEY FIX */
  line-height: 1.5;
  overflow: visible;
}
.buy-price {
  color: var(--price-color);
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  line-height: 1.4;
}
.buy-desc {
  color: var(--text-secondary); font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 16px; border-radius: 12px;
  margin-bottom: 16px; line-height: 1.7;
}
.buy-instructions {
  margin-bottom: 20px; padding: 16px;
  background: rgba(52, 211, 153, 0.04);
  border: 1px solid rgba(52, 211, 153, 0.1);
  border-radius: 12px;
  font-size: 0.86rem; color: var(--text-secondary);
  line-height: 1.7;
}
.buy-instructions h4 {
  color: var(--success); margin-bottom: 8px;
  font-size: 0.9rem; font-family: var(--font-display);
  line-height: 1.5;
}

.buy-form { display: flex; flex-direction: column; gap: 18px; }

.form-field label {
  display: block; font-size: 0.82rem; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 8px;
  letter-spacing: 0.5px; text-transform: uppercase;
  line-height: 1.5;
}
.form-field .required { color: var(--danger); }
.form-field .optional {
  color: var(--text-muted); font-weight: 400;
  font-size: 0.74rem; text-transform: none;
}

.form-field input[type="email"],
.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="number"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.5;
  transition: all 0.3s var(--ease-out-expo);
}
.form-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: rgba(139, 162, 220, 0.02);
}
.form-field input::placeholder { color: var(--text-muted); font-weight: 400; }

/* ── Select / Dropdown styling ── */
.form-field select,
select.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 40px 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.5;
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
  /* Custom dropdown arrow */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b8b9e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  min-height: 44px; /* Touch target */
}
.form-field select:focus,
select.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background-color: rgba(139, 162, 220, 0.02);
}
.form-field select option {
  background: var(--bg-modal);
  color: var(--text-primary);
  padding: 8px;
}

/* Quantity controls */
.qty-control {
  display: flex; align-items: center; gap: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  width: fit-content;
  transition: border-color 0.3s;
}
.qty-control:focus-within { border-color: var(--accent); }
.qty-btn {
  background: transparent; border: none;
  color: var(--text-primary);
  width: 48px; height: 48px; font-size: 1.2rem;
  cursor: pointer; font-family: var(--font-body);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  /* Minimum touch target */
  min-width: 44px; min-height: 44px;
  flex-shrink: 0;
}
.qty-btn:hover { background: rgba(139, 162, 220, 0.08); color: var(--accent); }
.qty-control input[type="number"] {
  width: 56px; text-align: center; border: none;
  background: transparent; color: var(--text-primary);
  font-size: 0.95rem; font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.5;
  -moz-appearance: textfield;
  height: 48px;
  padding: 0;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stock-hint {
  font-size: 0.77rem; color: var(--text-muted);
  margin-top: 6px; display: block; font-weight: 500;
  line-height: 1.5;
}

/* ── Pay Methods ── */
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-option {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 12px 18px; border-radius: 12px;
  cursor: pointer; transition: all 0.3s var(--ease-out-expo);
  flex: 1; min-width: 140px;
  position: relative;
  line-height: 1.5;
}
.pay-option:hover {
  border-color: var(--border-hover);
  background: var(--accent-subtle);
}
.pay-option.selected {
  border-color: var(--accent);
  background: rgba(139, 162, 220, 0.06);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 4px 16px rgba(139, 162, 220, 0.06);
}
.pay-option input { display: none; }
.pay-icon { font-size: 1.3rem; line-height: 1; }

.buy-total {
  text-align: right; font-size: 0.92rem;
  color: var(--text-secondary);
  padding: 16px 0;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.total-price {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800;
  color: var(--price-color);
  margin-left: 8px;
  line-height: 1.4;
}

.btn-submit-order {
  background: var(--accent);
  color: #13141d; border: none;
  padding: 14px; border-radius: 12px;
  font-size: 0.95rem; font-weight: 800;
  cursor: pointer; font-family: var(--font-body);
  letter-spacing: 0.3px;
  line-height: 1.5;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  /* Touch-friendly minimum */
  min-height: 48px;
  width: 100%;
}
.btn-submit-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px var(--accent-glow), 0 0 0 1px var(--accent);
}
.btn-submit-order:active { transform: scale(0.98); }
.btn-submit-order:disabled { opacity: 0.35; cursor: wait; transform: none; box-shadow: none; }

/* ================================================================
   ORDER RESULT
   ================================================================ */
.order-result {
  max-width: 600px; margin: 56px auto; padding: 0 28px;
}
.order-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px; text-align: center;
  animation: modalSlideIn 0.5s var(--ease-out-expo);
  position: relative;
  overflow: visible;
}
/* Subtle shimmer */
.order-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-purple), transparent);
  opacity: 0.5;
}
.order-status-icon {
  font-size: 3.2rem; margin-bottom: 12px;
  animation: statusReveal 0.5s var(--ease-out-expo);
  line-height: 1.2;
}
.order-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  margin-bottom: 28px; letter-spacing: 0;
  line-height: 1.5;
}

.order-details {
  text-align: left; margin-bottom: 28px;
}
.detail-row {
  display: flex; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.5;
  align-items: center;
}
.detail-row span:first-child { color: var(--text-secondary); font-weight: 500; }
.detail-row .mono {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  letter-spacing: 0.8px; font-weight: 700; font-size: 0.82rem;
  color: var(--accent-light);
  line-height: 1.5;
}
.detail-row .price { color: var(--price-color); font-weight: 800; }

/* ── Delivered section ── */
.delivered-section {
  background: rgba(52, 211, 153, 0.04);
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: 14px; padding: 20px;
  text-align: left; margin-bottom: 20px;
}
.delivered-section h3 {
  color: var(--success); margin-bottom: 12px;
  font-size: 0.95rem; font-family: var(--font-display);
  line-height: 1.5;
}
.card-list { display: flex; flex-direction: column; gap: 8px; }
.card-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s;
}
.card-item:hover { border-color: var(--border-hover); }
.card-index { color: var(--text-muted); font-size: 0.75rem; font-weight: 700; line-height: 1.5; }
.card-data {
  flex: 1;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem; color: var(--text-primary);
  word-break: break-all;
  line-height: 1.6;
}
.btn-copy {
  background: rgba(139, 162, 220, 0.1);
  border: 1px solid rgba(139, 162, 220, 0.15);
  color: var(--accent); padding: 6px 14px;
  border-radius: var(--radius-xs); font-size: 0.72rem;
  cursor: pointer; font-family: var(--font-body);
  font-weight: 600; letter-spacing: 0.3px;
  line-height: 1.5;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-copy:hover {
  background: rgba(139, 162, 220, 0.2);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-copy-all {
  background: rgba(139, 162, 220, 0.06);
  border: 1px solid rgba(139, 162, 220, 0.15);
  color: var(--accent); padding: 12px 20px;
  border-radius: 10px; font-size: 0.86rem;
  cursor: pointer; margin-top: 12px; width: 100%;
  font-family: var(--font-body); font-weight: 600;
  line-height: 1.5;
  transition: all 0.25s var(--ease-out-expo);
}
.btn-copy-all:hover {
  background: rgba(139, 162, 220, 0.12);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ── Pending notice ── */
.pending-notice {
  background: rgba(251, 191, 36, 0.04);
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: 12px; padding: 16px;
  margin-bottom: 20px;
  font-size: 0.88rem; color: var(--warning);
  line-height: 1.6;
}
.btn-refresh {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.12);
  color: var(--warning); padding: 8px 16px;
  border-radius: 8px; cursor: pointer;
  font-family: var(--font-body); font-weight: 600;
  margin-top: 10px;
  line-height: 1.5;
  transition: all 0.25s var(--ease-out-expo);
}
.btn-refresh:hover {
  background: rgba(251, 191, 36, 0.15);
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.1);
}

.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 12px 24px; border-radius: 10px;
  cursor: pointer; font-family: var(--font-body);
  font-size: 0.88rem; font-weight: 600;
  line-height: 1.5;
  transition: all 0.25s var(--ease-out-expo);
  margin-top: 16px;
}
.btn-back:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ================================================================
   ORDER SEARCH
   ================================================================ */
.search-section { max-width: 600px; margin: 56px auto; padding: 0 28px; }
.search-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 40px;
  animation: modalSlideIn 0.5s var(--ease-out-expo);
  position: relative;
  overflow: visible;
}
.search-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}
.search-card h2 {
  font-family: var(--font-display);
  text-align: center; margin-bottom: 24px;
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: 0;
  line-height: 1.5;
}

.search-tabs {
  display: flex; gap: 8px; margin-bottom: 24px;
  border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
.stab {
  background: transparent; border: none;
  color: var(--text-muted); padding: 8px 18px;
  border-radius: 8px; cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.87rem; font-weight: 600;
  line-height: 1.5;
  transition: all 0.25s var(--ease-out-expo);
}
.stab:hover { color: var(--text-secondary); }
.stab.active {
  background: rgba(139, 162, 220, 0.08);
  color: var(--accent);
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 13px 18px; border-radius: var(--radius-sm);
  font-size: 0.92rem; font-family: var(--font-body);
  font-weight: 500; margin-bottom: 14px;
  line-height: 1.5;
  transition: all 0.3s var(--ease-out-expo);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.search-input::placeholder { color: var(--text-muted); }

.btn-search {
  width: 100%; background: var(--accent);
  color: #13141d; border: none;
  padding: 13px; border-radius: var(--radius-sm);
  font-size: 0.92rem; font-weight: 700;
  cursor: pointer; font-family: var(--font-body);
  line-height: 1.5;
  transition: all 0.3s var(--ease-out-expo);
}
.btn-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.search-error {
  text-align: center; padding: 20px;
  color: var(--danger); margin-top: 16px;
  font-size: 0.88rem; font-weight: 500;
  line-height: 1.5;
}

/* ── Order list ── */
.order-list {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.order-list-item {
  display: flex; justify-content: space-between; align-items: center;
  background: transparent;
  border: 1px solid transparent;
  padding: 16px 18px; border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
}
.order-list-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateX(4px);
}
.oli-left { flex: 1; min-width: 0; }
.oli-name {
  font-weight: 700; font-size: 0.92rem; margin-bottom: 4px;
  line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oli-meta { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; line-height: 1.5; }
.oli-right { text-align: right; flex-shrink: 0; margin-left: 12px; }
.oli-price { font-weight: 800; color: var(--price-color); line-height: 1.5; }
.oli-status { font-size: 0.78rem; color: var(--accent); font-weight: 600; line-height: 1.5; }

/* ================================================================
   AUTH CODE INPUT
   ================================================================ */
.auth-code-row {
  display: flex; gap: 10px; align-items: stretch;
}
.auth-code-row input {
  flex: 1; min-width: 0;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  padding: 12px 16px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 1.05rem !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 6px;
  line-height: 1.5 !important;
  transition: all 0.3s var(--ease-out-expo);
  margin-bottom: 0 !important;
}
.auth-code-row input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.auth-code-row input::placeholder {
  letter-spacing: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-body) !important;
  font-weight: 400 !important;
}
.auth-code-row .btn-send-code {
  white-space: nowrap;
  background: var(--accent);
  color: #10121a; border: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 700;
  cursor: pointer; font-family: var(--font-body);
  line-height: 1.5;
  transition: all 0.25s var(--ease-out-expo);
  min-width: 100px; text-align: center;
}
.auth-code-row .btn-send-code:hover { box-shadow: 0 4px 16px var(--accent-glow); }
.auth-code-row .btn-send-code:disabled { opacity: 0.35; cursor: not-allowed; }

/* ================================================================
   LOADING & EMPTY STATES
   ================================================================ */
.loading-spinner {
  text-align: center; padding: 120px 28px;
}
.spinner {
  width: 40px; height: 40px; margin: 0 auto 16px;
  border: 2px solid rgba(139, 162, 220, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
.loading-spinner p {
  color: var(--text-muted); font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
}

.empty-state {
  text-align: center; padding: 80px 28px;
  color: var(--text-muted);
}
.empty-state h2, .empty-state h3 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.5;
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
.shop-toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 0.88rem; font-weight: 600;
  z-index: 9999; opacity: 0;
  line-height: 1.5;
  transition: all 0.4s var(--ease-out-expo);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  max-width: calc(100vw - 32px);
}
.shop-toast.success {
  border-color: rgba(52, 211, 153, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(52, 211, 153, 0.06);
}
.shop-toast.error {
  border-color: rgba(248, 113, 113, 0.25);
}
.shop-toast.info {
  border-color: rgba(96, 165, 250, 0.25);
}
.shop-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes statusReveal {
  0% { transform: translateY(8px) scale(.96); opacity: .25; filter: blur(2px); }
  100% { transform: none; opacity: 1; filter: none; }
}

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(139, 162, 220, 0.12);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 162, 220, 0.22);
}

/* ================================================================
   RESPONSIVE �?Tablet (�?68px)
   ================================================================ */
@media (max-width: 768px) {
  .shop-nav { padding: 0 12px; }
  .nav-inner {
    gap: 8px;
    height: 54px;
  }
  .nav-brand {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .nav-link {
    padding: 6px 10px;
    font-size: 0.78rem;
    line-height: 1.5;
  }
  .nav-username { max-width: 60px; }

  .shop-hero { padding: 40px 20px 28px; }
  .shop-hero h1 {
    font-size: 1.8rem;
    letter-spacing: 0;
    line-height: 1.3;
    padding-bottom: 6px;
  }
  .shop-hero p { letter-spacing: 3px; font-size: 0.8rem; }

  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .product-card {
    padding: 18px;
  }
  .product-name {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .price-num { font-size: 1.1rem; }
  .btn-buy { padding: 10px 16px; font-size: 0.76rem; min-height: 44px; }
  .group-tabs { padding: 0 16px; gap: 6px; }
  .group-tab { padding: 7px 16px; font-size: 0.76rem; min-height: 36px; }
  .shop-products { padding: 0 16px 80px; }
  .shop-search-bar { margin-left: 16px; margin-right: 16px; }

  /* Modal: bottom drawer style on mobile */
  .shop-modal-overlay {
    align-items: flex-end;
    padding: 0;
    z-index: 9990;
  }
  .shop-modal {
    max-width: 100%;
    width: 100%;
    max-height: 85vh;
    max-height: 85dvh;
    border-radius: 20px 20px 0 0;
    animation: mobileModalSlideUp 0.4s var(--ease-out-expo);
    z-index: 9991;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .buy-modal {
    padding: 20px 16px 28px;
  }
  .buy-modal::before {
    display: block;
  }
  .swipe-hint {
    display: block;
  }

  /* Cart FAB: ensure safe area */
  .cart-fab {
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    right: 16px;
    width: 54px;
    height: 54px;
    font-size: 1.15rem;
  }

  /* Auth modals: centered instead of bottom drawer */
  .shop-modal-overlay.auth-centered {
    align-items: center;
    padding: 20px;
  }
  .shop-modal-overlay.auth-centered .shop-modal {
    max-width: 400px;
    width: 92%;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 20px;
    animation: modalSlideIn 0.45s var(--ease-out-expo);
    padding-bottom: 0;
    overflow-y: auto;
  }
  .shop-modal-overlay.auth-centered .buy-modal {
    padding: 28px 20px;
  }
  .shop-modal-overlay.auth-centered .buy-modal::before {
    display: none;
  }
  .shop-modal-overlay.auth-centered .swipe-hint {
    display: none;
  }

  /* Nav scroll hint on mobile */
  .nav-scroll-hint {
    display: block;
  }

  /* Buy button compact on mobile */
  .btn-buy {
    padding: 8px 14px;
    font-size: 0.74rem;
  }
  .btn-cart {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  /* Inputs & selects: ensure proper sizing on mobile */
  .form-field input[type="email"],
  .form-field input[type="text"],
  .form-field input[type="password"],
  .form-field input[type="number"],
  .form-field select,
  select.search-input,
  .search-input {
    font-size: 16px; /* Prevents iOS zoom on input focus */
    min-height: 48px;
  }

  /* Pay methods: ensure tap targets */
  .pay-option {
    min-height: 48px;
    padding: 12px 16px;
  }

  /* Qty controls: ensure aligned */
  .qty-control {
    align-items: center;
  }
  .qty-btn {
    width: 48px; height: 48px;
    font-size: 1.2rem;
  }
  .qty-control input[type="number"] {
    height: 48px;
    font-size: 16px;
  }

  /* Auth code row */
  .auth-code-row {
    flex-direction: row;
    align-items: stretch;
  }
  .auth-code-row input {
    font-size: 16px !important;
    min-height: 48px;
  }
  .auth-code-row .btn-send-code {
    min-height: 48px;
    min-width: 90px;
    padding: 12px 14px;
  }

  /* Button minimum touch targets on mobile */
  .btn-submit-order {
    min-height: 50px;
    font-size: 1rem;
  }
  .btn-search {
    min-height: 48px;
  }
  .nav-auth-btn {
    min-height: 36px;
    padding: 8px 14px;
  }

  /* Order */
  .order-result { margin: 32px auto; padding: 0 16px; }
  .order-card { padding: 28px 20px; }
  .search-section { margin: 32px auto; padding: 0 16px; }
  .search-card { padding: 28px 20px; }

  /* Toast position adjusted for mobile modal z-index */
  .shop-toast {
    bottom: auto;
    top: 16px;
    z-index: 99999;
  }
}

/* ================================================================
   RESPONSIVE �?Phone (�?80px)
   ================================================================ */
@media (max-width: 480px) {
  .nav-inner {
    gap: 4px;
    height: 50px;
  }
  .nav-brand {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  .nav-link {
    padding: 5px 8px;
    font-size: 0.72rem;
    line-height: 1.5;
    /* Ensure touch target */
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
  .nav-auth-btn {
    padding: 6px 12px;
    font-size: 0.72rem;
    min-height: 34px;
  }
  .nav-username { display: none; }
  .nav-balance { font-size: 0.72rem; }
  .nav-points { font-size: 0.72rem !important; }

  .shop-hero { padding: 32px 16px 20px; }
  .shop-hero h1 {
    font-size: 1.5rem;
    line-height: 1.3;
    padding-bottom: 4px;
  }
  .shop-hero p { font-size: 0.72rem; letter-spacing: 2px; }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .product-card {
    padding: 18px;
  }
  .product-card-header { margin-bottom: 10px; }
  .product-name {
    font-size: 1rem;
    line-height: 1.5;
  }
  .product-desc {
    font-size: 0.82rem;
  }
  .product-footer {
    padding-top: 14px;
    /* Ensure proper alignment on mobile */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .product-footer .btn-buy {
    flex-shrink: 0;
  }

  .buy-modal { padding: 24px 16px 28px; }
  .shop-modal {
    max-height: 82vh;
    max-height: 82dvh;
  }

  /* Cart FAB: smaller on very small screens */
  .cart-fab {
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    right: 12px;
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
  .product-actions {
    gap: 4px;
  }
  .btn-cart {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
  .btn-buy {
    padding: 8px 12px;
    font-size: 0.72rem;
    min-height: 34px;
  }
  .buy-header h2 { font-size: 1.15rem; }
  .order-card { padding: 24px 16px; }
  .search-card { padding: 24px 16px; }
  .pay-methods { flex-direction: column; gap: 8px; }
  .pay-option { min-width: unset; min-height: 48px; }
  .group-tabs { padding: 0 12px; gap: 4px; }
  .group-tab { padding: 6px 14px; font-size: 0.72rem; min-height: 36px; }
  .shop-products { padding: 0 12px 60px; }
  .shop-search-bar { margin-left: 12px; margin-right: 12px; }
  .search-section { padding: 0 12px; }
  .order-result { padding: 0 12px; }

  /* Modal: ensure close button is accessible */
  .modal-close-btn {
    top: 12px; right: 12px;
    width: 40px; height: 40px;
    min-width: 44px; min-height: 44px;
  }

  /* Select dropdown: prevent overflow */
  .form-field select,
  select.search-input {
    font-size: 16px;
    min-height: 48px;
    padding: 12px 40px 12px 14px;
  }

  /* Card items stack nicely */
  .card-item { flex-wrap: wrap; gap: 8px; }
  .card-index { flex-shrink: 0; }
  .card-data { min-width: 0; }
  .btn-copy { width: 100%; text-align: center; min-height: 40px; }

  /* Ensure order list items are tappable */
  .order-list-item {
    padding: 14px 12px;
    min-height: 60px;
  }

  /* Stacking tabs */
  .search-tabs {
    gap: 4px;
  }
  .stab {
    min-height: 40px;
    padding: 8px 16px;
  }
  .btn-search {
    min-height: 48px;
  }
}

/* ================================================================
   SELECTION
   ================================================================ */
::selection {
  background: rgba(139, 162, 220, 0.2);
  color: var(--text-primary);
}

/* ================================================================
   SECTION TITLE (used in recharge/profile pages)
   ================================================================ */
.section-title h2 {
  line-height: 1.5 !important;
}

/* ================================================================
   SKELETON LOADING
   ================================================================ */
.skel-line {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
  height: 16px;
  width: 100%;
}
.skel-w60 { width: 60%; }
.skel-w40 { width: 40%; }
.skel-h28 { height: 28px; }
.skel-h14 { height: 14px; }
.skeleton-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.skeleton-card {
  pointer-events: none;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================================================
   PRODUCT ACTIONS (buy + cart buttons)
   ================================================================ */
.product-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.btn-cart {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease-out-expo);
  flex-shrink: 0;
  line-height: 1;
}
.btn-cart:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: scale(1.08);
}
.btn-cart:active {
  transform: scale(0.95);
}
.btn-cart:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  transform: none;
}

/* ================================================================
   CART FAB (Floating Action Button)
   ================================================================ */
.cart-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #13141d;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(139, 162, 220, 0.2), 0 0 0 4px rgba(139, 162, 220, 0.06);
  transition: all 0.3s var(--ease-out-expo);
}
.cart-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(139, 162, 220, 0.25);
}
.cart-fab:active {
  transform: scale(0.95);
}
.cart-bounce {
  animation: cartConfirmAnim 0.34s var(--ease-out-expo);
}
@keyframes cartConfirmAnim {
  0% { transform: scale(.94); }
  100% { transform: scale(1); }
}
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 20px; height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-family: var(--font-display);
}

/* ================================================================
   CART DRAWER
   ================================================================ */
.cart-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(6, 6, 11, 0.6);
  backdrop-filter: blur(10px);
  z-index: 9950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: overlayIn 0.2s ease;
}
.cart-drawer {
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: mobileModalSlideUp 0.35s var(--ease-out-expo);
  overflow: hidden;
}
.cart-drawer-handle {
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin: 10px auto 0;
}
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-display);
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
.cart-item-price {
  font-size: 0.82rem;
  color: var(--price-color);
  font-weight: 700;
  margin-top: 2px;
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.qty-btn-sm {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 600;
}
.qty-btn-sm:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}
.cart-item-qty {
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}
.cart-remove-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-left: 4px;
}
.cart-remove-btn:hover {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
}
.cart-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.cart-total-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--price-color);
  font-family: var(--font-display);
}

/* ================================================================
   PULL-TO-REFRESH
   ================================================================ */
.ptr-indicator {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-60px);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  z-index: 9999;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
.ptr-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
}

/* ================================================================
   Storefront rebuild: a quiet creative supply desk
   The legacy selectors remain above because the purchase flow still uses
   them; this scoped layer changes hierarchy without changing its contracts.
   ================================================================ */
.storefront-redesign {
  --store-canvas: #f3f4f0;
  --store-paper: #ffffff;
  --store-paper-soft: #f8f9f6;
  --store-ink: #17181b;
  --store-muted: #687078;
  --store-faint: #9299a0;
  --store-line: #dfe2dd;
  --store-line-strong: #c8cdc7;
  --store-violet: #5a50d6;
  --store-violet-soft: #eeedff;
  --store-mint: #16866d;
  --store-mint-soft: #e6f4ee;
  --store-coral: #d76b55;
  --store-coral-soft: #fff0eb;
  --store-shadow: 0 14px 38px rgba(25, 32, 28, .055);
  min-height: 100vh;
  color: var(--store-ink);
  background: var(--store-canvas);
  font-family: "Noto Sans SC", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
.storefront-redesign .shop-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid color-mix(in srgb, var(--store-line) 90%, transparent);
  background: color-mix(in srgb, var(--store-canvas) 92%, transparent);
  box-shadow: none;
  backdrop-filter: blur(18px);
}
.storefront-redesign .nav-inner {
  width: min(1420px, calc(100% - 56px));
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 22px;
}
.storefront-redesign .nav-brand-lockup { min-width: 0; }
.storefront-redesign .nav-brand-kicker {
  display: block;
  margin-bottom: 1px;
  color: var(--store-faint);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.2;
}
.storefront-redesign .nav-brand {
  overflow: hidden;
  color: var(--store-ink);
  font-family: Sora, "Noto Sans SC", sans-serif;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.storefront-redesign .nav-links {
  min-width: 0;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.storefront-redesign .nav-links::-webkit-scrollbar { display: none; }
.storefront-redesign .nav-link {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 7px 10px;
  color: var(--store-muted);
  background: transparent;
  font-size: .72rem;
  font-weight: 650;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.storefront-redesign .nav-link:hover,
.storefront-redesign .nav-link.active {
  color: var(--store-ink);
  border-color: var(--store-line);
  background: var(--store-paper);
}
.storefront-redesign .nav-link.active { color: var(--store-violet); }
.storefront-redesign .theme-toggle,
.storefront-redesign .nav-auth-btn {
  min-height: 34px;
  border: 1px solid var(--store-line-strong);
  border-radius: 5px;
  padding: 0 11px;
  color: var(--store-muted);
  background: transparent;
  font-size: .72rem;
  font-weight: 700;
}
.storefront-redesign .theme-toggle { width: 34px; padding: 0; }
.storefront-redesign .theme-toggle:hover,
.storefront-redesign .nav-auth-btn:hover { color: var(--store-ink); background: var(--store-paper); }
.storefront-redesign .nav-auth-btn.primary,
.storefront-redesign .nav-auth-btn.primary:hover { color: #fff; border-color: var(--store-violet); background: var(--store-violet); }
.storefront-redesign .nav-auth,
.storefront-redesign .nav-user { gap: 7px; min-width: 0; align-items: center; }
.storefront-redesign .nav-user { display: flex; }
.storefront-redesign .nav-balance { color: var(--store-mint); font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.storefront-redesign .nav-points { color: var(--store-coral) !important; font-size: .68rem !important; }
.storefront-redesign .nav-username { max-width: 90px; overflow: hidden; color: var(--store-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.storefront-redesign .shop-main {
  width: min(1420px, calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 96px;
  background: transparent;
}
.storefront-redesign .storefront-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .55fr);
  gap: 64px;
  align-items: end;
  min-height: 360px;
  padding: 68px 0 48px;
  border-bottom: 1px solid var(--store-line-strong);
}
.storefront-redesign .storefront-intro-copy { min-width: 0; }
.storefront-redesign .storefront-eyebrow,
.storefront-redesign .section-index {
  margin: 0 0 13px;
  color: var(--store-violet);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.storefront-redesign .storefront-intro h1 {
  max-width: 760px;
  margin: 0;
  color: var(--store-ink);
  font-family: Sora, "Noto Sans SC", sans-serif;
  font-size: 3.6rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.12;
}
.storefront-redesign .storefront-intro-copy > p:not(.storefront-eyebrow) {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--store-muted);
  font-size: .92rem;
  line-height: 1.8;
}
.storefront-redesign .storefront-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid var(--store-line);
  color: var(--store-muted);
  font-size: .7rem;
  font-weight: 700;
}
.storefront-redesign .storefront-proof-row span { display: inline-flex; align-items: center; gap: 7px; }
.storefront-redesign .storefront-proof-row b { color: var(--store-coral); font-size: .65rem; font-variant-numeric: tabular-nums; }
.storefront-redesign .storefront-intro-panel {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 23px;
  border: 1px solid var(--store-line-strong);
  border-radius: 7px;
  background: var(--store-paper);
  box-shadow: var(--store-shadow);
}
.storefront-redesign .storefront-panel-label { color: var(--store-faint); font-size: .66rem; font-weight: 750; }
.storefront-redesign .storefront-intro-panel strong { color: var(--store-ink); font-family: Sora, "Noto Sans SC", sans-serif; font-size: 1.3rem; font-weight: 600; }
.storefront-redesign .storefront-intro-panel > span:not(.storefront-panel-label) { color: var(--store-muted); font-size: .72rem; line-height: 1.6; }
.storefront-redesign .storefront-intro-panel a { width: fit-content; margin-top: 13px; color: var(--store-violet); font-size: .72rem; font-weight: 800; text-decoration: none; }
.storefront-redesign .storefront-intro-panel a:hover { text-decoration: underline; text-underline-offset: 4px; }
.storefront-redesign .workspace-rail {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  gap: 34px;
  padding: 36px 0;
  border-bottom: 1px solid var(--store-line-strong);
}
.storefront-redesign .workspace-rail-heading h2,
.storefront-redesign .catalog-heading h2 { margin: 0; color: var(--store-ink); font-family: Sora, "Noto Sans SC", sans-serif; font-size: 1.28rem; font-weight: 600; line-height: 1.3; }
.storefront-redesign .workspace-rail-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.storefront-redesign .workspace-launch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  min-width: 0;
  min-height: 110px;
  padding: 16px;
  border: 1px solid var(--store-line);
  border-radius: 6px;
  color: var(--store-ink);
  background: var(--store-paper);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.storefront-redesign .workspace-launch:hover { transform: translateY(-2px); border-color: var(--store-line-strong); box-shadow: var(--store-shadow); }
.storefront-redesign .workspace-launch-number { color: var(--store-violet); font-size: .63rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.storefront-redesign .workspace-launch strong { display: block; font-size: .78rem; font-weight: 800; }
.storefront-redesign .workspace-launch small { display: block; margin-top: 7px; color: var(--store-muted); font-size: .66rem; line-height: 1.5; }
.storefront-redesign .workspace-launch-arrow { color: var(--store-faint); font-size: 1rem; line-height: 1; }
.storefront-redesign .workspace-launch-image .workspace-launch-number { color: var(--store-coral); }
.storefront-redesign .workspace-launch-openpage .workspace-launch-number { color: var(--store-mint); }
.storefront-redesign .storefront-account-strip { margin: 25px 0 0; }
.storefront-redesign .storefront-account-guest,
.storefront-redesign .storefront-account-live {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 15px 18px;
  border: 1px solid var(--store-line);
  border-radius: 6px;
  background: var(--store-paper);
}
.storefront-redesign .storefront-account-mark { display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--store-violet); background: var(--store-violet-soft); font-size: .7rem; font-weight: 850; }
.storefront-redesign .storefront-account-guest > div,
.storefront-redesign .storefront-account-identity > div { min-width: 0; }
.storefront-redesign .storefront-account-guest strong,
.storefront-redesign .storefront-account-identity strong { display: block; font-size: .76rem; font-weight: 800; }
.storefront-redesign .storefront-account-guest > div > span,
.storefront-redesign .storefront-account-identity > div > span { display: block; overflow: hidden; margin-top: 3px; color: var(--store-muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.storefront-redesign .storefront-account-cta { margin-left: auto; min-height: 34px; border: 1px solid var(--store-violet); border-radius: 5px; padding: 0 12px; color: #fff; background: var(--store-violet); font-size: .7rem; font-weight: 800; cursor: pointer; }
.storefront-redesign .storefront-account-live { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.storefront-redesign .storefront-account-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.storefront-redesign .storefront-account-balance { display: flex; align-items: baseline; gap: 9px; padding: 0 22px; border-left: 1px solid var(--store-line); border-right: 1px solid var(--store-line); }
.storefront-redesign .storefront-account-balance span { color: var(--store-muted); font-size: .68rem; }
.storefront-redesign .storefront-account-balance strong { color: var(--store-mint); font-family: Sora, sans-serif; font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.storefront-redesign .storefront-account-links { display: inline-flex; gap: 14px; padding-left: 5px; }
.storefront-redesign .storefront-account-links a { color: var(--store-violet); font-size: .69rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.storefront-redesign .storefront-account-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.storefront-redesign .shop-products { padding-top: 48px; background: transparent; }
.storefront-redesign .catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.storefront-redesign .catalog-heading > div > p:last-child { margin: 9px 0 0; color: var(--store-muted); font-size: .73rem; }
.storefront-redesign #storefront-result-count { display: flex; align-items: baseline; gap: 7px; margin: 0; color: var(--store-muted); font-size: .68rem; }
.storefront-redesign #storefront-result-count strong { color: var(--store-ink); font-family: Sora, sans-serif; font-size: 1.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.storefront-redesign .catalog-console { margin-bottom: 18px; padding: 12px; border: 1px solid var(--store-line); border-radius: 6px; background: var(--store-paper); }
.storefront-redesign .catalog-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, .28fr); gap: 10px; }
.storefront-redesign .shop-search-bar,
.storefront-redesign .catalog-sort { min-height: 43px; border-color: var(--store-line); border-radius: 5px; color: var(--store-muted); background: var(--store-paper-soft); }
.storefront-redesign .shop-search-bar:focus-within { border-color: var(--store-violet); box-shadow: 0 0 0 3px var(--store-violet-soft); }
.storefront-redesign .shop-search-bar input,
.storefront-redesign .catalog-sort select { color: var(--store-ink); background: transparent; }
.storefront-redesign .shop-search-bar input::placeholder { color: var(--store-faint); }
.storefront-redesign .catalog-group-row { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--store-line); }
.storefront-redesign .catalog-group-label { color: var(--store-faint); font-size: .66rem; font-weight: 800; }
.storefront-redesign .group-tabs { gap: 6px; margin-left: 0; }
.storefront-redesign .group-tab { min-height: 31px; border: 1px solid transparent; border-radius: 4px; padding: 0 9px; color: var(--store-muted); background: var(--store-paper-soft); font-size: .68rem; font-weight: 700; }
.storefront-redesign .group-tab:hover { color: var(--store-ink); border-color: var(--store-line-strong); }
.storefront-redesign .group-tab.active { color: var(--store-violet); border-color: color-mix(in srgb, var(--store-violet) 35%, var(--store-line)); background: var(--store-violet-soft); }
.storefront-redesign .products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.storefront-redesign .product-card { display: grid; grid-template-rows: auto auto minmax(122px, 1fr) auto auto; min-width: 0; min-height: 405px; overflow: hidden; border: 1px solid var(--store-line); border-radius: 7px; background: var(--store-paper); box-shadow: none; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.storefront-redesign .product-card:hover { transform: translateY(-2px); border-color: var(--store-line-strong); box-shadow: var(--store-shadow); }
.storefront-redesign .product-card-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 44px; padding: 0 15px; border-bottom: 1px solid var(--store-line); }
.storefront-redesign .product-card-index { color: var(--store-violet); font-size: .61rem; font-weight: 900; }
.storefront-redesign .product-group-tag { overflow: hidden; color: var(--store-muted); font-size: .64rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.storefront-redesign .product-stock { color: var(--store-mint); font-size: .62rem; font-weight: 800; white-space: nowrap; }
.storefront-redesign .product-stock.stock-low { color: var(--store-coral); }
.storefront-redesign .product-image { display: block; width: 100%; height: 150px; border-bottom: 1px solid var(--store-line); object-fit: cover; background: var(--store-paper-soft); }
.storefront-redesign .product-image-placeholder { position: relative; }
.storefront-redesign .product-image-placeholder::after { position: absolute; inset: 27px; border: 1px solid var(--store-line-strong); content: ''; }
.storefront-redesign .product-card-copy { min-width: 0; padding: 16px 15px 6px; }
.storefront-redesign .product-name { display: -webkit-box; overflow: hidden; min-height: 2.8em; margin: 0; color: var(--store-ink); font-size: .88rem; font-weight: 800; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.storefront-redesign .product-attrs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.storefront-redesign .attr-tag,
.storefront-redesign .product-labels span { border: 1px solid var(--store-line); border-radius: 3px; padding: 3px 6px; color: var(--store-muted); background: var(--store-paper-soft); font-size: .59rem; }
.storefront-redesign .product-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.storefront-redesign .product-labels span { color: var(--store-violet); border-color: color-mix(in srgb, var(--store-violet) 20%, var(--store-line)); background: var(--store-violet-soft); }
.storefront-redesign .product-desc { display: -webkit-box; overflow: hidden; min-height: 2.9em; margin: 10px 0 0; color: var(--store-muted); font-size: .68rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.storefront-redesign .product-signal-row { display: flex; justify-content: space-between; gap: 10px; margin: 0 15px; padding: 11px 0; border-top: 1px solid var(--store-line); color: var(--store-faint); font-size: .62rem; }
.storefront-redesign .product-sold strong { color: var(--store-ink); font-variant-numeric: tabular-nums; }
.storefront-redesign .product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 65px; padding: 0 15px; border-top: 1px solid var(--store-line); }
.storefront-redesign .product-price { color: var(--store-ink); font-family: Sora, "Noto Sans SC", sans-serif; font-size: 1.2rem; font-weight: 600; white-space: nowrap; }
.storefront-redesign .product-price .price-num { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.storefront-redesign .special-price-old { color: var(--store-faint); font-family: inherit; font-size: .65rem; }
.storefront-redesign .special-price-badge { border-radius: 3px; color: var(--store-coral); background: var(--store-coral-soft); font-family: inherit; font-size: .57rem; }
.storefront-redesign .product-actions { display: inline-flex; align-items: center; gap: 6px; }
.storefront-redesign .btn-cart { width: 34px; height: 34px; border: 1px solid var(--store-line-strong); border-radius: 5px; color: var(--store-muted); background: transparent; }
.storefront-redesign .btn-cart:hover { color: var(--store-violet); border-color: var(--store-violet); background: var(--store-violet-soft); }
.storefront-redesign .btn-buy { min-height: 34px; border: 1px solid var(--store-violet); border-radius: 5px; padding: 0 11px; color: #fff; background: var(--store-violet); font-size: .68rem; font-weight: 800; }
.storefront-redesign .btn-buy:hover { background: color-mix(in srgb, var(--store-violet) 86%, #000); }
.storefront-redesign .btn-buy:disabled,
.storefront-redesign .btn-cart:disabled { cursor: not-allowed; opacity: .42; }
.storefront-redesign .catalog-empty { min-height: 220px; border: 1px dashed var(--store-line-strong); background: var(--store-paper); }
.storefront-redesign .empty-state { color: var(--store-muted); }
.storefront-redesign .announcement-bar { background: rgba(23, 24, 27, .28); }
.storefront-redesign .announcement-popup { border: 1px solid var(--store-line-strong); border-radius: 7px; color: var(--store-ink); background: var(--store-paper); box-shadow: 0 20px 60px rgba(20, 23, 21, .16); }
.storefront-redesign .announcement-popup-title { border-bottom-color: var(--store-line); }
.storefront-redesign .announcement-icon { color: var(--store-violet); background: var(--store-violet-soft); }
.storefront-redesign .announcement-close { border-radius: 5px; color: #fff; background: var(--store-violet); }
.storefront-redesign .cart-fab { right: 25px; bottom: 25px; width: 48px; height: 48px; border: 1px solid var(--store-violet); border-radius: 50%; color: #fff; background: var(--store-violet); box-shadow: 0 10px 25px rgba(90, 80, 214, .24); }
.storefront-redesign .cart-badge { border-color: var(--store-paper); color: var(--store-ink); background: var(--store-coral); }
.storefront-redesign .shop-modal-overlay { background: rgba(23, 24, 27, .42); backdrop-filter: blur(5px); }
.storefront-redesign .shop-modal { border: 1px solid var(--store-line-strong); border-radius: 8px; color: var(--store-ink); background: var(--store-paper); box-shadow: 0 22px 70px rgba(20, 23, 21, .2); }
.storefront-redesign .modal-close-btn { color: var(--store-muted); }
.storefront-redesign .modal-close-btn:hover { color: var(--store-ink); background: var(--store-paper-soft); }
.storefront-redesign .shop-toast { border-color: var(--store-line-strong); border-radius: 6px; color: var(--store-ink); background: var(--store-paper); box-shadow: var(--store-shadow); }
.storefront-redesign :focus-visible { outline: 2px solid var(--store-violet); outline-offset: 3px; }
.storefront-redesign .storefront-gateway-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 13px; padding: 13px; border: 1px solid var(--store-violet); border-radius: 6px; color: var(--store-ink); background: var(--store-violet-soft); text-decoration: none; transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease; }
.storefront-redesign .storefront-gateway-cta:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--store-violet-soft) 76%, var(--store-paper)); box-shadow: var(--store-shadow); }
.storefront-redesign .storefront-gateway-cta-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 5px; color: var(--store-paper); background: var(--store-violet); font: 800 .73rem/1 Sora, sans-serif; }
.storefront-redesign .storefront-gateway-cta strong, .storefront-redesign .storefront-gateway-cta small { display: block; }
.storefront-redesign .storefront-gateway-cta strong { font-size: .76rem; font-weight: 850; }
.storefront-redesign .storefront-gateway-cta small { margin-top: 4px; color: var(--store-muted); font-size: .61rem; line-height: 1.45; }
.storefront-redesign .storefront-gateway-cta-arrow { color: var(--store-violet); font-size: 1rem; }
.storefront-redesign .storefront-announcement-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid var(--store-line);
  border-radius: 6px;
  color: var(--store-ink);
  background: var(--store-paper);
}
.storefront-redesign .storefront-announcement-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  color: var(--store-violet);
  background: var(--store-violet-soft);
}
.storefront-redesign .storefront-announcement-mark svg { width: 16px; height: 16px; }
.storefront-redesign .storefront-announcement-copy { min-width: 0; }
.storefront-redesign .storefront-announcement-copy > span {
  display: block;
  margin-bottom: 3px;
  color: var(--store-violet);
  font-size: .59rem;
  font-weight: 800;
}
.storefront-redesign .storefront-announcement-copy strong {
  display: block;
  margin-bottom: 2px;
  color: var(--store-ink);
  font-size: .73rem;
}
.storefront-redesign .storefront-announcement-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--store-muted);
  font-size: .68rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.storefront-redesign .storefront-announcement-open,
.storefront-redesign .storefront-announcement-dismiss {
  min-height: 34px;
  border: 1px solid var(--store-line-strong);
  border-radius: 5px;
  color: var(--store-muted);
  background: transparent;
  font-size: .67rem;
  font-weight: 750;
}
.storefront-redesign .storefront-announcement-open { padding: 0 11px; white-space: nowrap; }
.storefront-redesign .storefront-announcement-dismiss { display: grid; place-items: center; width: 34px; padding: 0; }
.storefront-redesign .storefront-announcement-dismiss svg { width: 15px; height: 15px; }
.storefront-redesign .storefront-announcement-open:hover,
.storefront-redesign .storefront-announcement-dismiss:hover { color: var(--store-ink); border-color: var(--store-violet); background: var(--store-violet-soft); }
.storefront-redesign .workspace-launch-chat .workspace-launch-number { color: var(--store-violet); }
.storefront-redesign .workspace-launch-tools .workspace-launch-number { color: var(--store-mint); }
.storefront-redesign .workspace-launch-lab .workspace-launch-number { color: var(--store-coral); }
html[data-theme="dark"] .storefront-redesign {
  --store-canvas: #15171a;
  --store-paper: #1d2024;
  --store-paper-soft: #181b1f;
  --store-ink: #f1f2ee;
  --store-muted: #b2b8b4;
  --store-faint: #7b837e;
  --store-line: #303630;
  --store-line-strong: #495149;
  --store-violet: #a9a4ff;
  --store-violet-soft: #29274d;
  --store-mint: #69c4a7;
  --store-mint-soft: #203d34;
  --store-coral: #f19a83;
  --store-coral-soft: #4a2a23;
  --store-shadow: 0 16px 44px rgba(0, 0, 0, .22);
}
@media (max-width: 1050px) {
  .storefront-redesign .nav-inner,
  .storefront-redesign .shop-main { width: min(100% - 36px, 1420px); }
  .storefront-redesign .storefront-intro { gap: 34px; }
  .storefront-redesign .storefront-intro h1 { font-size: 3rem; }
  .storefront-redesign .workspace-rail { grid-template-columns: 1fr; gap: 20px; }
  .storefront-redesign .workspace-rail-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .storefront-redesign .nav-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
  .storefront-redesign .nav-auth { grid-column: 1 / -1; grid-row: 2; justify-content: end; padding-bottom: 10px; }
  .storefront-redesign .nav-inner { padding: 8px 0 0; }
  .storefront-redesign .nav-links { grid-column: 2; grid-row: 1; justify-content: start; }
  .storefront-redesign .storefront-intro { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
  .storefront-redesign .storefront-intro-panel { max-width: 420px; }
  .storefront-redesign .workspace-rail-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storefront-redesign .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .storefront-redesign .nav-inner,
  .storefront-redesign .shop-main { width: min(100% - 28px, 1420px); }
  .storefront-redesign .nav-inner { min-height: 62px; grid-template-columns: minmax(0, 1fr) auto auto; }
  .storefront-redesign .nav-brand-kicker { display: none; }
  .storefront-redesign .nav-brand { font-size: .78rem; }
  .storefront-redesign .nav-links { display: none; }
  .storefront-redesign .nav-auth { grid-column: 1 / -1; padding-bottom: 7px; }
  .storefront-redesign .nav-username { max-width: 72px; }
  .storefront-redesign .storefront-intro { padding: 39px 0 34px; gap: 28px; }
  .storefront-redesign .storefront-intro h1 { font-size: 2.35rem; line-height: 1.18; }
  .storefront-redesign .storefront-intro-copy > p:not(.storefront-eyebrow) { font-size: .82rem; }
  .storefront-redesign .storefront-proof-row { gap: 13px; font-size: .64rem; }
  .storefront-redesign .storefront-announcement-note { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
  .storefront-redesign .storefront-announcement-copy p { -webkit-line-clamp: 2; }
  .storefront-redesign .storefront-announcement-open { grid-column: 2; justify-self: start; }
  .storefront-redesign .storefront-announcement-dismiss { grid-column: 3; grid-row: 1; }
  .storefront-redesign .storefront-account-guest,
  .storefront-redesign .storefront-account-live { align-items: flex-start; flex-wrap: wrap; padding: 13px; }
  .storefront-redesign .storefront-account-guest > div { flex: 1 1 180px; }
  .storefront-redesign .storefront-account-cta { width: 100%; margin-left: 44px; }
  .storefront-redesign .storefront-account-live { display: grid; grid-template-columns: 1fr auto; }
  .storefront-redesign .storefront-account-identity { grid-column: 1 / -1; }
  .storefront-redesign .storefront-account-balance { justify-content: space-between; padding: 12px 0 0; border: 0; border-top: 1px solid var(--store-line); }
  .storefront-redesign .storefront-account-links { justify-content: end; align-items: end; padding-top: 12px; border-top: 1px solid var(--store-line); }
  .storefront-redesign .shop-products { padding-top: 35px; }
  .storefront-redesign .catalog-heading { display: grid; gap: 12px; align-items: start; }
  .storefront-redesign .catalog-heading > #storefront-result-count { justify-self: start; }
  .storefront-redesign .catalog-tools { grid-template-columns: 1fr; }
  .storefront-redesign .products-grid { grid-template-columns: 1fr; }
  .storefront-redesign .product-card { min-height: 0; }
  .storefront-redesign .product-image { height: 165px; }
  .storefront-redesign .product-footer { min-height: 61px; }
  .storefront-redesign .cart-fab { right: 14px; bottom: 14px; }
}
@media (max-width: 420px) {
  .storefront-redesign .workspace-rail-links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .storefront-redesign .workspace-launch,
  .storefront-redesign .product-card { transition: none; }
  .storefront-redesign .workspace-launch:hover,
  .storefront-redesign .product-card:hover { transform: none; }
}

.storefront-redesign .pay-methods-empty {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--store-line);
  border-radius: 6px;
  color: var(--store-muted);
  background: var(--store-paper-soft);
  font-size: .76rem;
  line-height: 1.5;
}
.storefront-redesign .pay-methods-empty strong { color: var(--store-ink); font-size: .8rem; }
.storefront-redesign .pay-methods-empty span { color: var(--store-muted); }
.storefront-redesign .pay-login-link {
  justify-self: start;
  min-height: 36px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid var(--store-violet);
  border-radius: 5px;
  color: var(--store-violet);
  background: transparent;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 720;
}
.storefront-redesign .pay-login-link:hover { color: var(--store-paper); background: var(--store-violet); }
.storefront-redesign .recharge-empty-state { margin-top: 2px; }
