/* ================================================
   NePlus-X — Premium Dark Red Theme
   ================================================ */

/* --- CSS Variables --- */
:root {
  --bg-body: #050505;
  --bg-primary: #0a0a0a;
  --bg-secondary: #0f0f0f;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --bg-elevated: #1a1a1a;
  --bg-input: #0d0d0d;
  --border: #1e1e1e;
  --border-light: #2a2a2a;
  --border-focus: #e63946;
  --text-primary: #f5f5f5;
  --text-secondary: #999999;
  --text-muted: #555555;
  --text-inverse: #0a0a0a;
  --accent: #e63946;
  --accent-dark: #b91c1c;
  --accent-darker: #8b1a1a;
  --accent-light: #ff6b6b;
  --accent-glow: rgba(230, 57, 70, 0.12);
  --accent-glow-strong: rgba(230, 57, 70, 0.25);
  --gradient-accent: linear-gradient(135deg, #e63946 0%, #b91c1c 100%);
  --gradient-accent-h: linear-gradient(135deg, #ff6b6b 0%, #e63946 100%);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-light); }

img { max-width: 100%; display: block; }

button { cursor: pointer; font-family: var(--font); border: none; outline: none; }

input, textarea, select {
  font-family: var(--font);
  outline: none;
  border: none;
  background: var(--bg-input);
  color: var(--text-primary);
}

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

/* --- Loading Screen --- */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-body);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
.loading-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: loadPulse 1.2s infinite;
}
.loading-bar {
  width: 160px; height: 3px;
  background: var(--border);
  border-radius: 2px; margin-top: 24px; overflow: hidden;
}
.loading-bar-inner {
  width: 40%; height: 100%;
  background: var(--gradient-accent);
  border-radius: 2px;
  animation: loadSlide 1s infinite ease-in-out;
}
@keyframes loadPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes loadSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* --- Navigation --- */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
#navbar.scrolled { background: rgba(5, 5, 5, 0.95); box-shadow: var(--shadow); }

.nav-container {
  max-width: 1280px; margin: 0 auto;
  height: 100%; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 800;
  color: var(--text-primary) !important;
  letter-spacing: -0.5px;
}
.site-logo {
  width: auto;
  height: 42px;
  max-width: 180px;
  object-fit: contain;
}

.nav-menu {
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  color: var(--text-secondary) !important;
  font-size: 14px; font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary) !important;
  background: var(--accent-glow);
}
.nav-link.active::after {
  content: ''; position: absolute;
  bottom: -1px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.nav-icon { width: 16px; height: 16px; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 6px; background: none;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  transition: var(--transition);
  white-space: nowrap; border: none;
}
.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--gradient-accent-h);
  box-shadow: 0 4px 20px var(--accent-glow-strong);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--accent-glow); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* --- Inputs --- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-select { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Checkbox / Captcha */
.checkbox-group {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
  user-select: none;
}
.checkbox-group:hover { border-color: var(--border-light); }
.checkbox-custom {
  width: 22px; height: 22px;
  border: 2px solid var(--border-light);
  border-radius: 5px; position: relative;
  flex-shrink: 0; transition: var(--transition);
}
.checkbox-group input { display: none; }
.checkbox-group input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-group input:checked + .checkbox-custom::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.checkbox-label { font-size: 14px; color: var(--text-secondary); }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}
.card-glow:hover {
  border-color: rgba(230, 57, 70, 0.3);
  box-shadow: var(--shadow-glow);
}

