/* ============================================================
   NexusVotex - Gaming Dark Theme
   Modern, fast, responsive. No framework. Pure CSS.
   ============================================================ */

:root {
  --bg: #f8fafc;         /* Light slate/off-white */
  --bg-2: #ffffff;       /* Pure white for elements */
  --bg-3: #f1f5f9;       /* Soft light gray for highlights */
  --card: #ffffff;       /* White card fill */
  --card-hover: #f8fafc; /* Hover card fill */
  --border: rgba(0, 0, 0, 0.08);       /* Subtle dark border */
  --border-bright: rgba(0, 0, 0, 0.15);  /* Brighter dark border */
  --text: #0f172a;       /* Clean dark slate text */
  --text-dim: #64748b;   /* Muted gray text */
  --muted: #94a3b8;
  --accent: #0284c7;     /* Professional Light Sea Blue */
  --accent-2: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.15);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 16px;        
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Light premium shadow */
  --grad: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  --font: 'Be Vietnam Pro', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mc-btn-shadow: 0 3px 0 0 var(--border), 0 -1px 0 0 rgba(0,0,0,0.05) inset;
  --mc-btn-active: 0 0 0 0 var(--border), 0 1px 2px 0 rgba(0,0,0,0.1) inset;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* Never allow a horizontal scrollbar to shift content left on narrow screens. */
html, body { overflow-x: hidden; max-width: 100%; }

a { text-decoration: none !important; }

/* Custom cursor removed — standard pointer is cleaner and more trusted */

/* ---------- Announcement Bar (Slide Up) ---------- */
.announce-bar {
  background: var(--bg-2);
  color: var(--text);
  overflow: hidden;
  position: relative;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 35px;
}
.announce-track {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.announce-item {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.announce-item.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.announce-item.exit {
  opacity: 0;
  transform: translateY(-20px);
}
.announce-item .ai-accent { color: var(--accent); font-weight: 700; }

/* ---------- Live Search ---------- */
.header-search { position: relative; margin-right: 8px; }
.h-search-input {
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text); padding: 8px 16px 8px 36px; border-radius: 20px;
  font-size: 13.5px; width: 220px; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.h-search-input:focus { width: 280px; background: var(--bg-2); outline: none; border-color: var(--accent); }
.h-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.search-dropdown {
  position: absolute; top: 100%; right: 0; width: 340px; margin-top: 12px;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); z-index: 1000;
  max-height: 400px; overflow-y: auto; padding: 8px;
}
.sd-item {
  display: flex; gap: 12px; padding: 10px; border-radius: 12px;
  text-decoration: none; color: inherit; transition: background 0.2s;
  align-items: center;
}
.sd-item:hover { background: var(--bg-3); }
.sd-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--bg-2); }
.sd-info { flex: 1; min-width: 0; }
.sd-name { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-price { font-size: 12.5px; color: var(--accent); margin-top: 3px; }
.sd-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* Bell notifications */
.bell { position: relative; }
.bell-dot {
  position: absolute; top: 0; right: 0; width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%; border: 1.5px solid var(--bg);
  animation: pulse 2.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ---------- SVG & Icon Sizing ---------- */
svg, .ic {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}
.icon-btn svg, .icon-btn .ic {
  width: 20px;
  height: 20px;
}
.btn svg, .btn .ic {
  width: 1.1em;
  height: 1.1em;
}
.f-icon svg, .f-icon .ic {
  width: 24px;
  height: 24px;
}
.mnav-ic svg, .mnav-ic .ic {
  width: 20px;
  height: 20px;
}
.trust-item svg, .trust-item .ic {
  width: 16px;
  height: 16px;
}
.hero-pill-badge svg, .hero-pill-badge .ic {
  width: 14px;
  height: 14px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Layout ---------- */
.container { max-width: 1720px; margin: 0 auto; padding: 0 40px; }
.page { padding: 30px 0 70px; min-height: 60vh; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 0;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 32px; font-weight: 900; color: var(--text);
  letter-spacing: 1px;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.logo:hover { transform: scale(1.02); }
.logo-badge {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--grad); display: grid; place-items: center;
  font-size: 24px; box-shadow: 0 4px 20px var(--accent-glow);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.logo:hover .logo-badge {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 8px 30px rgba(163, 230, 53, 0.35);
}
.logo span {
  display: inline-block;
  white-space: nowrap;
}
.logo span em { font-style: normal; }
.logo span em.logo-w { color: var(--text); }
.logo span em.logo-g { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.drawer-nav-items { display: flex; align-items: center; gap: 6px; }
.nav-links a.nav-item {
  color: var(--text-dim); font-weight: 600; padding: 8px 16px;
  border-radius: 20px; font-size: 14.5px; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent;
  position: relative;
}
.nav-links a.nav-item:hover {
  color: var(--text); background: var(--bg-3);
  border-color: var(--border);
}
.nav-links a.nav-item.active {
  color: #030712; background: var(--grad);
  border-color: var(--border);
  box-shadow: 0 8px 20px var(--accent-glow);
  font-weight: 700;
}
.nav-links a.nav-item svg.ic { display: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; font-weight: 700; font-size: 14px;
  border-radius: 11px;
  border: 2px solid #1a1a1a; white-space: nowrap; line-height: 1.2;
box-shadow: var(--mc-btn-shadow);
  transition: transform .12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .12s ease, filter .15s, border-color .15s;
  letter-spacing: .3px;
  position: relative;
  overflow: hidden;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-2.5px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn:active { transform: translateY(1px) scale(0.98); box-shadow: var(--mc-btn-active); }
.btn-primary { background: var(--grad); color: #fff; border-color: var(--accent); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--border-bright); }
.btn-outline:hover { border-color: var(--accent); color: #fff; background: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #1a1a1a; }
.btn-success { background: linear-gradient(180deg, #10b981 0%, #047857 100%); color: #fff; border-color: #065f46; }
.btn-danger { background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%); color: #fff; border-color: #991b1b; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* Status Pills */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px; font-size: 11.5px; font-weight: 700;
  border-radius: 8px; text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap;
}
.pill-success { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.pill-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.pill-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.pill-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Cart icon w/ badge */
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700;
  border-radius: 20px; display: grid; place-items: center; padding: 0 5px;
  border: 2px solid var(--bg);
}

/* Icon Button */
.icon-btn { width: 40px; height: 40px; border-radius: 11px; background: var(--bg-3); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text); font-size: 17px; transition: all .2s; position: relative; }
.icon-btn:hover { background: var(--bg-3); border-color: var(--accent); transform: translateY(-2px); }
.icon-btn:active { transform: translateY(2px); }

/* Product Card Buy Button */
.btn-buy-mc {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; font-weight: 800; font-size: 13px;
  border-radius: 10px;
  background: var(--grad); color: #fff;
  border: 1px solid var(--border);
  cursor: pointer; transition: all .15s ease;
  text-transform: uppercase; letter-spacing: .5px;
}
.btn-buy-mc:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-buy-mc:active {
  transform: translateY(1px);
}

/* User chip */
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 30px; background: var(--bg-3); border: 1px solid var(--border); cursor: pointer; color: var(--text); text-align: left; transition: all .2s; }
.user-chip:hover { background: var(--bg-3); border-color: var(--accent); }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }
.user-chip .u-info { line-height: 1.15; text-align: left; }
.user-chip .u-name { font-size: 13px; font-weight: 600; color: var(--text); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .u-bal { font-size: 11.5px; color: var(--warning); font-weight: 600; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 13px;
  box-shadow: var(--shadow); padding: 7px; z-index: 120; animation: pop .16s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 9px; color: var(--text);
  background: none; border: none; font-size: 14px; font-weight: 500; text-align: left; transition: all .15s;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-3); color: var(--text); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.dropdown-menu .logout { color: var(--danger); }
.dropdown-menu .logout:hover { background: var(--bg-3); }

/* Mobile menu */
.hamburger { display: none; }

/* ---------- Buttons: general ---------- */

/* ---------- Hero Banner ---------- */
.hero-banner-wrap {
  position: relative;
  margin-bottom: 28px;
}
.hero-banner {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  padding: 48px 30px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.38;
  filter: blur(1px);
  transition: transform 0.6s ease;
}
.hero-banner:hover .hero-bg-img {
  transform: scale(1.05);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--bg-2);
}
.hero-banner.has-bg {
  padding: 140px 24px 32px 24px;
  min-height: 380px;
  justify-content: flex-end;
}
.hero-banner.has-bg .hero-bg-img {
  opacity: 0.95;
  filter: none;
}
.hero-banner.has-bg .hero-overlay {
  background: var(--bg-2);
}
.hero-banner.has-bg .hero-pill-badge,
.hero-banner.has-bg .hero-title,
.hero-banner.has-bg .hero-sub {
  display: none;
}
.hero-banner.has-bg .hero-actions {
  margin-bottom: 16px;
}
.hero-banner.has-bg .hero-trust-bar {
  background: var(--bg-3);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}
.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 30px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}
.hero-title {
  font-size: clamp(26px, 4.5vw, 46px);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  color: var(--text-dim);
  font-size: clamp(14px, 2.2vw, 17px);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 26px;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.hero-btn {
  padding: 14px 30px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
}
.hero-btn.btn-primary {
  background: var(--grad);
  color: #fff;
  border: 1.5px solid var(--accent);
  box-shadow: 0 4px 20px rgba(132,204,22,0.35);
}
.hero-btn.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 100%);
  box-shadow: 0 6px 28px rgba(132,204,22,0.55);
  transform: translateY(-2px);
}
.hero-btn.btn-outline {
  background: var(--bg-3);
  color: #fff;
  border: 1.5px solid var(--border);
}
.hero-btn.btn-outline:hover {
  background: var(--bg-3);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.hero-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 22px;
  border-radius: 40px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  max-width: fit-content;
  margin: 0 auto;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}
.trust-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}

/* ---------- Quick Deposit Cards ---------- */
.quick-deposit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.qd-card {
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}
.qd-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px var(--accent-glow);
}
.qd-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
}
.qd-card:hover::before {
  opacity: 1;
}
.qd-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.qd-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--accent-2);
  flex-shrink: 0;
  transition: all .25s ease;
}
.qd-card:hover .qd-icon {
  transform: scale(1.08) rotate(-4deg);
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 16px var(--accent-glow);
}
.qd-info {
  flex: 1;
  min-width: 0;
}
.qd-badge-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.qd-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.qd-badge-green {
  background: var(--bg-3);
  color: #4ade80;
  border: 1px solid var(--border);
}
.qd-badge-orange {
  background: var(--bg-3);
  color: #fbbf24;
  border: 1px solid var(--border);
}
.qd-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.qd-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.4;
}
.qd-arrow {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  transition: all .25s ease;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-3);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.qd-card:hover .qd-arrow {
  transform: translateX(6px);
  background: var(--accent);
  color: #000;
}

