/* =====================================================================
   ItemFix — Premium Esports Design System
   Dark gaming aesthetic · lime/cyan accents · NO purple
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Orbitron:wght@500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

/* ------------------------------------------------------------------ */
/* CSS Variables — Dark (default)                                     */
/* ------------------------------------------------------------------ */
:root,
[data-theme="dark"] {
  --bg-base: #0b0f14;
  --bg-elevated: #111820;
  --bg-surface: #161d27;
  --bg-surface-hover: #1c2533;
  --bg-input: #0e141c;
  --border: rgba(124, 255, 107, 0.12);
  --border-strong: rgba(46, 230, 166, 0.28);
  --text-primary: #eef2f7;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-lime: #7CFF6B;
  --accent-cyan: #2EE6A6;
  --accent-glow: rgba(124, 255, 107, 0.35);
  --accent-cyan-glow: rgba(46, 230, 166, 0.25);
  --gradient-brand: linear-gradient(135deg, #7CFF6B 0%, #2EE6A6 100%);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(46, 230, 166, 0.15) 0%, transparent 60%),
                   radial-gradient(ellipse 60% 40% at 90% 20%, rgba(124, 255, 107, 0.08) 0%, transparent 50%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 24px var(--accent-glow);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
  --header-bg: rgba(11, 15, 20, 0.92);
  --overlay: rgba(11, 15, 20, 0.75);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-display: 'Orbitron', 'Rajdhani', sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1200px;
  --sidebar-width: 260px;
}

/* Light theme */
[data-theme="light"] {
  --bg-base: #f4f6f9;
  --bg-elevated: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f0f4f8;
  --bg-input: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(46, 230, 166, 0.45);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-glow: rgba(46, 230, 166, 0.2);
  --accent-cyan-glow: rgba(46, 230, 166, 0.15);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
  --header-bg: rgba(255, 255, 255, 0.94);
  --overlay: rgba(15, 23, 42, 0.5);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(46, 230, 166, 0.12) 0%, transparent 60%);
}

/* ------------------------------------------------------------------ */
/* Reset & Base                                                       */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-lime); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection {
  background: var(--accent-cyan);
  color: #fff;
}

/* ------------------------------------------------------------------ */
/* Layout                                                             */
/* ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.main-content {
  flex: 1;
  padding: 2rem 0 4rem;
}

.page-home .main-content { padding-top: 0; }

.section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Fade-in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.55s ease forwards;
}

.animate-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-in-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ------------------------------------------------------------------ */
/* Header                                                             */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: 0.06em;
  max-width: 220px;
}

.logo img,
img.site-logo {
  height: 42px !important;
  width: auto !important;
  max-width: 180px !important;
  max-height: 42px !important;
  object-fit: contain;
  display: block;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--gradient-brand);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
}

.logo span.accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.main-nav a {
  padding: 0.5rem 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-lime);
  background: rgba(124, 255, 107, 0.08);
}

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.header-search {
  flex: 1;
  max-width: 320px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color var(--transition);
}

.header-search input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.header-search svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--accent-lime);
  background: var(--bg-surface-hover);
}

.icon-btn svg { width: 18px; height: 18px; }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle { display: none; }

@media (max-width: 992px) {
  .main-nav { display: none; }
  .header-search { display: none; }
  .mobile-nav-toggle { display: inline-flex; }
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--overlay);
}

.mobile-nav.is-open { display: block; }

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 90vw);
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  padding: 1.5rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition);
}

.mobile-nav.is-open .mobile-nav-panel { transform: translateX(0); }

.mobile-nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.mobile-nav-links a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-primary);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

/* ------------------------------------------------------------------ */
/* Footer                                                             */
/* ------------------------------------------------------------------ */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 0.25rem 0;
}

.footer-col a:hover { color: var(--accent-lime); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                            */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-lime);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(124, 255, 107, 0.08);
  color: var(--accent-lime);
}

.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ------------------------------------------------------------------ */
/* Cards                                                              */
/* ------------------------------------------------------------------ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-body { padding: 1.25rem; }

.card-image {
  aspect-ratio: 16/10;
  background: var(--bg-elevated);
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-image img { transform: scale(1.05); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  color: var(--text-muted);
  font-size: 2rem;
}

/* Product card */
.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card .card-body { flex: 1; display: flex; flex-direction: column; }

.product-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-title a { color: inherit; text-decoration: none; }
.product-card-title a:hover { color: var(--accent-lime); }

.product-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}