/* --- Action popup --- */
.toast-container {
  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center; padding: 20px;
  background: rgba(5, 6, 9, 0.66);
  backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.toast-container.is-open {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.toast {
  width: min(420px, 100%); padding: 22px;
  border: 1px solid var(--border-light); border-radius: var(--radius-xl);
  color: var(--text-primary); background: var(--bg-card);
  animation: popupIn .24s cubic-bezier(.2, .9, .25, 1.1);
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .52);
}
.action-popup-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 21px; font-weight: 900; }
.action-popup-copy { flex: 1; min-width: 0; padding-top: 1px; }
.action-popup-copy strong { display: block; font-size: 16px; }
.action-popup-copy p { margin: 5px 0 0; color: var(--text-secondary); font-size: 14px; line-height: 1.45; }
.action-popup-close { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--text-muted); font-size: 23px; line-height: 1; }
.action-popup-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.toast-success { border-color: rgba(34, 197, 94, .42); }
.toast-success .action-popup-icon { color: #b5f6ca; background: rgba(34, 197, 94, .16); }
.toast-error { border-color: rgba(239, 68, 68, .46); }
.toast-error .action-popup-icon { color: #ffc0c0; background: rgba(239, 68, 68, .16); }
.toast-info { border-color: rgba(96, 165, 250, .45); }
.toast-info .action-popup-icon { color: #bfdbfe; background: rgba(59, 130, 246, .16); }
.toast.removing { animation: popupOut .18s ease forwards; }
@keyframes popupIn { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes popupOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.96); } }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  touch-action: manipulation;
  animation: fadeIn 0.2s;
}
.modal-overlay.hidden { display: none; }
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 520px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  position: relative;
  pointer-events: auto;
  touch-action: manipulation;
  animation: modalIn 0.3s cubic-bezier(0.21, 1.02, 0.73, 1);
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: none; color: var(--text-muted);
  font-size: 20px; transition: var(--transition);
}
.modal-close:hover { background: var(--accent-glow); color: var(--accent); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.purchase-popup-header { align-items: flex-start; }
.purchase-popup-eyebrow { display: block; margin-bottom: 4px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.purchase-popup-body { text-align: center; }
.purchase-popup-icon {
  width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 50%; color: #ffd0d5; background: var(--accent-glow); border: 1px solid rgba(230, 57, 70, .35);
}
.purchase-popup-icon svg { width: 27px; height: 27px; }
.purchase-popup-name { margin-bottom: 18px; font-size: 17px; font-weight: 700; line-height: 1.45; }
.purchase-popup-summary { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); text-align: left; background: var(--bg-secondary); }
.purchase-popup-row, .purchase-popup-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; font-size: 14px; }
.purchase-popup-row { border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.purchase-popup-row strong { color: var(--text-primary); }
.purchase-popup-row.discount strong { color: #72e2a0; }
.purchase-popup-total { background: rgba(230, 57, 70, .08); }
.purchase-popup-total span { font-weight: 600; }
.purchase-popup-total strong { color: var(--accent); font-size: 19px; }
.purchase-popup-note { margin-top: 16px; color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.purchase-popup-footer { justify-content: space-between; }
.purchase-popup-footer .btn, .purchase-popup-header .modal-close { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 420px) { .purchase-popup-footer { flex-direction: column-reverse; } .purchase-popup-footer .btn { width: 100%; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* --- Main Content Area --- */
#app {
  flex: 1;
  padding-top: var(--nav-height);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 60px 24px 52px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(8, 8, 8, 0.98), rgba(8, 8, 8, 0.7));
}
.ambient-glow {
  position: absolute; width: 520px; height: 520px;
  top: -190px; left: 18%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.24) 0%, rgba(120, 15, 22, 0.1) 34%, transparent 70%);
  filter: blur(30px);
  animation: ambientGlowDrift 11s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
@keyframes ambientGlowDrift {
  0% { transform: translate3d(-4%, -2%, 0) scale(0.94); opacity: 0.72; }
  50% { transform: translate3d(10%, 8%, 0) scale(1.08); opacity: 1; }
  100% { transform: translate3d(20%, -4%, 0) scale(0.98); opacity: 0.8; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-glow { animation: none; }
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 0%, rgba(230, 57, 70, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 20% 50%, rgba(230, 57, 70, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 80% 50%, rgba(185, 28, 28, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(230,57,70,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,57,70,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 78% 82% at 48% 45%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 78% 82% at 48% 45%, black, transparent);
}

.hero-layout {
  position: relative; z-index: 1;
  max-width: 1280px; min-height: 430px;
  margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  align-items: center; gap: clamp(44px, 7vw, 112px);
}
.hero-content { max-width: 740px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 50px;
  background: var(--accent-glow);
  border: 1px solid rgba(230,57,70,0.2);
  font-size: 13px; font-weight: 500; color: var(--accent-light);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero h1 {
  font-size: clamp(42px, 4.7vw, 70px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -1.6px;
  animation: fadeInUp 0.6s 0.1s both;
}
.hero h1 .text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 17px; color: var(--text-secondary);
  max-width: 620px; margin: 0 0 26px;
  line-height: 1.7;
  animation: fadeInUp 0.6s 0.2s both;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap;
  animation: fadeInUp 0.6s 0.3s both;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 690px; margin: 0 0 28px;
}
.hero-stat { padding: 4px 20px; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.hero-stat:first-child { padding-left: 0; border-left: 0; }
.hero-stat span, .hero-stat small { display: block; color: var(--text-muted); font-size: 12px; }
.hero-stat strong { display: block; margin: 4px 0; color: var(--text-primary); font-size: 25px; line-height: 1.1; }
.hero-stat strong b { font-size: 18px; }
.hero-highlights {
  display: grid; gap: 16px;
  animation: fadeInUp 0.6s 0.25s both;
}
.hero-highlight {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px;
  min-height: 104px; padding: 20px 26px;
  background: linear-gradient(145deg, rgba(43, 18, 20, 0.86), rgba(14, 14, 14, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.hero-highlight:hover { transform: translateY(-3px); border-color: rgba(230, 57, 70, 0.62); box-shadow: 0 18px 38px rgba(110, 14, 20, 0.32); }
.hero-highlight-main {
  background: linear-gradient(135deg, rgba(120, 22, 28, 0.72), rgba(16, 16, 16, 0.82));
  border-color: rgba(230, 57, 70, 0.68);
}
.hero-highlight-icon {
  width: 48px; height: 48px; flex: 0 0 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow); color: var(--accent-light);
  border-radius: 14px;
}
.hero-highlight-icon svg { width: 23px; height: 23px; }
.hero-highlight strong { position: relative; display: block; font-size: 17px; margin-bottom: 5px; }
.hero-highlight span { position: relative; display: block; color: var(--text-muted); font-size: 14px; }
.hero-watermark { position: absolute; right: -10px; bottom: -12px; width: 94px; height: 94px; color: rgba(255, 255, 255, 0.07); transform: rotate(-14deg); }

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

/* --- Announcement Bar --- */
.announce-bar {
  max-width: 800px; margin: 0 auto 48px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 14px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 10px;
}
.announce-bar i { color: var(--accent); flex-shrink: 0; }

/* --- Section Layout --- */
.section {
  padding: 60px 24px;
  max-width: 1280px; margin: 0 auto;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.section-title {
  font-size: 24px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.5px;
}
.section-title .title-accent { color: var(--accent); }

/* Use the available horizontal space on desktop while preserving comfortable gutters. */
@media (min-width: 769px) {
  .nav-container {
    max-width: none;
    padding-inline: clamp(32px, 6vw, 120px);
  }
  .hero {
    padding-inline: clamp(32px, 6vw, 120px);
  }
  .hero-layout { max-width: none; }
  .section {
    max-width: none;
    padding-inline: clamp(32px, 6vw, 120px);
  }
}

/* --- Category Tabs --- */
.cat-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.cat-tab {
  padding: 8px 18px; border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.cat-tab:hover { border-color: var(--border-light); color: var(--text-primary); }
.cat-tab.active {
  background: var(--accent-glow);
  border-color: rgba(230,57,70,0.3);
  color: var(--accent-light);
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  display: block;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  border-color: rgba(230, 57, 70, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), var(--shadow-glow);
}
.product-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--text-muted);
  overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 18px; }
.product-category {
  font-size: 11px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.product-name {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-desc {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.5;
}
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.product-price {
  font-size: 20px; font-weight: 800;
  color: var(--accent-light);
}
.product-price span { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.product-stock {
  font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: 50px;
}
.stock-available { background: var(--success-bg); color: var(--success); }
.stock-empty { background: var(--danger-bg); color: var(--danger); }

/* --- Auth Pages --- */
.auth-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.4s;
}
.auth-header { text-align: center; margin-bottom: 20px; }
.auth-header > div:first-child { font-size: 32px !important; margin-bottom: 8px !important; }
.auth-header h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.auth-header p { color: var(--text-secondary); font-size: 13px; }
.auth-card .form-group { margin-bottom: 14px; }
.auth-card .form-input { padding: 10px 12px; }
.auth-card .btn-lg { padding: 11px 22px; font-size: 14px; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-muted); }
.auth-footer a { color: var(--accent); font-weight: 600; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-muted); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* --- Dashboard --- */
.dashboard { padding: 40px 24px; max-width: 1100px; margin: 0 auto; }
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.dash-header h2 { font-size: 24px; font-weight: 800; }
.balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  position: relative; overflow: hidden;
}
.balance-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gradient-accent);
}
.balance-amount {
  font-size: 36px; font-weight: 900;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.balance-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-light); }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}
.stat-icon.red { background: var(--accent-glow); color: var(--accent); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* --- Table --- */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left; padding: 12px 16px;
  background: var(--bg-secondary);
  color: var(--text-muted); font-weight: 600;
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-secondary); }

/* --- Badge / Tag --- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 600;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-default { background: var(--bg-elevated); color: var(--text-secondary); }

/* --- About Page --- */
.about-page { padding: 60px 24px; max-width: 800px; margin: 0 auto; }
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 24px;
}
.about-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.about-card p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px; margin-top: 20px;
}
.contact-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  min-width: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  color: var(--text-primary);
  text-decoration: none;
}
.contact-item[href] { cursor: pointer; }
.contact-item:hover { border-color: var(--accent); }
.contact-item[href]:hover { background: var(--bg-elevated); transform: translateY(-1px); }
.contact-item[href]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.contact-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  background: var(--accent-glow);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-name { font-size: 12px; color: var(--text-muted); }
.contact-info { min-width: 0; flex: 1; }
.contact-value { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; word-break: break-word; }

/* --- Topup Page --- */
.topup-page { padding: 40px 24px; max-width: 700px; margin: 0 auto; }
.topup-method {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px; overflow: hidden;
}
.topup-method-header {
  padding: 18px 24px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: var(--transition);
  user-select: none;
}
.topup-method-header:hover { background: var(--bg-secondary); }
.topup-method-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.topup-method-icon.slip { background: var(--info-bg); color: var(--info); }
.topup-method-icon.truemoney { background: rgba(255, 111, 0, 0.1); color: #ff6f00; }
.topup-method-name { font-weight: 700; font-size: 15px; }
.topup-method-desc { font-size: 12px; color: var(--text-muted); }
.topup-method-body {
  padding: 0 24px 24px; display: none;
}
.topup-method-body.open { display: block; }

.slip-preview {
  width: 100%; max-height: 300px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: contain;
  margin-bottom: 16px;
  background: var(--bg-secondary);
}
.file-input-wrapper {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
  text-align: center; justify-content: center;
}
.file-input-wrapper:hover { border-color: var(--accent); background: var(--accent-glow); }
.file-input-wrapper input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}

/* --- PromptPay Info Display --- */
.promptpay-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.promptpay-qr {
  flex-shrink: 0;
  width: 180px; height: 180px;
  background: #fff;
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.promptpay-qr img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.promptpay-details {
  flex: 1;
  min-width: 200px;
}
.promptpay-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.promptpay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.promptpay-row:last-child { border-bottom: none; }
.promptpay-key {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.promptpay-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.promptpay-id {
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  color: var(--accent-light);
  font-size: 16px;
}
.promptpay-actions { display: none; }
.promptpay-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--info-bg);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--info);
}
@media (max-width: 480px) {
  .promptpay-info { flex-direction: column; align-items: center; text-align: center; }
  .promptpay-qr { width: 160px; height: 160px; }
  .promptpay-row { flex-direction: column; gap: 4px; }
}

@media (max-width: 768px) {
  .promptpay-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: -4px 0 14px;
  }
  .promptpay-action {
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font: inherit; font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
  }
  .promptpay-action:hover, .promptpay-action:active {
    color: var(--text-primary);
    border-color: rgba(230, 57, 70, 0.5);
    background: var(--accent-glow);
  }
  .promptpay-action:disabled { opacity: 0.65; cursor: wait; }
  .promptpay-action svg { width: 16px; height: 16px; color: var(--accent-light); }
}
@media (max-width: 360px) {
  .promptpay-actions { grid-template-columns: 1fr; }
}