/* ---------- Sections ---------- */
.section { margin-top: 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title { font-size: 23px; font-weight: 800; position: relative; padding-left: 15px; }
.section-title::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 22px; border-radius: 4px; background: var(--grad);
}

/* Vertical Product Card Style */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 28px; }

.product-card-v2 {
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.product-card-v2:hover {
  transform: translateY(-6px);
  border-color: rgba(163, 230, 53, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(163, 230, 53, 0.1);
}

.pc-head-tags {
  position: absolute; top: 14px; left: 14px; right: 14px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 10; pointer-events: none;
}
.tag-badge {
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--accent-2); font-size: 11px; font-weight: 700;
  padding: 4px 10px; text-transform: uppercase; backdrop-filter: blur(8px);
  border-radius: 8px;
}
.stock-status {
  font-size: 11px; font-weight: 700; padding: 4px 12px;
  text-transform: uppercase; backdrop-filter: blur(8px);
  border-radius: 8px;
}
.stock-status.in-stock { background: var(--bg-3); border: 1px solid var(--border); color: #34d399; }
.stock-status.out-stock { background: var(--bg-3); border: 1px solid var(--border); color: #f87171; }

.pc-thumb-v2 {
  width: 100%; height: 210px; background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  padding: 0;
  position: relative;
  transition: border-bottom-color 0.4s ease;
}
.product-card-v2:hover .pc-thumb-v2 {
  border-bottom-color: rgba(163, 230, 53, 0.2);
}
.pc-thumb-v2 img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.product-card-v2:hover .pc-thumb-v2 img { transform: scale(1.06); }

.pc-body-v2 { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.pc-title-v2 { font-size: 17px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .5px; line-height: 1.3; }

.pc-feature-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pc-feature-list li { font-size: 13.5px; color: var(--text-dim); display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; }
.pc-feature-list .tick-icon { color: var(--accent); font-weight: 800; flex-shrink: 0; }

.pc-stats-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 22px; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
  font-size: 12px; color: var(--text-dim); background: var(--bg-3);
}
.pc-stats-row span { display: inline-flex; align-items: center; gap: 4px; }
.pc-stats-row span svg.ic { font-size: 14px; opacity: 0.7; }
.pc-stats-row b { color: #fff; font-weight: 700; }

.pc-footer-v2 {
  padding: 16px 14px; display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-3); gap: 8px; flex-wrap: nowrap;
  border-top: 1px solid var(--border);
}
.pc-price-wrap { display: flex; flex-direction: column; min-width: fit-content; flex-shrink: 0; }
.pc-price-wrap .p-lbl { font-size: 10px; font-weight: 700; color: var(--text-dim); letter-spacing: .5px; text-transform: uppercase; }
.pc-price-wrap .p-val { font-size: 20px; font-weight: 800; color: var(--accent); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pc-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-cart-mc {
  background: var(--bg-3);
  color: #ffffff;
  border: 1px solid var(--border);
  padding: 8px 10px;
  font-weight: 700;
  font-size: 12.5px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn-cart-mc:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-3);
  transform: translateY(-2px);
}
.btn-cart-mc:active {
  transform: translateY(2px);
}

.btn-buy-mc {
  background: var(--grad);
  color: #fff; border: 1px solid var(--border);
  padding: 8px 20px; font-weight: 800; font-size: 12.5px;
  border-radius: 11px;
  position: relative; overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-buy-mc::after {
  content: ""; position: absolute; top: -50%; left: -60%; width: 20%; height: 200%;
  background: var(--bg-3); transform: rotate(45deg); transition: all 0.4s ease;
}
.btn-buy-mc:hover::after { left: 140%; }
.btn-buy-mc:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); filter: brightness(1.1); }
.btn-buy-mc:active { transform: translateY(1px); filter: brightness(0.95); }

/* ---------- 2-Column Purchase Confirmation Modal ---------- */
.modal-overlay.open .modal {
  max-width: 920px; width: 95%; max-height: 90vh;
  background: var(--card);
  border: 1.5px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.85);
  border-radius: 16px;
  padding: 0; overflow-y: auto; overflow-x: hidden;
}
.modal-head { display: none; }

.modal-mc-header {
  background: var(--bg-2); padding: 14px 20px; border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
}
.mc-head-tag { background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; text-transform: uppercase; border-radius: 5px; }
.mc-head-title { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: .4px; }

.mc-checkout-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 420px; }
@media (max-width: 768px) { .mc-checkout-2col { grid-template-columns: 1fr; min-height: unset; } }