.product-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-lime);
}

.product-price-old {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 99px;
}

.badge-stock { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-out { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-featured { background: rgba(124, 255, 107, 0.15); color: var(--accent-lime); }
.badge-sale { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.badge-status-pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-status-processing { background: rgba(56, 189, 248, 0.15); color: var(--info); }
.badge-status-completed { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-status-cancelled,
.badge-status-refunded { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-status-open { background: rgba(56, 189, 248, 0.15); color: var(--info); }
.badge-status-closed { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); }
.badge-status-unpaid { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-status-paid { background: rgba(34, 197, 94, 0.15); color: var(--success); }

.card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ------------------------------------------------------------------ */
/* Forms                                                              */
/* ------------------------------------------------------------------ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

textarea.form-control { min-height: 120px; resize: vertical; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-cyan);
  margin-top: 2px;
  flex-shrink: 0;
}

.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Payment method cards */
.payment-methods { display: flex; flex-direction: column; gap: 0.75rem; }

.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.payment-option:has(input:checked) {
  border-color: var(--accent-cyan);
  background: rgba(46, 230, 166, 0.06);
}

.payment-option-label {
  font-weight: 600;
  color: var(--text-primary);
}

.payment-option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ------------------------------------------------------------------ */
/* Panel / Sidebar                                                    */
/* ------------------------------------------------------------------ */
.panel-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .panel-layout { grid-template-columns: 1fr; }
}

.panel-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: 5.5rem;
}

.panel-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.panel-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}

.panel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-edit {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-avatar-preview.panel-avatar {
  width: 80px;
  height: 80px;
  font-size: 1.75rem;
  border-radius: 50%;
}

.profile-avatar-controls {
  flex: 1;
  min-width: 200px;
}

.panel-user-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.panel-user-balance {
  font-size: 0.8rem;
  color: var(--accent-lime);
  font-weight: 600;
}

.panel-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.panel-nav a:hover,
.panel-nav a.active {
  color: var(--accent-lime);
  background: rgba(124, 255, 107, 0.08);
}

.panel-nav svg { width: 18px; height: 18px; opacity: 0.7; }

.panel-content { min-width: 0; }

.panel-header {
  margin-bottom: 1.75rem;
}

.panel-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.panel-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-lime);
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-elevated);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-surface-hover); }

.data-table a { font-weight: 500; }

/* ------------------------------------------------------------------ */
/* Hero (Home)                                                        */
/* ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: var(--bg-base);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 255, 107, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 255, 107, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  padding: 0.35rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-title .highlight {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* Product detail                                                     */
/* ------------------------------------------------------------------ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
}

.product-gallery {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 { margin-bottom: 0.75rem; }

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.product-price-lg {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-lime);
  margin-bottom: 1.5rem;
}

.product-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.qty-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-input button {
  width: 40px;
  height: 44px;
  border: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.1rem;
}

.qty-input input {
  width: 50px;
  height: 44px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  text-align: center;
  font-weight: 600;
}

.product-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

.product-description h2,
.product-description h3 { margin-top: 1.5rem; }

/* ------------------------------------------------------------------ */
/* Cart & Checkout                                                    */
/* ------------------------------------------------------------------ */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
}

.order-summary {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 5.5rem;
}

.order-summary h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.summary-line.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.summary-line.total span:last-child {
  color: var(--accent-lime);
  font-family: var(--font-display);
}

.cart-line {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-line-image {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-line-image img { width: 100%; height: 100%; object-fit: cover; }

.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 600; font-size: 0.9rem; }
.cart-line-price { color: var(--accent-lime); font-weight: 600; font-size: 0.875rem; }

/* ------------------------------------------------------------------ */
/* Marketplace                                                        */
/* ------------------------------------------------------------------ */
.marketplace-card .card-body { padding: 1rem; }

.marketplace-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-lime);
}

.marketplace-game {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.message-bubble {
  max-width: 80%;
  padding: 0.85rem 1.05rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.message-bubble.sent {
  align-self: flex-end;
  background: rgba(46, 230, 166, 0.32);
  border: 1px solid rgba(46, 230, 166, 0.55);
}

.message-bubble.received {
  align-self: flex-start;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-strong);
}

.message-bubble .msg-sender {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ------------------------------------------------------------------ */
/* Flash messages                                                     */
/* ------------------------------------------------------------------ */
.flash-messages {
  position: fixed;
  top: 5rem;
  right: 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
}

.flash {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.flash-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--success);
}

.flash-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.flash-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--warning);
}