/* --- Admin Layout --- */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}
.admin-sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  flex-shrink: 0;
  position: sticky; top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}
.admin-sidebar-header {
  padding: 0 12px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.admin-sidebar-header h3 {
  font-size: 14px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1px;
}
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  margin-bottom: 2px; cursor: pointer; transition: var(--transition);
}
.admin-nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.admin-nav-item.active {
  background: var(--accent-glow);
  color: var(--accent-light);
  font-weight: 600;
}
.admin-nav-item i { width: 18px; height: 18px; }

.admin-content {
  flex: 1; padding: 32px;
  min-width: 0;
}
.admin-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.admin-page-header h2 {
  font-size: 22px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}

/* --- Empty State --- */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 15px; }

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  flex-shrink: 0;
}
.footer a { color: var(--accent); }

/* --- Misc --- */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-enter { animation: fadeInUp 0.35s ease-out; }

/* --- Tab System --- */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab-item {
  padding: 10px 18px;
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-item:hover { color: var(--text-secondary); }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .nav-container {
    position: relative;
    padding: 0 20px;
    z-index: 1;
  }
  .nav-logo {
    position: absolute;
    top: 10px;
    left: 64px;
  }
  .site-logo { height: 38px; max-width: 140px; }
  .nav-actions {
    position: absolute;
    top: 32px;
    right: 20px;
    transform: translateY(-50%);
    gap: 8px;
  }
  .nav-menu {
    position: fixed;
    top: calc(var(--nav-height) + 8px);
    left: 12px;
    width: min(260px, calc(100vw - 24px));
    background: #080808;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
    flex-direction: column;
    padding: 12px;
    gap: 8px;
    transform: translateX(calc(-100% - 24px));
    transition: transform 0.3s ease;
    z-index: 999;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-link { padding: 14px 18px; font-size: 16px; border-radius: var(--radius); width: 100%; }
  .nav-link.active::after { display: none; }
  .nav-toggle {
    display: flex;
    position: absolute;
    left: 14px;
    top: 14px;
    width: 44px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 4px;
    border-radius: 12px;
  }
  .nav-toggle span {
    width: 18px;
    height: 1.5px;
    background: rgba(245, 245, 245, 0.88);
  }
  .nav-toggle:hover,
  .nav-toggle.active {
    background: rgba(255, 255, 255, 0.045);
  }
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }
  .nav-actions .btn span.hide-mobile { display: none; }

  .mobile-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .mobile-overlay.open { opacity: 1; pointer-events: auto; }

  .hero { padding: 60px 20px 50px; text-align: center; }
  .hero-layout { display: block; min-height: 0; }
  .hero-content { margin: 0 auto; }
  .hero-highlights { display: none; }
  .hero-stats, .ambient-glow { display: none; }
  .hero h1 { font-size: 28px; }
  .hero-desc { font-size: 15px; margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
  .section { padding: 40px 16px; }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-body { padding: 10px; }
  .product-name { font-size: 14px; }
  .product-price { font-size: 16px; }
  .product-desc { display: none; }

  .auth-page { padding: 16px; }
  .auth-card { padding: 24px 18px; }

  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%; position: static;
    height: auto; padding: 16px;
    display: flex; flex-wrap: wrap; gap: 4px;
    border-right: none; border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
  .admin-sidebar-header { display: none; }
  .admin-nav-item { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
  .admin-content { padding: 20px 16px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-value { font-size: 22px; }

  .balance-amount { font-size: 28px; }

  .about-card { padding: 24px; }
  .contact-grid { grid-template-columns: 1fr; }

  .toast { max-width: calc(100vw - 40px); }
  .toast-container { right: 10px; left: 10px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero {
    padding: 42px 20px 36px;
  }
  .hero-badge {
    margin-bottom: 16px;
    padding: 5px 12px;
    font-size: 12px;
  }
  .hero h1 {
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -0.7px;
    margin-bottom: 12px;
  }
  .hero-desc {
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.65;
  }
  .hero-actions {
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
  }
  .hero-actions .btn {
    flex: 1;
    width: auto;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 14px;
    justify-content: center;
    font-size: 13px;
  }
  .hero-actions .btn-primary {
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.2);
  }
  .hero-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* Nav user balance badge */
.nav-balance {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
}
.nav-balance i { color: var(--accent); }

.nav-user-menu {
  position: relative;
}
.nav-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.nav-user-btn:hover { border-color: var(--border-light); }
.nav-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
}

.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: fadeInUp 0.2s;
  display: none;
}
.nav-dropdown.open { display: block; }
.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  width: 100%; border: 0; background: transparent; text-align: left;
}
.nav-dropdown-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-dropdown-item.danger { color: var(--danger); }
.nav-dropdown-item.danger:hover { background: var(--danger-bg); }
.nav-dropdown-divider {
  height: 1px; background: var(--border);
  margin: 6px 0;
}

/* Order items display */
.order-items {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  word-break: break-all;
  white-space: pre-wrap;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
}

/* Copy button */
.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 4px;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copy-btn-success {
  color: #d5ffe2;
  background: rgba(34, 197, 94, .18);
  border-color: rgba(74, 222, 128, .78);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .10), 0 0 18px rgba(74, 222, 128, .25);
  animation: copySuccessPulse .42s cubic-bezier(.2, .9, .25, 1.2);
}
.copy-btn.copy-btn-success svg { color: #73eea2; }
.copy-btn.copy-btn-success:disabled { opacity: 1; cursor: default; }
@keyframes copySuccessPulse {
  0% { transform: scale(.9); }
  65% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Product detail in modal */
.product-detail-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-secondary);
}
.product-admin-thumb {
  width: 48px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}