.mc-col-left { padding: 20px; border-right: 1px solid var(--border); background: var(--bg-3); }
.mc-prod-banner { width: 100%; height: 220px; background: var(--bg-3); border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.mc-prod-banner img { max-width: 100%; max-height: 100%; object-fit: contain; }

.mc-desc-section h4 { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.mc-desc-section .desc-ticks li { margin-bottom: 6px; font-size: 13.5px; }

.mc-col-right { padding: 20px; background: var(--bg-3); display: flex; flex-direction: column; gap: 14px; }
.mc-top-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mc-stock-pill { background: var(--bg-3); border: 1.5px solid var(--border); color: #4ade80; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.mc-main-price { font-size: 26px; font-weight: 800; color: var(--accent); }
.mc-meta-counts { font-size: 13px; color: var(--text-dim); }
.mc-meta-counts b { color: #fff; }

.mc-group-label { font-size: 13px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; margin-bottom: 4px; }

.mc-variant-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; padding-right: 4px; }
.cc-variant-card {
  background: var(--bg-3); border: 1.5px solid var(--border); padding: 10px 14px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  transition: all .15s ease;
}
.cc-variant-card:hover { border-color: var(--accent-2); background: var(--bg-3); }
.cc-variant-card.sel { border-color: var(--accent); background: var(--bg-3); box-shadow: inset 0 0 10px rgba(132, 204, 22, 0.2); }
.cc-variant-card.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.v-card-name { font-size: 13.5px; font-weight: 800; color: #fff; }
.v-card-sub { font-size: 11.5px; color: var(--text-dim); }
.v-card-price { font-size: 14.5px; font-weight: 800; color: var(--accent); }

.mc-qty-box { display: flex; align-items: center; gap: 14px; background: var(--bg-3); padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 10px; }
.mc-qty-box .qty-ctl button { width: 38px; height: 38px; font-size: 18px; }
.mc-stock-avail { font-size: 12.5px; color: var(--accent-2); font-weight: 600; }

.mc-coupon-row { display: flex; gap: 8px; }
.mc-coupon-input { flex: 1; height: 44px; font-size: 14px; }
.mc-coupon-btn { height: 44px; padding: 0 16px; font-size: 13px; }

.mc-bill-table { background: var(--bg-3); border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.mc-bill-table .b-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-dim); }
.mc-bill-table .b-row b { color: #fff; }
.mc-bill-table .b-row.highlight { font-weight: 700; border-top: 1px dashed var(--border); padding-top: 6px; }

.mc-submit-btn { width: 100%; height: 46px; font-size: 15px; text-transform: uppercase; letter-spacing: .5px; }

.mc-policy-box {
  background: var(--bg-3); border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px;
  margin-top: 4px;
}
.mc-policy-box h5 { font-size: 12px; font-weight: 800; color: var(--accent-2); margin-bottom: 6px; letter-spacing: .5px; }
.mc-policy-box ul { list-style: none; padding: 0; margin: 0; }
.mc-policy-box li { font-size: 12px; color: var(--text-dim); margin-bottom: 3px; }

/* ---------- Feature highlights ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 44px; }
.feature {
  background: var(--card); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; transition: all .25s; box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(2,132,199,.3); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary { background: var(--bg-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-dim); background: var(--bg-3); transform: translateY(-1px); }
.btn-secondary:active { transform: scale(0.97); }

.btn-danger { background: var(--bg-3); color: #ef4444; border: 1px solid var(--border); }
.btn-danger:hover { background: var(--bg-3); }
.btn-danger:active { transform: scale(0.97); }

.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.btn-ghost:active { transform: scale(0.97); }
.feature:hover { box-shadow: 0 10px 30px rgba(132, 204, 22, 0.15); transform: translateY(-4px); }
.feature .f-icon {
  width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px;
  background: var(--bg-3); color: var(--accent);
  display: grid; place-items: center; font-size: 23px;
}
.feature h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 5px; }
.feature p { font-size: 13px; color: var(--text-dim); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; max-width: 760px; margin: 0 auto;
}
.contact-card {
  background: var(--bg-3);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(132, 204, 22, 0.15); background: var(--bg-3); }
.contact-card .f-icon {
  width: 56px; height: 56px; border-radius: 14px; background: var(--bg-3);
  color: var(--accent); display: grid; place-items: center; font-size: 24px; margin-bottom: 14px;
}
.contact-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.contact-card p { font-size: 13px; color: var(--text-dim); word-break: break-word; }

/* ---------- Grid Layouts ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ---------- News ---------- */
.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.news-card:hover {
  border-color: var(--border);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.news-card .n-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-2);
  display: block;
}
.news-card .n-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover .n-thumb img {
  transform: scale(1.05);
}
.news-card .n-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card .n-date {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.news-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}
.news-card p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.news-card .n-more {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}
.news-card:hover .n-more {
  color: #fff;
}

/* ---------- Testimonials / Feedbacks ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
  position: relative;
}
.testimonial-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.testimonial-card .t-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.testimonial-card .t-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #000;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.testimonial-card .t-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.testimonial-card .t-meta {
  flex: 1;
  min-width: 0;
}
.testimonial-card .t-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.testimonial-card .t-stars {
  font-size: 12px;
  letter-spacing: 1px;
}
.testimonial-card .t-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 10px;
  width: fit-content;
}
.testimonial-card .t-content {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-dim);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-bottom: 24px; }
.contact-card {
  background: var(--bg-3);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; text-align: center; transition: all .2s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text); text-decoration: none;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(132, 204, 22, 0.15); }
.contact-card .f-icon {
  width: 56px; height: 56px; border-radius: 14px; background: var(--bg-3);
  color: var(--accent); display: grid; place-items: center; font-size: 24px; margin-bottom: 14px;
}
.contact-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.contact-card p { font-size: 13.5px; color: var(--text-dim); }
.contact-card:nth-child(2) .f-icon { background: var(--bg-3); color: #3b82f6; }
.contact-card:nth-child(2):hover { border-color: #3b82f6; box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15); }
.contact-card:nth-child(3) .f-icon { background: var(--bg-3); color: #ef4444; }
.contact-card:nth-child(3):hover { border-color: #ef4444; box-shadow: 0 6px 20px rgba(239, 68, 68, 0.15); }

/* ---------- Guide (Hướng dẫn) ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.guide-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; transition: all .25s;
}
.guide-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.g-avatar {
  width: 84px; height: 84px; border-radius: 18px; overflow: hidden; margin: 0 auto 14px;
  background: var(--bg-2); display: grid; place-items: center; font-size: 34px;
}
.g-avatar img { width: 100%; height: 100%; object-fit: cover; }
.g-avatar .thumb-fallback { font-size: 32px; }
.guide-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; word-break: break-word; }
.g-actions { display: flex; flex-direction: column; gap: 9px; }
.g-actions .g-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.g-actions .g-btn span { font-size: 15px; }

/* Guide Posts Detail (In page) */
.guide-posts-container { max-width: 800px; margin: 0 auto; width: 100%; }
.guide-post-card {
  background: var(--bg-3); border-radius: 16px;
  padding: 24px; margin-bottom: 24px; box-shadow: 0 4px 24px rgba(0,0,0,0.3); text-align: left;
}
.guide-post-card h3 { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 14px; text-transform: none; letter-spacing: normal; }
.guide-post-card .g-media video { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; border-radius: 12px; border: 1px solid var(--border); display: block; margin-bottom: 16px; }
.guide-post-card .g-media img { width: 100%; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 16px; max-height: 400px; object-fit: cover; }
.guide-post-card .g-content { white-space: pre-wrap; font-size: 15px; line-height: 1.7; color: var(--text-dim); margin-bottom: 16px; word-break: break-word; }
.guide-post-card .g-footer-actions { border-top: 1px dashed var(--border); padding-top: 14px; display: flex; justify-content: flex-end; }

/* ---------- Footer ---------- */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 30px;
  margin-top: 60px;
  color: var(--text-dim);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-size: 13.5px;
  transition: color 0.2s, transform 0.2s;
}
.footer-col a:hover {
  color: var(--accent);
  transform: translateX(3px);
}
.footer-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 340px;
  margin-bottom: 16px;
}
.social-links {
  display: flex;
  gap: 10px;
}
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: all 0.2s;
  margin-bottom: 0;
}
.social-links a:hover {
  background: var(--bg-3);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.copyright {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Breadcrumbs ---------- */
.crumbs {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.crumbs a {
  color: var(--text-dim);
}
.crumbs a:hover {
  color: var(--accent);
}

/* ---------- Profile & Account ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
  align-items: start;
}
.profile-grid > * { min-width: 0; }
.profile-side {
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  position: sticky;
  top: 84px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.big-avatar {
  width: 96px; height: 96px; border-radius: 50%; aspect-ratio: 1/1; overflow: hidden; object-fit: cover;
  background: var(--grad); margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 32px; font-weight: 800; color: #000;
  box-shadow: 0 4px 20px rgba(132, 204, 22, 0.3); border: 2px solid var(--accent); box-sizing: border-box;
}
.profile-side h3 {
  font-size: 17.5px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.p-mail {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 18px;
  word-break: break-all;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9.5px 0;
  font-size: 13.5px;
  border-top: 1px dashed var(--border);
  color: var(--text-dim);
}
.stat-row span:last-child {
  font-weight: 700;
  color: var(--text);
}

/* ---------- Forms ---------- */
.auth-wrap { max-width: 440px; margin: 40px auto; padding: 0 16px; }
.auth-card {
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 40px 32px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  position: relative; overflow: hidden;
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.auth-card h2 { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 8px; color: #fff; }
.auth-card .sub { text-align: center; color: var(--text-dim); font-size: 14.5px; margin-bottom: 28px; }
.form-group { margin-bottom: 17px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.input, .select, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: var(--bg-2); border: 1.5px solid var(--border); color: var(--text);
  font-size: 14.5px; outline: none; transition: all .2s;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input::placeholder { color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-error { background: var(--bg-3); border: 1px solid var(--border); color: #fca5a5; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 15px; display: none; }
.form-error.show { display: block; animation: pop .18s; }
.form-success { background: var(--bg-3); border: 1px solid var(--border); color: #86efac; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 15px; display: none; }
.form-success.show { display: block; }
.switch-link { text-align: center; margin-top: 17px; font-size: 14px; color: var(--text-dim); }
.switch-link a { font-weight: 600; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.cart-layout > * { min-width: 0; }
.cart-item {
  display: flex; align-items: center; gap: 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 13px;
}
.cart-item .ci-thumb { width: 66px; height: 66px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg-3); display: grid; place-items: center; }
.cart-item .ci-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .ci-thumb .thumb-fallback { font-size: 24px; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-name { font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.cart-item .ci-variant { display:block; font-size:11.5px; color: var(--text-dim); font-weight:500; margin-top:2px; }
.cart-item .ci-price { color: var(--warning); font-weight: 700; font-size: 14px; }
.qty-ctl { display: inline-flex; align-items: center; gap: 2px; margin-top: 7px; }
.qty-ctl button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-weight: 700; font-size: 16px; transition: all .15s; min-width: 36px; display: grid; place-items: center; }
.qty-ctl button:hover { border-color: var(--accent); color: var(--accent-2); }
.qty-ctl span { min-width: 34px; text-align: center; font-weight: 700; }
.cart-item .ci-remove { color: var(--muted); background: none; border: none; font-size: 18px; transition: all .15s; }
.cart-item .ci-remove:hover { color: var(--danger); transform: scale(1.15); }

/* ---------- Cart Animation ---------- */
.fly-cart-wrap {
  position: fixed; z-index: 9999; pointer-events: none;
  transition: transform 0.6s linear;
}
.fly-cart-img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 4px 15px rgba(132,204,22,0.5); border: 2px solid var(--accent);
  transition: transform 0.6s cubic-bezier(0.2, -0.3, 1, 0.5);
}
.cart-bump { animation: cartBump 0.3s ease-out; color: var(--accent); }
@keyframes cartBump {
  50% { transform: scale(1.3) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

.summary-card { background: var(--bg-3); border-radius: var(--radius); padding: 20px; position: sticky; top: 100px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.summary-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--text-dim); }
.sum-row.total { border-top: 1px dashed var(--border); margin-top: 9px; padding-top: 14px; font-size: 17px; font-weight: 800; color: var(--text); }
.sum-row.total span:last-child { color: var(--warning); font-size: 21px; }
.discount-input { display: flex; gap: 9px; margin: 13px 0; }
.discount-input .input { flex: 1; }
.discount-msg { font-size: 12.5px; margin-top: -6px; margin-bottom: 8px; }
.discount-msg.ok { color: var(--success); }
.discount-msg.bad { color: var(--danger); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(5,8,15,.7);
  backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn .18s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px;
  max-width: 460px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 26px;
  box-shadow: var(--shadow); animation: pop .2s;
}
.modal h3 { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.modal-close { position: absolute; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { margin: 0; }
.modal-close-btn { background: none; border: none; color: var(--muted); font-size: 20px; transition: all .15s; }
.modal-close-btn:hover { color: var(--danger); transform: scale(1.1); }

/* ---------- Buy confirm modal ---------- */
.buy-confirm .bc-product { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; }
.buy-confirm .bc-thumb { width: 64px; height: 64px; flex-shrink: 0; background: var(--bg-2); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.buy-confirm .bc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.buy-confirm .bc-thumb .thumb-fallback { font-size: 26px; }
.buy-confirm .bc-name { font-weight: 700; font-size: 15.5px; line-height: 1.4; }
.buy-confirm .bc-price { color: var(--warning); font-weight: 800; font-size: 17px; margin-top: 4px; }
.buy-confirm .bc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.buy-confirm .bc-label { color: var(--text-dim); font-size: 14px; }
.buy-confirm .bc-stock { color: var(--text-dim); font-size: 13px; }
.buy-confirm .bc-summary { border: 1px solid var(--border); border-radius: 14px; padding: 6px 14px; margin-bottom: 18px; }
.buy-confirm .bc-line { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; }
.buy-confirm .bc-line + .bc-line { border-top: 1px dashed var(--border); }
.buy-confirm .bc-line span:first-child { color: var(--text-dim); }
.buy-confirm .bc-line span:last-child { font-weight: 700; }
.buy-confirm .cart-confirm-list { margin-bottom: 16px; }
.buy-confirm .cart-confirm-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.buy-confirm .cart-confirm-item .bc-thumb { width: 48px; height: 48px; }
.buy-confirm .cart-confirm-item .bc-info { flex: 1; min-width: 0; }
.buy-confirm .cart-confirm-item .bc-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buy-confirm .cart-confirm-item .bc-price { font-size: 14px; margin-top: 2px; }
.buy-confirm .cart-confirm-item .qty-ctl { margin-top: 6px; }
.buy-confirm .ci-line-total { font-weight: 800; color: var(--text); white-space: nowrap; }

/* ---------- Checkout card ---------- */
.modal:has(.checkout-card) { max-width: min(560px, calc(100vw - 32px)); padding: 22px 24px; }
.modal:has(.checkout-card) .modal-head { margin-bottom: 18px; }
.modal:has(.checkout-card) .modal-head h3 { font-size: 19px; font-weight: 700; color: #F5F7FF; display: flex; align-items: center; gap: 10px; }
.modal:has(.checkout-card) .modal-head h3 .ic { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.modal:has(.checkout-card) .modal-head .modal-close-btn { display: flex; align-items: center; justify-content: center; padding: 6px; border-radius: 9px; font-size: 18px; color: #A7B0C0; }
.modal:has(.checkout-card) .modal-head .modal-close-btn:hover { color: #FF5C5C; }

/* ---------- Legal Modal (Terms, Privacy, Guide) ---------- */
#legalModal .modal {
  max-width: min(780px, calc(100vw - 32px));
  width: 100%;
  padding: 28px 32px;
  border-radius: 20px;
}
#legalModal .modal-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
#legalModal .modal-head h3 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}
#legalContent {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.85;
  white-space: pre-line;
  word-break: break-word;
  padding-top: 4px;
  padding-bottom: 8px;
}

/* ---------- News Modal Popup ---------- */
.modal:has(.news-modal-wrap) {
  max-width: min(680px, calc(100vw - 32px));
  padding: 24px 28px;
}
.news-modal-wrap {
  display: flex;
  flex-direction: column;
}
.news-modal-wrap .nm-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  width: fit-content;
}
.news-modal-wrap .nm-thumb {
  width: 100%;
  max-height: 380px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.news-modal-wrap .nm-thumb img {
  max-width: 100%;
  max-height: 380px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}
.news-modal-wrap .nm-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding-bottom: 10px;
}

.checkout-card { display: flex; flex-direction: column; color: #F5F7FF; }
.cc-product { display: flex; gap: 16px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 15px; }
.cc-thumb { width: 92px; height: 92px; flex-shrink: 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cc-thumb .thumb-fallback { font-size: 40px; color: #7F8BA0; }
.cc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cc-name { font-weight: 700; font-size: 17px; line-height: 1.35; color: #F5F7FF; }
.cc-variants { display: flex; flex-direction: column; gap: 8px; }
.cc-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 10px 14px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 11px; color: #F5F7FF; cursor: pointer; text-align: left; transition: all .15s; }
.cc-chip:hover:not(:disabled) { border-color: #67E8F9; background: var(--bg-3); }
.cc-chip.sel { border-color: #B7FF65; background: var(--bg-3); box-shadow: 0 0 0 1px #B7FF65, 0 3px 12px rgba(183, 255, 101, 0.10); }
.cc-chip:disabled { opacity: .45; cursor: not-allowed; }
.cc-chip-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; color: #F5F7FF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-chip-stock { font-size: 11.5px; font-weight: 500; color: #A7B0C0; white-space: nowrap; }
.cc-chip-price { font-weight: 700; font-size: 14px; color: #FFC107; white-space: nowrap; }
.cc-qty-row { display: flex; align-items: center; gap: 12px; }
.cc-label { color: #A7B0C0; font-size: 13.5px; white-space: nowrap; }
.cc-qty-row .qty-ctl { margin-top: 0; gap: 4px; }
.cc-qty-row .qty-ctl button { width: 32px; height: 32px; font-size: 16px; color: #F5F7FF; }
.cc-qty-row .qty-ctl button:hover { color: #67E8F9; }
.cc-qty-row .qty-ctl button:disabled { color: #7F8BA0; }
.cc-qty-row .qty-ctl span { min-width: 42px; font-size: 15px; color: #F5F7FF; }
.cc-stock { margin-left: auto; font-size: 12.5px; color: #A7B0C0; white-space: nowrap; }

.cc-coupon { margin-top: 14px; }
.cc-coupon-row { display: flex; gap: 10px; }
.cc-coupon-input { flex: 3; min-width: 0; display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 14px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 11px; transition: border-color .15s; }
.cc-coupon-input:focus-within { border-color: #67E8F9; }
.cc-coupon-icon { font-size: 15px; opacity: .9; }
.cc-coupon-field { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: #F5F7FF; font-size: 14px; font-family: inherit; }
.cc-coupon-field::placeholder { color: #7F8BA0; }
.cc-coupon-btn { flex: 1; min-width: 0; height: 46px; padding: 0 12px; font-size: 14px; font-weight: 700; border-radius: 11px; color: #F5F7FF; }

.cc-bill { margin-top: 14px; padding: 4px 16px 8px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 14px; }
.cc-bill .bc-head { padding: 12px 0 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.4px; color: #A7B0C0; text-transform: uppercase; }
.cc-bill .bc-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; }
.cc-bill .bc-line span:first-child { color: #A7B0C0; }
.cc-bill .bc-line span:last-child { font-weight: 600; color: #F5F7FF; }
.cc-bill .bc-line.bc-div { border-top: 1px dashed var(--border); }
.cc-bill .bc-line.total span:last-child { font-weight: 800; color: #FFC107; font-size: 15.5px; }
.cc-submit { margin-top: 16px; width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 15.5px; font-weight: 700; border-radius: 12px; color: #F5F7FF; }
.cc-submit:disabled { opacity: .65; cursor: not-allowed; filter: grayscale(.35); }
.cc-submit .ic { color: currentColor; flex-shrink: 0; width: 1.15em; height: 1.15em; }

/* ---------- Wallet & Deposit ---------- */
.balance-hero { background: var(--bg-3); border: 1px solid var(--border); border-radius: 18px; padding: 30px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.balance-label { color: var(--text-dim); font-size: 14px; }
.balance-value { font-size: 36px; font-weight: 800; color: var(--warning); }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; justify-content: flex-start; }

.deposit-wrap { max-width: 620px; margin: 0 auto; }
.deposit-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 24px; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.deposit-panel .section-title { text-align: center; }
.tab-btn { padding: 9px 18px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim); font-weight: 600; font-size: 13.5px; transition: all .2s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 16px var(--accent-glow); }
.tab-btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }

.maint-banner { background: var(--bg-3); border: 1px solid var(--border); color: var(--warning); border-radius: 12px; padding: 13px 16px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; }
.warn-banner { background: var(--bg-3); border: 1px solid var(--border); color: var(--danger); border-radius: 12px; padding: 13px 16px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; display: flex; gap: 9px; align-items: flex-start; line-height: 1.5; }

/* ---------- Tables & Fee Table ---------- */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table-wrap th, .table-wrap td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-wrap th {
  background: var(--bg-2);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}
.fee-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  margin-top: 14px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}
.fee-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.fee-table th, .fee-table td {
  padding: 10px 10px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.fee-table th:first-child, .fee-table td:first-child {
  text-align: left;
  padding-left: 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-2);
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 2px 0 6px rgba(0,0,0,0.25);
}

/* Amount Chips - Standard Money Format */
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.amount-chip {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 90px;
  padding: 10px 14px;
  border-radius: 11px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
  white-space: nowrap;
}
.amount-chip:hover { border-color: var(--accent); color: var(--accent-2); background: var(--bg-3); }
.amount-chip.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px var(--accent-glow); }

.qr-card { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 22px 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.qr-code-frame { width: 220px; height: 220px; margin: 0 auto 16px; padding: 10px; background: #ffffff; border-radius: 18px; box-shadow: 0 4px 20px rgba(0,0,0,.25), 0 0 0 3px var(--accent), 0 0 0 6px var(--bg-3); display: flex; align-items: center; justify-content: center; }
.qr-code-frame img { width: 100%; height: 100%; object-fit: contain; }
.qr-detail-box { background: var(--bg-3); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 14px 0 16px; display: flex; flex-direction: column; gap: 10px; }
.qr-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }

/* Mobile bottom nav */
.mobile-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  display: none; background: var(--bg-3); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom, 0));
  grid-template-columns: repeat(6, 1fr);
}
.mnav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 4px;
  color: var(--text-dim); font-size: 11px;
  font-weight: 600; border-radius: 10px;
  transition: all .2s;
  min-width: 44px; /* ensure min touch width */
}
.mnav-item .mnav-ic { display: grid; place-items: center; width: 24px; height: 24px; line-height: 1; }
.mnav-item .mnav-ic svg { width: 24px; height: 24px; display: block; }
.mnav-item em { font-style: normal; }
.mnav-item:hover { color: var(--text); }
.mnav-item.active { color: var(--accent); background: var(--bg-3); }

/* Notifications */
.notif-item { display: flex; gap: 13px; padding: 15px 16px; background: var(--bg-3); border-radius: var(--radius); margin-bottom: 11px; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); text-decoration: none; color: inherit; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.notif-item:hover { transform: translateX(3px); background: var(--bg-3); }
.notif-item.unread { border-left: 4px solid var(--accent); background: linear-gradient(90deg, var(--bg-3), var(--card)); }
.notif-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--bg-3); color: var(--accent); display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.notif-content { flex: 1; min-width: 0; }
.notif-content .ni-title { font-weight: 700; font-size: 14.5px; margin-bottom: 3px; color: var(--text); }
.notif-content .ni-content { font-size: 13px; color: var(--text-dim); line-height: 1.5; word-break: break-word; }
.notif-content .ni-time { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* Toast */
#toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--bg-2); border: 1px solid var(--border); border-radius: 13px; padding: 13px 18px; box-shadow: var(--shadow); color: var(--text); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 11px; min-width: 280px; max-width: 420px; pointer-events: auto; animation: toastIn .22s cubic-bezier(0,0,.2,1); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-info { border-color: var(--info); }

/* ---------- Mobile Side Drawer (Left Slide-In Navigation) ---------- */
.drawer-head,
.drawer-user-wrap,
.drawer-group-label,
.drawer-sys-footer,
.drawer-footer-actions,
.hide-d {
  display: none !important;
}

.drawer-scroll-body,
.drawer-nav-group {
  display: contents;
}
.nav-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.nav-backdrop.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Media Queries */
@media (max-width: 980px) {
  .cart-layout, .profile-grid { grid-template-columns: 1fr; }
  .profile-side, .summary-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hamburger { display: grid; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }
  html.drawer-open,
  body.drawer-open {
    overflow: hidden !important;
    touch-action: none !important;
    height: 100% !important;
  }
  body.drawer-open .mobile-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .nav-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: rgba(0, 0, 0, 0.82) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    z-index: 99998 !important;
    opacity: 0;
    pointer-events: none;
    touch-action: none !important;
    transition: opacity 0.3s ease;
  }
  .nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: 300px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 100000 !important;
    background: var(--bg-2) !important;
    border-right: 1px solid var(--border) !important;
    border-bottom: none !important;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.95) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: max(16px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform;
  }
  .nav-links.open {
    display: flex !important;
    transform: translateX(0) !important;
  }
  .drawer-user-wrap,
  .drawer-footer-actions,
  .drawer-group-label,
  .hide-d {
    display: block !important;
  }
  .drawer-sys-footer,
  .drawer-nav-group,
  .drawer-scroll-body {
    display: flex !important;
  }
  .drawer-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .drawer-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .drawer-close-btn:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--bg-3);
    box-shadow: 0 0 12px rgba(132, 204, 22, 0.3);
  }
  .drawer-scroll-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex: 1;
    padding-right: 2px;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .drawer-scroll-body::-webkit-scrollbar {
    width: 4px;
  }
  .drawer-scroll-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
  }

  /* User & Guest Card in Drawer */
  .drawer-user-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  .duc-avatar-wrap {
    display: flex;
    align-items: center;
  }
  .duc-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--grad);
    color: #000;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
  }
  .duc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }
  .duc-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .duc-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .duc-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
  }
  .badge-danger { background: var(--bg-3); color: #f87171; border: 1px solid var(--border); }
  .badge-warning { background: var(--bg-3); color: #fbbf24; border: 1px solid var(--border); }
  .badge-info { background: var(--bg-3); color: #60a5fa; border: 1px solid var(--border); }

  .duc-email {
    font-size: 11.5px;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .duc-bal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .duc-bal-label {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .duc-bal-label strong {
    color: var(--accent);
    font-weight: 700;
  }
  .duc-deposit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-3);
    color: var(--accent);
    border: 1px solid var(--border);
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 8px;
    padding: 3px 9px;
    transition: all 0.2s ease;
    text-decoration: none;
  }
  .duc-deposit-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 10px rgba(132, 204, 22, 0.4);
  }

  .drawer-guest-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
  }
  .dgc-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
  }
  .dgc-sub {
    font-size: 11.5px;
    color: var(--text-dim);
    margin-bottom: 10px;
  }
  .dgc-btns {
    display: flex;
    gap: 8px;
  }

  /* Nav Items Groups */
  .drawer-nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .drawer-group-label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 8px 0 4px 6px;
  }
  .nav-links a.nav-item,
  .nav-links .nav-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    color: var(--text-dim) !important;
    background: transparent;
    border: 1px solid transparent !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-decoration: none !important;
    position: relative;
  }
  .nav-links a.nav-item:hover,
  .nav-links .nav-item:hover {
    color: #fff !important;
    background: var(--bg-3) !important;
    border-color: var(--border) !important;
  }
  .nav-links a.nav-item.active {
    color: #fff !important;
    background: var(--bg-3) !important;
    border: 1px solid var(--border) !important;
  }
  .nav-links a.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px var(--accent);
  }
  .nav-links a.nav-item svg.ic,
  .nav-links .nav-item svg.ic {
    display: block !important;
    font-size: 19px !important;
    width: 19px !important;
    height: 19px !important;
    color: currentColor !important;
    flex-shrink: 0 !important;
  }
  .drawer-badge {
    margin-left: auto;
    background: var(--accent);
    color: #000;
    font-size: 11px;
    font-weight: 800;
    border-radius: 10px;
    padding: 1px 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav-item-admin {
    color: #fbbf24 !important;
    background: var(--bg-3) !important;
    border: 1px solid var(--border) !important;
  }
  .nav-item-admin:hover {
    background: var(--bg-3) !important;
    border-color: var(--border) !important;
  }
  .drawer-footer-actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .drawer-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 12px;
    color: #ef4444;
    background: var(--bg-3);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .drawer-logout-btn:hover {
    background: var(--bg-3);
    border-color: var(--border);
    color: #f87171;
  }
  .drawer-sys-footer {
    padding: 12px 6px 4px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--muted);
    border-top: 1px solid var(--border);
  }
  .dsf-status {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4ade80;
    font-weight: 600;
  }
  .dsf-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
  }
  .nav-actions .hide-m { display: none; }
  .user-chip .u-info { display: none; }
  .nav { position: relative; }
}

@media (max-width: 768px) {
  body { font-size: 13.5px; }
  .mobile-nav {
    display: grid;
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(60px + env(safe-area-inset-bottom));
  }
  .page { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  #toast-wrap { bottom: calc(76px + env(safe-area-inset-bottom)); left: 14px; right: 14px; }
  .toast { min-width: 0; width: 100%; font-size: 14px; padding: 12px 16px; border-radius: 14px; }
  .dropdown { position: static; }
  .dropdown-menu { position: absolute; top: calc(100% + 8px); left: 50%; right: auto; transform: translateX(-50%); width: min(300px, calc(100vw - 48px)); max-height: min(52vh, 340px); overflow-y: auto; padding: 6px; }
  .container { padding: 0 16px; }

  /* ─── Hero Banner: mobile responsive fix ─── */
  .hero-banner-wrap {
    margin: 10px 0 20px;
    border-radius: 14px;
  }
  /* Banner không có ảnh: padding nhỏ gọn */
  .hero-banner {
    padding: 28px 16px 24px;
    border-radius: 14px;
    margin-bottom: 0;
    background-size: cover;
    background-position: center;
    /* Đảm bảo không overflow ra ngoài viewport */
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Banner có ảnh (has-bg): dùng aspect-ratio để chiều cao tự điều chỉnh chuẩn */
  .hero-banner.has-bg {
    /* Tỉ lệ 16:9 → 18:9 tuỳ màn hình dọc — giảm padding lớn */
    padding: 0;
    min-height: 0;
    aspect-ratio: 16 / 9;
    justify-content: flex-end;
    /* Tối thiểu 180px, tối đa 280px — không cho phép phình quá lớn */
    min-height: clamp(180px, 52vw, 280px);
    max-height: 280px;
  }
  /* Nội dung nằm trên ảnh: đặt lại padding cho hero-content */
  .hero-banner.has-bg .hero-content {
    width: 100%;
    padding: 16px 14px 14px;
    box-sizing: border-box;
  }
  /* Ảnh nền: đảm bảo phủ đúng và không bị lệch */
  .hero-bg-img {
    object-position: center top; /* Ưu tiên hiển thị phần trên cùng của ảnh */
  }
  /* Tắt hover zoom trên touch (không có hover thật) */
  .hero-banner:hover .hero-bg-img {
    transform: none;
  }
  /* hero-content: full width trên mobile */
  .hero-content {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }
  .hero-title { font-size: 20px; margin-bottom: 8px; line-height: 1.3; }
  .hero-sub { font-size: 12.5px; margin-bottom: 14px; }
  .hero-actions { width: 100%; gap: 8px; flex-direction: row; flex-wrap: wrap; }
  .hero-btn { flex: 1; min-width: 130px; padding: 11px 12px; font-size: 12.5px; border-radius: 12px; min-height: 44px; }
  .hero-trust-bar { gap: 6px; padding: 7px 12px; font-size: 11px; flex-wrap: wrap; border-radius: 20px; justify-content: center; width: 100%; box-sizing: border-box; }
  .trust-item { font-size: 11px; gap: 4px; }
  .trust-divider { display: none; } /* Bỏ chấm phân cách trên mobile chật */

  .section { margin-top: 24px; }
  .section-head { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
  .section-title { font-size: 16.5px; }
  .section-title::before { height: 16px; }
  .modal-overlay { padding: 10px; }
  .modal { padding: 20px 16px; border-radius: 18px; max-height: 88vh; }
  .modal h3 { font-size: 15.5px; }
  .balance-hero { padding: 18px 16px; border-radius: 16px; }
  .input, .select, textarea.input { font-size: 16px !important; border-radius: 12px; min-height: 44px; }
  .deposit-panel { padding: 18px 16px; border-radius: 16px; }
  .table-wrap { overflow-x: auto; border-radius: 14px; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 540px; }
  .balance-value { font-size: 24px; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
  .feature { padding: 16px 12px; border-radius: 14px; }
  .feature .f-icon { width: 34px; height: 34px; font-size: 16px; }
  .feature h3 { font-size: 12.5px; }
  .feature p { font-size: 11px; }
.footer-grid { grid-template-columns: 1fr; gap: 20px; }

  /* ─── Coverflow Mobile ─── */
  .coverflow-viewport {
    height: 680px;
  }
  .coverflow-item-3d {
    width: calc(100vw - 80px);
    max-width: 310px;
  }
  .coverflow-btn {
    width: 40px;
    height: 40px;
  }

  /* ─── Checkout Popup Mobile: bottom sheet improvements ─── */
  .modal-overlay.open .modal {
    max-height: 92vh;
  }
  .mc-col-left { border-right: none; border-bottom: 1px solid var(--border); }
  .mc-prod-banner { height: 180px; }
  .mc-main-price { font-size: 20px; }
  .mc-submit-btn { height: 46px; font-size: 14px; }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
    padding: 0;
  }

  /* ─── Product Card V2: tlong8m5.site clean 1-column layout ─── */
  .product-card-v2 {
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
    border-radius: 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    position: relative;
  }
  .pc-head-tags {
    position: relative;
    top: auto; left: auto; right: auto;
    padding: 12px 14px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    z-index: 2;
  }
  .pc-head-tags .tag-badge {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--accent-2);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 7px;
  }
  .pc-head-tags .stock-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 7px;
  }
  .pc-head-tags .stock-status.in-stock {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: #4ade80;
  }
  .pc-head-tags .stock-status.out-stock {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: #fca5a5;
  }
  .pc-thumb-v2 {
    height: auto;
    aspect-ratio: 16 / 9;
    padding: 0 14px;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
  }
  .pc-thumb-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
  }
  .pc-body-v2 {
    padding: 12px 14px 6px;
    gap: 6px;
  }
  .pc-title-v2 {
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.3;
    color: #ffffff;
    letter-spacing: -0.2px;
    min-height: 0;
    display: block;
    margin-bottom: 4px;
  }
  .pc-feature-list {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
    padding: 0;
    list-style: none;
  }
  .pc-feature-list li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.35;
  }
  .pc-feature-list li .tick-ic {
    color: var(--accent);
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
  }
  .pc-stats-row {
    padding: 8px 12px;
    margin: 4px 14px 10px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    color: var(--text-dim);
  }
  .pc-footer-v2 {
    padding: 10px 14px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: transparent;
    border-top: 1px solid var(--border);
  }
  .pc-price-wrap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
  }
  .pc-price-wrap .p-lbl {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
  }
  .pc-price-wrap .p-val {
    font-size: 17px;
    font-weight: 800;
    color: var(--accent-2);
  }
  .pc-price-wrap .pc-old {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
    margin-left: 6px;
  }
  .pc-btn-group {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .btn-cart-mc {
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-2);
    color: var(--text-dim);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .btn-cart-mc:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-3);
  }
  .btn-cart-mc:active {
    transform: scale(0.96);
  }
  .btn-buy-mc {
    flex: 1;
    height: 44px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 13.5px;
    font-weight: 800;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #000;
    border: none;
    box-shadow: 0 4px 14px rgba(132, 204, 22, 0.3);
    white-space: nowrap;
  }
  .btn-buy-mc:active {
    transform: scale(0.98);
  }

  /* Quick Deposit Cards */
  .quick-deposit-grid { grid-template-columns: 1fr; gap: 12px; }
  .qd-card { padding: 16px 18px; border-radius: 16px; min-height: 64px; -webkit-tap-highlight-color: transparent; }
  .qd-card:active { transform: scale(0.97); }
  .qd-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
  .qd-title { font-size: 15.5px; }

  /* Compact Auth Card for Mobile */
  .auth-wrap { max-width: 100%; margin: 10px auto; padding: 0 16px; }
  .auth-card { padding: 26px 20px; border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
  .auth-card h2 { font-size: 22px; }
  .auth-card .sub { font-size: 13.5px; margin-bottom: 22px; }


  /* Old product-card list style (horizontal row) */
  .product-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    column-gap: 12px;
    padding: 12px 14px;
    min-height: 84px;
    border-radius: 16px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  }
  .pc-thumb { width: 58px; height: 58px; border-radius: 12px; }
  .pc-name { font-size: 15px; font-weight: 700; min-height: 0; line-height: 1.25; margin-bottom: 2px; }
  .pc-price { font-size: 15px; font-weight: 700; color: var(--warning); }
  .pc-old { font-size: 11.5px; }
  .pc-badges { gap: 4px; margin-top: 3px; }
  .pc-badge { padding: 2px 7px; font-size: 10px; border-radius: 6px; }
  .pc-dot { display: none; }
  .pc-side { gap: 6px; margin-left: 4px; }
  .pc-buy { width: max-content; padding: 0 16px; height: 44px; font-size: 13px; font-weight: 700; border-radius: 10px; }
  .pc-cart { width: 44px; height: 44px; border-radius: 10px; font-size: 16px; }

  .amount-chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .amount-chip { flex: 1 1 calc(33.333% - 6px); min-width: 80px; padding: 12px 6px; font-size: 13.5px; border-radius: 12px; min-height: 44px; }
  .qr-code-frame { width: 180px; height: 180px; }

  /* iOS safe zoom prevention */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], input[type="tel"], select, textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 560px) {
  .container { padding: 0 14px; }
  .form-row { grid-template-columns: 1fr; }
  .page { padding: 18px 0 50px; }
  .balance-value { font-size: 24px; }
  .cart-item { flex-wrap: wrap; gap: 10px; padding: 12px; border-radius: 14px; }
  .cart-item .ci-thumb { width: 54px; height: 54px; border-radius: 10px; }
.nav { gap: 10px; padding: 9px 0; }
  .logo { font-size: 21px; gap: 8px; }
  .logo-badge { width: 36px; height: 36px; border-radius: 50%; font-size: 16px; }
  .user-chip { padding: 3px 8px 3px 3px; }
  .user-chip .avatar { width: 30px; height: 30px; }
  .amount-chip { flex: 1 1 calc(33.333% - 6px); font-size: 12.5px; padding: 9px 4px; }

  /* Checkout Order Modal Mobile Optimization */
  .modal:has(.checkout-card) {
    max-width: calc(100vw - 20px);
    width: 100%;
    padding: 16px 14px;
    border-radius: 18px;
  }
  .cc-product {
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
  }
  .cc-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
  }
  .cc-name {
    font-size: 15px;
    line-height: 1.3;
  }
  .cc-chip {
    padding: 8px 10px;
    min-height: 40px;
  }
  .cc-chip-name {
    font-size: 13px;
  }
  .cc-chip-price {
    font-size: 13px;
  }
  .cc-qty-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .cc-stock {
    width: 100%;
    margin-left: 0;
    font-size: 12px;
  }
  .cc-coupon-row {
    gap: 8px;
  }
  .cc-coupon-input {
    height: 42px;
    padding: 0 10px;
  }
  .cc-coupon-btn {
    height: 42px;
    font-size: 13px;
  }
  .cc-bill {
    padding: 2px 12px 6px;
    border-radius: 12px;
  }
  .cc-submit {
    height: 44px;
    font-size: 14.5px;
    border-radius: 11px;
  }
}

/* ─── 480px: Compact tablet/large phone adjustments ─── */
@media (max-width: 480px) {
  .container { padding: 0 14px; }

  /* Checkout popup: stack vertically, show image as compact strip */
  .mc-checkout-2col { display: flex; flex-direction: column; }
  .mc-col-left {
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 14px 16px; background: var(--bg-3);
  }
  .mc-prod-banner {
    height: 140px; margin-bottom: 10px; border-radius: 10px;
  }
  .mc-desc-section { display: none; } /* Hide desc on very small: saves space */
  .mc-col-right { padding: 14px 16px; gap: 10px; }
  .mc-main-price { font-size: 22px; }
  .mc-coupon-row { flex-direction: column; }
  .mc-coupon-input, .mc-coupon-btn { width: 100%; }
  .mc-submit-btn { height: 50px; font-size: 15px; }

  /* Product grid: single clean column */
  .coverflow-viewport { height: 640px; }
  .coverflow-item-3d { width: calc(100vw - 70px); max-width: 300px; }

  /* Navigation labels shorter */
  .mnav-item em { font-size: 10px; }

  /* hero trust bar stack on 2 rows */
  .hero-trust-bar { flex-wrap: wrap; gap: 8px 14px; }
  .trust-divider { display: none; }

  /* Footer compact */
  footer { padding: 30px 0 20px; }
  .footer-grid { gap: 16px; }

  /* deposit panel */
  .deposit-panel { padding: 14px 14px; }

  /* Quick deposit grid: single column always */
  .quick-deposit-grid { grid-template-columns: 1fr; gap: 10px; }
  .qd-card { padding: 16px 16px; }
  .qd-title { font-size: 15px; }
  .qd-desc { font-size: 12px; }
}

/* ─── 390px: Very small phones (iPhone SE, old Android) ─── */
@media (max-width: 390px) {
  .container { padding: 0 12px; }
  body { font-size: 14px; }

  /* Header: tighter */
.nav { padding: 8px 0; gap: 8px; }
  .logo { font-size: 20px; gap: 7px; }
  .logo-badge { width: 34px; height: 34px; font-size: 15px; border-radius: 50%; }
  .icon-btn { width: 36px; height: 36px; }

  /* Hero: very compact */
  .hero-banner { padding: 22px 12px 18px; }
  .hero-title { font-size: clamp(18px, 5.2vw, 22px); }
  .hero-sub { font-size: 12.5px; }
  .hero-btn { font-size: 12.5px; padding: 10px 10px; }
  .hero-trust-bar { display: none; } /* Trust bar hidden at 390px - too crowded */

  /* Section */
  .section-title { font-size: 16px; }

  /* Product card */
  .pc-title-v2 { font-size: 14px; }
  .pc-price-wrap .p-val { font-size: 15px; }
  .btn-buy-mc { font-size: 12px; padding: 8px 10px; }
  .btn-cart-mc { font-size: 11.5px; padding: 0 8px; }
  .pc-stats-row { font-size: 11px; padding: 6px 10px; }

  /* Checkout modal inner */
  .mc-main-price { font-size: 20px; }
  .mc-group-label { font-size: 12px; }
  .mc-bill-table { font-size: 13px; }

  /* Bottom nav tighter */
  .mnav-item { padding: 6px 1px; font-size: 9.5px; gap: 2px; }
  .mnav-item .mnav-ic { width: 20px; height: 20px; }
  .mnav-item .mnav-ic svg { width: 20px; height: 20px; }

  /* Mobile coverflow */
  .coverflow-viewport { height: 580px; }
  .coverflow-item-3d { width: calc(100vw - 56px); }

  /* Auth form */
  .auth-card { padding: 18px 14px; }
  .auth-card h2 { font-size: 18px; }

  /* Deposit */
  .balance-value { font-size: 24px; }
  .amount-chip { font-size: 12px; padding: 8px 4px; min-height: 40px; }

  /* QR code frame */
  .qr-code-frame { width: 160px; height: 160px; }

  /* Forms */
  .form-group label { font-size: 12.5px; }
  .input, .select, textarea.input { font-size: 16px !important; padding: 10px 12px; }
  .btn { padding: 10px 14px; font-size: 13px; }
  .btn-lg { padding: 12px 18px; font-size: 14px; }

  /* Table */
  .table-wrap table { min-width: 480px; }

  /* Notifications */
  .notif-item { padding: 12px; gap: 10px; }
  .notif-icon { width: 36px; height: 36px; font-size: 16px; }
  .notif-content .ni-title { font-size: 13.5px; }
.notif-content .ni-content { font-size: 12px; }
}


/* ---------- Page Loader ---------- */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  transition: opacity .2s;
}
#page-loader.active { display: flex; }
.loader-ring {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--bg-3);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Order history — Download & Video links ---------- */
.order-links { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.order-link-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--text-dim); text-decoration: none; transition: all .15s;
}
.order-link-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-3); }
.order-link-btn.dl { border-color: var(--border); color: #6ee7b7; }
.order-link-btn.dl:hover { background: var(--bg-3); border-color: #10b981; }
.order-link-btn.vid { border-color: var(--border); color: #fca5a5; }
.order-link-btn.vid:hover { background: var(--bg-3); border-color: #ef4444; }

/* ---------- Skeleton Loading (Smooth pulsing placeholders) ---------- */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-box, .skeleton-line {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-3) 37%, var(--bg-3) 63%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 6px;
}

.skeleton-card {
  pointer-events: none !important;
  user-select: none !important;
  border-color: var(--border) !important;
  background: var(--card) !important;
}

/* ---------- Monochrome System Icons (Bỏ màu sắc icon) ---------- */
svg.ic, .icon, .f-icon svg, .qd-icon svg, .nav-icon svg, .tab-ic svg {
  color: currentColor !important;
  fill: none;
}
svg.ic path, svg.ic circle, svg.ic polyline, svg.ic line, svg.ic rect {
  stroke: currentColor;
}

.coverflow-section {
  position: relative;
  margin: 15px 0 30px;
  z-index: 10;
}
.coverflow-viewport {
  position: relative;
  width: 100%;
  height: 780px;
  overflow: visible;
  touch-action: pan-y pinch-zoom;
}
.coverflow-track-3d {
  position: relative;
  width: 100%;
  height: 100%;
}
.coverflow-item-3d {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(320px, 75vw, 380px);
  max-width: 380px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
  will-change: transform, opacity;
}
.coverflow-item-3d.active .product-card-v2 {
  border-color: var(--accent);
  box-shadow: 0 12px 36px rgba(132, 204, 22, 0.35), 0 0 0 1.5px var(--accent-glow);
}

/* Controls: Visible Glass Arrow Buttons & Dots */
.coverflow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
}
.coverflow-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1.5px solid var(--accent);
  color: var(--accent) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
}
.coverflow-btn.prev-btn { left: 8px; }
.coverflow-btn.next-btn { right: 8px; }
.coverflow-btn svg.ic, .coverflow-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent) !important;
  color: var(--accent) !important;
}
.coverflow-btn:hover {
  background: var(--accent);
  color: #000000 !important;
  box-shadow: 0 0 16px var(--accent);
  transform: translateY(-50%) scale(1.1);
}
.coverflow-btn:hover svg.ic, .coverflow-btn:hover svg {
  stroke: #000000 !important;
  color: #000000 !important;
}
.coverflow-btn:active {
  transform: translateY(-50%) scale(0.94);
}
.coverflow-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.coverflow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.coverflow-dot.active {
  width: 24px;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- Mobile Glassmorphism Header, Bottom Nav & Bottom-Sheet Modal ---------- */
@media (max-width: 768px) {
  header {
    background: var(--bg-2) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .mobile-nav-bar {
    background: var(--bg-2) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid var(--border) !important;
  }
  .mobile-nav-bar .nav-item {
    position: relative;
  }
  .mobile-nav-bar .nav-item.active::after {
    content: '';
    position: absolute;
    top: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
  }

  /* Center modal on mobile with margins and shadow */
  .modal-overlay {
    align-items: center !important;
    padding: 16px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px) !important;
  }
  .modal {
    width: 100% !important;
    max-width: 420px !important;
    border-radius: 20px !important;
    padding: 24px 18px !important;
    margin: 0 auto !important;
    max-height: 85vh !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border) !important;
    animation: pop 0.2s ease-out !important;
  }
}

.skeleton-line {
  height: 12px;
  width: 100%;
  display: inline-block;
}

.skeleton-tag {
  height: 18px;
  width: 60px;
  border-radius: 12px;
}

.skeleton-title {
  height: 15px;
  width: 90%;
  border-radius: 4px;
}

/* ---------- Realtime Card Fee Calculator Preview ---------- */
.card-net-preview {
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-dim);
  transition: all 0.2s ease;
}
.card-net-preview .net-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}
.card-net-preview .fee-badge {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--bg-3);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.fee-table-sync-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 8px;
}
.fee-table-sync-note .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* ---------- Custom Select Dropdown & Slide-Down Animation ---------- */
@keyframes selectSlideDown {
  0% { opacity: 0.6; transform: translateY(-4px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

select.select, select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2384cc16' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 38px !important;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

select.select:hover, select:hover {
  border-color: var(--border);
  box-shadow: 0 4px 16px var(--bg-3);
}

select.select:focus, select:focus, select:active {
  animation: selectSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-glow), 0 8px 24px rgba(0, 0, 0, 0.4);
}

select.select option, select option {
  background-color: var(--bg-2);
  color: var(--text);
  padding: 12px;
  font-size: 14px;
}

/* Video Section */
.video-section { margin-top: 32px; }
.video-carousel {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-2);
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  position: relative;
  padding-bottom: 8px;
}
.video-carousel::-webkit-scrollbar {
  height: 6px;
}
.video-carousel::-webkit-scrollbar-track {
  background: var(--bg-2);
  border-radius: 4px;
}
.video-carousel::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}
.video-carousel-inner {
  display: flex;
  gap: 16px;
  padding-right: 16px;
}
.video-carousel-inner .video-card {
  flex: 0 0 88%;
  min-width: 88%;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.video-carousel-inner .video-card video {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #000;
}
.video-title {
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .video-carousel-inner .video-card {
    flex: 0 0 45%;
    min-width: 45%;
  }
}
@media (min-width: 1024px) {
  .video-carousel-inner .video-card {
    flex: 0 0 31%;
    min-width: 31%;
  }
}

/* ---------- Scroll Reveal ---------- */
.product-card-wrapper.reveal-pending {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.product-card-wrapper.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile Optimizations (Business Standard) ---------- */
@media (hover: none) and (pointer: coarse) {
  .news-card .n-body {
    padding: 16px;
  }
  .news-card h3 {
    font-size: 16px;
  }
  .news-card p {
    font-size: 13.5px;
    margin-bottom: 12px;
  }
  .video-title {
    font-size: 14px;
    padding: 12px 16px;
  }
}

/* ---------- Horizontal Scroll Row ---------- */
.product-card-wrapper {
  display: flex;
}
.product-card-wrapper .product-card-v2 {
  flex: 1;
  width: 100%;
}
.h-scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(132, 204, 22, 0.4) var(--bg-2);
}
.h-scroll-row::-webkit-scrollbar {
  height: 6px;
}
.h-scroll-row::-webkit-scrollbar-track {
  background: var(--bg-2);
  border-radius: 6px;
}
.h-scroll-row::-webkit-scrollbar-thumb {
  background: rgba(132, 204, 22, 0.4);
  border-radius: 6px;
}
.h-scroll-row .product-card-wrapper {
  flex: 0 0 300px;
  min-width: 300px;
  max-width: 300px;
  scroll-snap-align: start;
}
@media (max-width: 768px) {
  .h-scroll-row .product-card-wrapper {
    flex: 0 0 88vw;
    min-width: 88vw;
    max-width: 88vw;
  }
}

/* ---------- Section "View all" link ---------- */
.section-more {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding: 7px 14px;
  border: 1px solid rgba(132, 204, 22, 0.3);
  border-radius: 10px;
  background: rgba(132, 204, 22, 0.07);
  transition: all 0.2s ease;
}
.section-more:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ---------- CTA Banner (guest) ---------- */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 28px 30px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.10), rgba(132, 204, 22, 0.03));
  border: 1px solid rgba(132, 204, 22, 0.25);
}
.cta-banner h3 {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.cta-banner p {
  font-size: 13.5px;
  color: var(--text-dim);
}
@media (max-width: 560px) {
  .cta-banner {
    padding: 20px 18px;
    text-align: center;
    justify-content: center;
  }
  .cta-banner h3 { font-size: 16.5px; }
}

@media (max-width: 480px) {
  .grid-3 {
    gap: 16px;
  }
  .section-title {
    font-size: 18px;
  }
}

/* ---------- Accessibility: Reduce motion for users who prefer it ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .logo-badge { animation: none !important; }
  .hero-bg-img { animation: none !important; }
}