.flash-info {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--info);
}

/* ------------------------------------------------------------------ */
/* Auth pages                                                         */
/* ------------------------------------------------------------------ */
.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ */
/* Empty state                                                        */
/* ------------------------------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Pagination                                                         */
/* ------------------------------------------------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--border-strong);
  color: var(--accent-lime);
}

.pagination .active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
}

.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Breadcrumb                                                         */
/* ------------------------------------------------------------------ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span.sep { opacity: 0.5; }

/* ------------------------------------------------------------------ */
/* Codes display                                                      */
/* ------------------------------------------------------------------ */
.code-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.code-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

/* ------------------------------------------------------------------ */
/* Error pages                                                        */
/* ------------------------------------------------------------------ */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* PayTR iframe                                                       */
/* ------------------------------------------------------------------ */
.paytr-frame {
  width: 100%;
  min-height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

/* ------------------------------------------------------------------ */
/* Invoice print layout                                               */
/* ------------------------------------------------------------------ */
.invoice-print {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  color: #111;
  padding: 2rem;
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}

/* ------------------------------------------------------------------ */
/* Theme toggle icon                                                  */
/* ------------------------------------------------------------------ */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ------------------------------------------------------------------ */
/* Utilities                                                          */
/* ------------------------------------------------------------------ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-lime); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ------------------------------------------------------------------ */
/* Faz 2 — Popup, compare FAB, currency, social auth                  */
/* ------------------------------------------------------------------ */
.hero.hero-has-image {
  background-size: cover;
  background-position: center;
}
.hero.hero-has-image .hero-grid-bg { opacity: 0.35; }

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.popup-overlay[hidden] { display: none !important; }
.popup-modal {
  position: relative;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  animation: popupIn 0.25s ease;
}
@keyframes popupIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  font-size: 1.5rem;
  line-height: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}
.popup-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.compare-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-lime);
  color: #0a0a0a;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(163, 230, 53, 0.35);
  text-decoration: none;
  transition: transform 0.2s ease;
}
.compare-fab:hover { transform: scale(1.06); color: #0a0a0a; }
.compare-fab svg { width: 22px; height: 22px; }
.compare-fab-count,
[data-compare-count] {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
}

.currency-switcher select {
  min-width: 90px;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
}

.compare-table .compare-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 auto 0.5rem;
}
.compare-product-link {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .currency-switcher { display: none; }
  .compare-fab { bottom: 1rem; right: 1rem; }
}

/* ------------------------------------------------------------------ */
/* Seller identity, KYC tick, badges, boost                           */
/* ------------------------------------------------------------------ */
.seller-identity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.seller-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.seller-avatar-wrap.seller-avatar--lg {
  width: 96px;
  height: 96px;
}
.seller-avatar-wrap .seller-avatar,
.seller-avatar-wrap .panel-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.kyc-tick {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563EB;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.seller-avatar--lg .kyc-tick {
  width: 24px;
  height: 24px;
  font-size: 13px;
  line-height: 24px;
  right: 2px;
  bottom: 2px;
}
.seller-identity-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.seller-level {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(46, 230, 166, 0.15);
  color: var(--accent-cyan);
}
.seller-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.2rem;
}
.seller-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 0.35rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0b0f14;
  border: 1px solid transparent;
}
.seller-badge--verified { background: #38bdf8; color: #0b0f14; }
.seller-badge--gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.seller-badge--ruby { background: linear-gradient(135deg, #f43f5e, #be123c); color: #fff; }
.seller-badge--diamond { background: linear-gradient(135deg, #e0f2fe, #7dd3fc); }
.seller-badge--emerald { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }
.seller-badge--star { background: linear-gradient(135deg, #fde68a, #fbbf24); }
.seller-badge--shopper { background: linear-gradient(135deg, #a78bfa, #6366f1); color: #fff; }

.marketplace-card { position: relative; overflow: hidden; }
.marketplace-card--recommended {
  border: 1px solid rgba(46, 230, 166, 0.45);
  box-shadow: 0 0 0 1px rgba(46, 230, 166, 0.12), var(--shadow-md);
}
.marketplace-recommended-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--gradient-brand);
  color: #0b0f14;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
}
.marketplace-boost-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(11, 15, 20, 0.82);
  color: var(--accent-lime);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
}
.marketplace-boost-inline {
  color: var(--accent-lime);
  font-weight: 700;
}
.boost-panel h3 { color: var(--text-primary); }