.product-preview-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.product-detail-body { padding: 24px; }
.product-detail-price {
  font-size: 28px; font-weight: 900;
  color: var(--accent-light);
  margin: 12px 0;
}
.product-detail-stock {
  font-size: 14px; color: var(--text-muted);
  margin-bottom: 20px;
}
.quantity-control {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  width: fit-content;
}
.quantity-btn {
  width: 40px; height: 40px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: none;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.quantity-btn:hover { background: var(--accent-glow); color: var(--accent); }
.quantity-value {
  width: 50px; height: 40px;
  background: var(--bg-input);
  color: var(--text-primary);
  text-align: center;
  font-size: 16px; font-weight: 700;
  border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}

/* --- Utility --- */
.hide-mobile {}
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .quantity-control { margin-bottom: 12px; }
}

/* Compact mobile layout: preserve comfortable tap targets while reducing visual bulk. */
@media (max-width: 768px) {
  :root { --nav-height: 56px; }

  .nav-container { padding-inline: 14px; }
  .nav-logo { top: 8px; left: 54px; }
  .site-logo { height: 32px; max-width: 120px; }
  .nav-actions { right: 14px; gap: 6px; }
  .nav-toggle { top: 10px; left: 8px; width: 40px; height: 34px; }
  .nav-balance, .nav-user-btn { padding: 5px 9px; font-size: 12px; }
  .nav-user-avatar { width: 25px; height: 25px; font-size: 11px; }
  .nav-dropdown { width: 200px; padding: 6px; }
  .nav-dropdown-item { padding: 9px 10px; font-size: 13px; }
  .nav-menu { top: calc(var(--nav-height) + 6px); width: min(230px, calc(100vw - 20px)); padding: 8px; gap: 4px; }
  .nav-link { padding: 11px 12px; font-size: 14px; }

  .btn { min-height: 40px; padding: 8px 14px; font-size: 13px; }
  .btn-sm { min-height: 32px; padding: 5px 9px; font-size: 11px; }
  .btn-lg { min-height: 44px; padding: 10px 18px; font-size: 14px; }
  .form-label { font-size: 12px; margin-bottom: 5px; }
  .form-input { padding: 9px 11px; font-size: 13px; }
  .form-group { margin-bottom: 14px; }

  .hero { padding: 44px 16px 34px; }
  .hero h1 { font-size: 26px; }
  .hero-desc { font-size: 14px; margin-bottom: 26px; }
  .section { padding: 32px 12px; }
  .section-title { font-size: 20px; }
  .section-header { margin-bottom: 20px; }
  .filter-btn { padding: 6px 12px; font-size: 12px; }
  .product-grid { gap: 7px; }
  .product-body { padding: 8px; }
  .product-name { font-size: 13px; }
  .product-price { font-size: 15px; }
  .product-badge { font-size: 10px; padding: 3px 7px; }

  .dashboard, .topup-page, .about-page { padding: 28px 14px; }
  .dash-header { margin-bottom: 20px; }
  .dash-header h2 { font-size: 21px; }
  .balance-card, .stat-card, .about-card { padding: 18px; }
  .balance-amount { font-size: 25px; }
  .stat-value { font-size: 20px; }
  .topup-method-header { padding: 14px 16px; }
  .topup-method-content { padding: 0 16px 16px; }
  .about-card h2 { font-size: 19px; }
  .contact-item { padding: 12px; }

  .auth-page { padding: 12px; }
  .auth-card { padding: 20px 16px; }
  .modal-content { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .modal-header { padding: 14px 16px; }
  .modal-header h3 { font-size: 16px; }
  .modal-body, .product-detail-body { padding: 16px; }
  .modal-footer { padding: 12px 16px; }
  .product-detail-price { font-size: 23px; margin: 8px 0; }
  .quantity-btn { width: 36px; height: 36px; font-size: 16px; }
  .quantity-value { width: 44px; height: 36px; font-size: 14px; }

  .admin-content { padding: 16px 12px; }
  .admin-sidebar { padding: 10px 12px; }
  .tabs { margin-bottom: 16px; overflow-x: auto; }
  .tab-item { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
}

@media (max-width: 480px) {
  .hero { padding: 36px 14px 30px; }
  .hero h1 { font-size: 24px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { min-height: 40px; padding: 8px 9px; font-size: 12px; border-radius: 11px; }
  .section { padding: 28px 10px; }
  .product-body { padding: 7px; }
  .product-name { font-size: 12px; }
  .product-price { font-size: 14px; }
  .dashboard, .topup-page, .about-page { padding: 22px 12px; }
  .balance-card, .stat-card, .about-card { padding: 15px; }
  .modal-content { width: calc(100vw - 16px); }
}

/* ================================================
   HALLOWEEN — original orange/red night-market skin
   ================================================ */
:root {
  --bg-body: #100606;
  --bg-primary: #170807;
  --bg-secondary: #210d09;
  --bg-card: rgba(35, 13, 10, 0.88);
  --bg-card-hover: #35130c;
  --bg-elevated: #2b100b;
  --bg-input: #190907;
  --border: rgba(255, 132, 35, 0.18);
  --border-light: rgba(255, 156, 50, 0.34);
  --border-focus: #ff8a1f;
  --text-primary: #fff4e5;
  --text-secondary: #d4afa0;
  --text-muted: #936b60;
  --text-inverse: #240906;
  --accent: #ff6a17;
  --accent-dark: #d63a0b;
  --accent-darker: #8f1b0b;
  --accent-light: #ffb14a;
  --accent-glow: rgba(255, 91, 16, 0.16);
  --accent-glow-strong: rgba(255, 106, 23, 0.38);
  --gradient-accent: linear-gradient(135deg, #ff9b22 0%, #ff5417 52%, #c92912 100%);
  --gradient-accent-h: linear-gradient(135deg, #ffd05a 0%, #ff7924 48%, #e23a11 100%);
  --warning: #ffba38;
  --warning-bg: rgba(255, 161, 28, 0.12);
  --shadow: 0 12px 30px rgba(17, 3, 2, 0.48);
  --shadow-lg: 0 20px 60px rgba(8, 1, 1, 0.72);
  --shadow-glow: 0 0 34px rgba(255, 83, 15, 0.2);
}

body {
  background:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(183, 36, 12, 0.29), transparent 70%),
    radial-gradient(ellipse 36% 30% at 5% 30%, rgba(255, 111, 22, 0.10), transparent 72%),
    radial-gradient(ellipse 35% 30% at 94% 72%, rgba(133, 21, 11, 0.18), transparent 72%),
    #100606;
}
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  opacity: 0.7;
  background-image:
    radial-gradient(circle at 12% 17%, rgba(255, 185, 65, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 11%, rgba(255, 94, 24, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 73% 43%, rgba(255, 177, 59, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 66%, rgba(255, 86, 19, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 90% 84%, rgba(255, 165, 46, 0.6) 0 1px, transparent 2px);
  background-size: 290px 310px, 350px 330px, 410px 380px, 370px 420px, 440px 460px;
  animation: emberDrift 18s linear infinite;
}
body::after {
  opacity: 0.22;
  background-image:
    linear-gradient(30deg, transparent 47%, rgba(255, 126, 36, 0.18) 48%, transparent 49%),
    linear-gradient(-30deg, transparent 47%, rgba(255, 126, 36, 0.14) 48%, transparent 49%);
  background-size: 72px 72px;
  mask-image: linear-gradient(120deg, black, transparent 35%, transparent 65%, black);
  -webkit-mask-image: linear-gradient(120deg, black, transparent 35%, transparent 65%, black);
}
@keyframes emberDrift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 34px -170px, -45px -220px, 30px -280px, -28px -190px, 42px -240px; }
}

#navbar {
  background: rgba(23, 7, 5, 0.78);
  border-bottom-color: rgba(255, 126, 30, 0.24);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}
#navbar::after {
  content: '';
  position: absolute; bottom: -1px; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 159, 39, 0.85), transparent);
}
#navbar.scrolled { background: rgba(25, 7, 5, 0.94); }
.site-logo { filter: drop-shadow(0 0 9px rgba(255, 98, 16, 0.36)); }
.nav-link:hover, .nav-link.active { box-shadow: inset 0 0 0 1px rgba(255, 137, 29, 0.16); }

.btn-primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(218, 56, 11, 0.32), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: -2px auto -2px -45%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
}
.btn-primary:hover::after { left: 120%; }
.btn-secondary { background: rgba(53, 18, 10, 0.74); }
.btn-secondary:hover { background: rgba(80, 26, 11, 0.88); border-color: rgba(255, 151, 37, 0.65); }

.form-input, .form-select, .form-textarea {
  background: rgba(25, 8, 6, 0.88);
  border-color: rgba(255, 132, 35, 0.18);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #ff922a;
  box-shadow: 0 0 0 3px rgba(255, 97, 16, 0.15), 0 0 20px rgba(255, 97, 16, 0.12);
}

.hero {
  isolation: isolate;
  padding-top: 76px;
  background:
    linear-gradient(110deg, rgba(26, 6, 5, 0.97) 0%, rgba(54, 13, 7, 0.91) 53%, rgba(14, 4, 4, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 136, 35, 0.15);
}
.hero::after {
  content: '✦  🦇  ✦';
  position: absolute; z-index: 0; right: 8%; top: 11%;
  color: rgba(255, 172, 52, 0.35); font-size: clamp(24px, 3vw, 46px);
  letter-spacing: 1.1em; white-space: nowrap;
  animation: batsFly 9s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero::before {
  background:
    radial-gradient(ellipse 720px 380px at 64% 10%, rgba(255, 104, 19, 0.22) 0%, transparent 67%),
    radial-gradient(circle at 9% 76%, rgba(213, 38, 13, 0.17) 0%, transparent 34%),
    radial-gradient(circle at 94% 82%, rgba(255, 178, 52, 0.08) 0%, transparent 31%);
}
.ambient-glow {
  width: 620px; height: 620px; top: -240px; left: 45%;
  background: radial-gradient(circle, rgba(255, 126, 23, 0.35), rgba(224, 43, 11, 0.15) 35%, transparent 69%);
  filter: blur(38px);
}
.hero-grid {
  background-image:
    linear-gradient(rgba(255, 148, 39, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 148, 39, 0.07) 1px, transparent 1px);
}
.hero-badge {
  background: rgba(255, 100, 17, 0.13);
  border-color: rgba(255, 161, 39, 0.38);
  color: #ffd070;
  box-shadow: 0 0 25px rgba(255, 104, 16, 0.1);
}
.hero-badge::before { content: '🎃'; font-size: 15px; }
.hero-badge-dot { background: #ffbf3d; box-shadow: 0 0 10px #ff8a1f; }
.hero h1 { text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); }
.hero h1 .text-gradient { background-image: linear-gradient(105deg, #ffd15b 0%, #ff9426 35%, #ff4d18 78%); }
.hero-stat { border-left-color: rgba(255, 175, 70, 0.2); }
.hero-stat strong { color: #ffd27b; text-shadow: 0 0 18px rgba(255, 101, 14, 0.3); }
.hero-highlight {
  background: linear-gradient(145deg, rgba(67, 19, 10, 0.82), rgba(26, 8, 6, 0.86));
  border-color: rgba(255, 150, 38, 0.2);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.27);
}
.hero-highlight-main { background: linear-gradient(135deg, rgba(139, 36, 10, 0.82), rgba(39, 9, 6, 0.92)); border-color: rgba(255, 147, 31, 0.6); }
.hero-highlight:hover { border-color: rgba(255, 172, 51, 0.8); box-shadow: 0 18px 42px rgba(207, 55, 9, 0.26); }
.hero-highlight-icon { color: #ffbd48; background: rgba(255, 97, 15, 0.16); }
@keyframes batsFly {
  from { transform: translate3d(0, 0, 0) rotate(-5deg); opacity: 0.3; }
  to { transform: translate3d(-65px, 23px, 0) rotate(7deg); opacity: 0.66; }
}

.section-title .title-accent, .section-title > i { filter: drop-shadow(0 0 7px rgba(255, 105, 18, 0.55)); }
.announce-bar {
  background: linear-gradient(90deg, rgba(78, 22, 10, 0.74), rgba(35, 11, 7, 0.92));
  border-color: rgba(255, 144, 35, 0.22);
  border-left-color: #ff9a28;
  box-shadow: 0 10px 28px rgba(12, 2, 1, 0.24);
}
.cat-tab { background: rgba(41, 13, 9, 0.76); border-color: rgba(255, 137, 33, 0.2); }
.cat-tab:hover { border-color: rgba(255, 167, 46, 0.62); background: rgba(81, 23, 10, 0.76); }
.cat-tab.active { background: linear-gradient(135deg, rgba(255, 120, 22, 0.22), rgba(159, 28, 10, 0.28)); border-color: rgba(255, 165, 42, 0.6); color: #ffd170; }

.product-card, .card, .auth-card, .balance-card, .stat-card, .about-card, .topup-method, .modal-content {
  border-color: rgba(255, 139, 34, 0.2);
  background-color: rgba(15, 12, 11, 0.88);
}
/* Product cards use a neutral charcoal surface so the artwork and price lead. */
.product-card {
  background: linear-gradient(145deg, #202124 0%, #141518 100%);
  border-color: rgba(255, 255, 255, 0.12);
}
.product-card::before {
  content: '';
  position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #ff6078, #e63956, transparent);
  opacity: 0; transition: opacity .28s ease;
}
.product-card:hover::before { opacity: 1; }
.product-card:hover { border-color: rgba(255, 96, 120, 0.72); box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5), 0 0 32px rgba(230, 57, 86, 0.18); }
.product-img { background: linear-gradient(145deg, #303136, #17181b); color: #a8a9ad; }
.product-category { color: #bfc1c7; }
.product-price, .product-detail-price {
  color: #ff6a00;
  background: linear-gradient(100deg, #ff8400 0%, #ff4b0b 45%, #ec145d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 16px rgba(255, 74, 30, 0.3);
}
.product-stock.stock-available { background: rgba(34, 197, 94, 0.12); color: #70db91; }
.stock-empty { background: rgba(220, 38, 20, 0.16); color: #ff8267; }

.modal-overlay { background: rgba(19, 3, 2, 0.8); }
.modal-content { box-shadow: 0 24px 70px rgba(0,0,0,.7), 0 0 50px rgba(255, 83, 14, 0.1); }
.toast-info { background: var(--bg-card); }
.footer { border-top-color: rgba(255, 136, 31, 0.18); background: rgba(23, 7, 5, 0.56); }

@media (prefers-reduced-motion: reduce) {
  body::before, .hero::after, .ambient-glow { animation: none !important; }
}

/* Refined dark theme: keep the interface neutral and reserve color for key actions. */
:root {
  --bg-body: #070809;
  --bg-primary: #0d0e11;
  --bg-secondary: #141519;
  --bg-card: #18191d;
  --bg-card-hover: #202126;
  --bg-elevated: #24252b;
  --bg-input: #111216;
  --border: rgba(255, 255, 255, 0.10);
  --border-light: rgba(255, 255, 255, 0.18);
  --border-focus: #ff5424;
  --text-primary: #f5f5f7;
  --text-secondary: #b2b4bd;
  --text-muted: #7b7e89;
  --text-inverse: #fff;
  --accent: #ff4a1c;
  --accent-dark: #d92a10;
  --accent-darker: #851506;
  --accent-light: #ff9a72;
  --accent-glow: rgba(255, 74, 28, 0.18);
  --accent-glow-strong: rgba(255, 74, 28, 0.38);
  --gradient-accent: linear-gradient(135deg, #ff6b2d 0%, #e72b0e 55%, #bd1608 100%);
  --gradient-accent-h: linear-gradient(135deg, #ff9b72 0%, #ff4a1c 55%, #d9210b 100%);
  --warning: #eab308;
  --warning-bg: rgba(234, 179, 8, 0.12);
  --shadow-glow: 0 0 34px rgba(255, 74, 28, 0.24);
}

body {
  background: radial-gradient(ellipse 65% 42% at 50% -10%, rgba(157, 25, 8, 0.23), transparent 70%), #070809;
}
body::before { opacity: 0.28; filter: grayscale(1); }
body::after { opacity: 0.08; }
#navbar, #navbar.scrolled { background: rgba(13, 14, 18, 0.9); border-bottom-color: rgba(255, 255, 255, 0.09); }
#navbar::after { background: linear-gradient(90deg, transparent, rgba(255, 84, 36, 0.6), transparent); }
.site-logo { filter: drop-shadow(0 0 9px rgba(255, 84, 36, 0.26)); }
.btn-secondary { background: #202126; }
.btn-secondary:hover { background: #292a31; border-color: rgba(255, 84, 36, 0.5); }
.hero { background: linear-gradient(110deg, #0b0c0f 0%, #21100d 53%, #090a0c 100%); border-bottom-color: rgba(255, 255, 255, 0.08); }
.hero::before { background: radial-gradient(ellipse 720px 380px at 64% 10%, rgba(214, 43, 12, 0.24), transparent 67%); }
.hero::after { color: rgba(255, 118, 74, 0.22); }
.ambient-glow { background: radial-gradient(circle, rgba(224, 43, 12, 0.28), transparent 66%); }
.hero-grid { background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px); }
.hero-badge { background: rgba(255, 84, 36, 0.10); border-color: rgba(255, 132, 90, 0.28); color: #ffad89; }
.hero-badge::before { content: '✦'; }
.hero-badge-dot { background: #ff6434; box-shadow: 0 0 10px #ff5424; }
.hero h1 .text-gradient { background-image: linear-gradient(105deg, #f6f6f8 0%, #ffad89 55%, #ff5424 100%); }
.hero-stat strong { color: #f4f4f6; text-shadow: none; }
.hero-highlight, .hero-highlight-main { background: rgba(28, 29, 34, 0.84); border-color: rgba(255, 255, 255, 0.11); }
.hero-highlight:hover { border-color: rgba(255, 112, 73, 0.55); box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28); }
.hero-highlight-icon { color: #ff9b70; background: rgba(255, 84, 36, 0.12); }
.announce-bar { background: #18191e; border-color: rgba(255,255,255,.09); border-left-color: #ff5424; }
.cat-tab { background: #1a1b20; border-color: rgba(255,255,255,.1); }
.cat-tab:hover { background: #23242a; border-color: rgba(255, 132, 90, .45); }
.cat-tab.active { background: rgba(255, 84, 36, .13); border-color: rgba(255, 132, 90, .5); color: #ffad89; }
.footer { border-top-color: rgba(255,255,255,.09); background: rgba(13,14,18,.7); }

/* Product detail: a visual purchase panel paired with the product content. */
.product-detail-page { max-width: 1180px; margin: 0 auto; position: relative; }
.product-detail-page::before { content: ''; position: absolute; z-index: -1; width: 480px; height: 480px; top: 90px; left: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(226,43,14,.14), transparent 68%); filter: blur(10px); pointer-events: none; }
.detail-back { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.detail-back:hover { color: var(--accent-light); }
.product-detail-title { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; font-weight: 900; letter-spacing: -0.04em; margin: 0 0 28px; }
.product-detail-layout { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(320px, .82fr); gap: 28px; align-items: start; }
.product-detail-main { min-width: 0; }
.product-detail-media { overflow: hidden; border: 1px solid rgba(255,255,255,.10); border-radius: 16px; background: #15161a; aspect-ratio: 16 / 9; position: relative; box-shadow: 0 22px 45px rgba(0,0,0,.28); }
.product-detail-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(125deg, transparent 43%, rgba(255,255,255,.10) 50%, transparent 57%); transform: translateX(-130%); transition: transform .75s ease; }
.product-detail-media:hover::after { transform: translateX(130%); }
.product-detail-media .product-detail-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; }
.product-detail-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #868994; background: linear-gradient(145deg, #282a30, #121317); }
.product-detail-placeholder svg { width: 64px; height: 64px; }
.detail-tabs { display: flex; gap: 8px; margin: 24px 0 14px; border-bottom: 1px solid rgba(255,255,255,.09); position: relative; }
.detail-tab { padding: 10px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: #191a1f; color: var(--text-secondary); font-size: 14px; font-weight: 750; }
.detail-tab.active { color: #fff; background: linear-gradient(135deg, #3a1a10, #241310); border-color: rgba(255, 94, 39, .65); }
.product-description-card { padding: 22px 24px; border: 1px solid rgba(255,255,255,.12); border-top-color: rgba(255,105,48,.55); border-radius: 14px; background: linear-gradient(145deg, rgba(43,29,22,.88), rgba(16,17,20,.96) 72%); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.product-description { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; color: #e1e1e4; font-size: 15px; line-height: 1.45; }
.product-description li { display: flex; align-items: flex-start; gap: 7px; padding: 0; }
.product-description li svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; padding: 2px; border-radius: 50%; color: #0f1013; background: #f2f2f3; }
.product-purchase-panel { display: grid; gap: 16px; position: sticky; top: calc(var(--nav-height) + 20px); }
.purchase-summary, .purchase-action-card { padding: 22px; border: 1px solid rgba(255,255,255,.11); border-radius: 15px; background: #191a1e; box-shadow: 0 14px 35px rgba(0,0,0,.24); transition: border-color .25s ease, transform .25s ease; }
.purchase-summary:hover, .purchase-action-card:hover { border-color: rgba(255,117,67,.32); transform: translateY(-2px); }
.purchase-summary .product-detail-price { margin: 0 0 18px; font-size: 34px; line-height: 1; }
.stock-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.09); color: var(--text-muted); font-size: 13px; }
.stock-row strong { padding: 6px 11px; border-radius: 999px; font-size: 12px; }
.stock-ready { color: #56d989; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.36); }
.stock-unavailable { color: #ff8b78; background: rgba(239,68,68,.11); border: 1px solid rgba(239,68,68,.32); }
.product-benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 18px; }
.product-benefits span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 8px; border: 1px solid rgba(255,255,255,.10); border-radius: 10px; background: #202126; color: #dedee2; font-size: 12px; font-weight: 700; text-align: center; }
.product-benefits span:last-child { grid-column: 1 / -1; }
.product-benefits svg { width: 15px; height: 15px; color: var(--accent-light); }
.purchase-label { display: block; margin-bottom: 10px; color: var(--text-secondary); font-size: 14px; font-weight: 750; }
.detail-quantity { display: flex; width: 100%; margin: 0 0 18px; border-color: rgba(255,255,255,.13); }
.detail-quantity .quantity-value { flex: 1; width: auto; }
.detail-quantity .quantity-btn { width: 52px; }
.quantity-btn:disabled { cursor: not-allowed; opacity: .45; }
.volume-discount { padding: 12px; margin: 0 0 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: #121317; }
.volume-discount-copy { display: flex; align-items: center; gap: 8px; color: #c8c8cd; font-size: 12px; font-weight: 650; }
.volume-discount-copy svg { width: 16px; height: 16px; color: #ff9a42; flex: 0 0 auto; }
.volume-progress { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.13); }
.volume-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff922a, #ff4e36); transition: width .2s ease; }
.volume-discount.is-unlocked { border-color: rgba(74,222,128,.42); background: rgba(34,197,94,.07); }
.volume-discount.is-unlocked .volume-discount-copy, .volume-discount.is-unlocked .volume-discount-copy svg { color: #72e69c; }
.volume-discount.is-unlocked .volume-progress span { background: #4ade80; }
.purchase-total { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px 16px; color: var(--text-muted); font-size: 13px; }
.purchase-total strong { color: #fff; font-size: 22px; }

@media (max-width: 820px) {
  .product-detail-layout { grid-template-columns: 1fr; gap: 18px; }
  .product-purchase-panel { position: static; }
}

/* Full-page atmospheric background. It remains behind every interactive element. */
html { background: #070709; }
body { background: transparent !important; isolation: isolate; }
body::before, body::after { display: none; }
.store-background { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse 80% 18% at 25% 0%, rgba(213,88,28,.42), transparent 70%), radial-gradient(ellipse 78% 30% at 77% 0%, rgba(175,59,17,.32), transparent 70%), radial-gradient(ellipse 80% 8% at 50% 100%, rgba(226,89,24,.30), transparent 150%), radial-gradient(ellipse 50% 28% at 50% 100%, rgba(181,69,24,.25), transparent 150%), linear-gradient(180deg, #3a1b0d 0%, #20120d 30%, #151215 70%, #30160b 93%, #0d0d0f 100%); }
.store-background-grid { position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(255,158,84,.075) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,158,84,.075) 1px, transparent 1px); background-size: 65px 65px; mask-image: linear-gradient(to bottom, #000, transparent 70%); }
.store-leaves { position: absolute; inset: 0; }
.store-leaf { position: absolute; top: -30px; display: block; border-radius: 2px 50% 2px 50%; filter: drop-shadow(0 0 4px rgba(230,90,15,.3)); animation: store-leaf-fall linear infinite; }
@keyframes store-leaf-fall { 0% { transform: translateY(-5vh) translateX(0) rotate(0deg); } 50% { transform: translateY(50vh) translateX(35px) rotate(180deg); } 100% { transform: translateY(105vh) translateX(-25px) rotate(360deg); } }
.store-silhouette { position: absolute; bottom: 0; left: 0; width: 100%; height: 220px; display: block; }
.hero { background: linear-gradient(110deg, rgba(31,24,22,.72) 0%, rgba(75,31,16,.58) 53%, rgba(24,20,21,.76) 100%); }
@media (prefers-reduced-motion: reduce) { .store-leaf { animation: none; } }

/* A restrained warm glow for the feature cards. */
.hero-highlight, .hero-highlight-main {
  box-shadow: 0 14px 32px rgba(0, 0, 0, .25), 0 0 16px rgba(255, 83, 27, .10), inset 0 1px 0 rgba(255, 180, 130, .06);
}
.hero-highlight-main { box-shadow: 0 14px 32px rgba(0, 0, 0, .25), 0 0 20px rgba(255, 83, 27, .16), inset 0 1px 0 rgba(255, 180, 130, .08); }
.hero-highlight:hover { box-shadow: 0 18px 38px rgba(0, 0, 0, .3), 0 0 24px rgba(255, 83, 27, .23), inset 0 1px 0 rgba(255, 180, 130, .10); }

/* Darken large surfaces so warm orange is an accent rather than the background. */
html { background: #030405; }
.store-background {
  background:
    radial-gradient(ellipse 70% 16% at 25% 0%, rgba(184, 65, 23, .24), transparent 70%),
    radial-gradient(ellipse 66% 22% at 77% 0%, rgba(139, 46, 17, .17), transparent 70%),
    radial-gradient(ellipse 70% 10% at 50% 100%, rgba(155, 52, 19, .15), transparent 145%),
    linear-gradient(180deg, #17110e 0%, #0d0c0d 32%, #09090b 72%, #050506 100%);
}
.store-background-grid { opacity: .42; }
.store-leaf { opacity: .14 !important; filter: none; }
.hero {
  background: linear-gradient(110deg, rgba(12, 11, 12, .94) 0%, rgba(38, 19, 15, .82) 53%, rgba(8, 8, 10, .95) 100%);
}
.hero::before { background: radial-gradient(ellipse 720px 380px at 64% 10%, rgba(196, 55, 20, .12), transparent 67%); }
.ambient-glow { background: radial-gradient(circle, rgba(190, 57, 20, .15), transparent 66%); }
.footer { background: rgba(7, 8, 10, .88); }

/* Feature cards: a restrained warm gradient with a luminous frame. */
.hero-highlight,
.hero-highlight-main {
  background: linear-gradient(115deg, rgba(35, 24, 23, .96) 0%, rgba(26, 27, 32, .96) 58%, rgba(50, 25, 18, .92) 100%);
  border-color: rgba(255, 151, 91, .34);
  box-shadow:
    inset 0 1px 0 rgba(255, 205, 160, .10),
    0 12px 30px rgba(0, 0, 0, .28),
    0 0 0 1px rgba(255, 82, 35, .08);
}
.hero-highlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(125deg, rgba(255, 194, 120, .64), rgba(255, 89, 42, .30) 38%, rgba(255, 255, 255, .13) 68%, rgba(255, 137, 72, .48));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-highlight:hover {
  border-color: rgba(255, 171, 108, .58);
  box-shadow:
    inset 0 1px 0 rgba(255, 218, 184, .15),
    0 16px 34px rgba(0, 0, 0, .34),
    0 0 22px rgba(255, 76, 29, .14);
}

@media (max-width: 768px) {
  .hero { padding-top: 48px; }
  .hero::after { right: 2%; top: 4%; font-size: 22px; letter-spacing: .55em; }
  body::after { opacity: 0.13; }
}
