/* ScriptMarket — Main Stylesheet */
/* Dark marketplace theme inspired by Pixer */

:root {
  --bg-base:      #0d0f12;
  --bg-card:      #151820;
  --bg-card-2:    #1c2030;
  --bg-sidebar:   #111318;
  --border:       #252a36;
  --border-hover: #353d52;
  --text:         #e4e8f0;
  --text-muted:   #7a8499;
  --text-dim:     #4a5268;
  --accent:       #00d4a1;
  --accent-dim:   rgba(0,212,161,.15);
  --accent-hover: #00f0b8;
  --blue:         #4d8fff;
  --blue-dim:     rgba(77,143,255,.15);
  --red:          #ff5a5a;
  --red-dim:      rgba(255,90,90,.15);
  --yellow:       #ffc940;
  --yellow-dim:   rgba(255,201,64,.15);
  --price:        #00d4a1;
  --old-price:    #4a5268;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 4px 24px rgba(0,0,0,.4);
  --shadow-card:  0 2px 12px rgba(0,0,0,.3);
  --transition:   0.2s ease;
  --font:         'Space Grotesk', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
input, textarea, select, button { font-family: var(--font); }

/* ── AD BANNERS ─────────────────────────────────────────────────────────── */
.ad-banner-top, .ad-banner-bottom {
  width: 100%;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 8px;
  font-size: .75rem;
  color: var(--text-muted);
  overflow: hidden;
}
.ad-banner-top img, .ad-banner-bottom img { max-height: 90px; margin: 0 auto; }

/* ── HEADER ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13,15,18,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.5rem; }
.logo-text { color: var(--text); }

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.header-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .9rem;
}
.header-search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px 9px 38px;
  border-radius: 8px;
  font-size: .9rem;
  transition: border-color var(--transition);
}
.header-search input:focus {
  outline: none;
  border-color: var(--accent);
}
.header-search input::placeholder { color: var(--text-dim); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav-icon-btn:hover { background: var(--bg-card); color: var(--text); }
.nav-icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent);
  color: #000;
  font-size: .6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu { position: relative; }
.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .875rem;
  transition: border-color var(--transition);
}
.user-avatar-btn:hover { border-color: var(--border-hover); }
.user-avatar-btn img, .avatar-initials {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-initials {
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
}
.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 300;
}
.user-menu:hover .user-dropdown,
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: .875rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.user-dropdown a:hover { background: var(--bg-card-2); color: var(--text); }
.user-dropdown a i { width: 16px; color: var(--text-dim); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.badge-sm {
  background: var(--accent);
  color: #000;
  font-size: .6rem;
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: 700;
}

/* ── CATEGORY NAV ───────────────────────────────────────────────────────── */
.category-nav {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  white-space: nowrap;
}
.cat-link {
  padding: 10px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  flex-shrink: 0;
}
.cat-link:hover { color: var(--text); }
.cat-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); }
.btn-accent { background: var(--accent); color: #000; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: .85; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── FLASH ──────────────────────────────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: .9rem;
}
.flash button {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: .6;
}
.flash-success { background: var(--accent-dim); color: var(--accent); border-left: 3px solid var(--accent); }
.flash-error   { background: var(--red-dim);    color: var(--red);    border-left: 3px solid var(--red); }
.flash-warning { background: var(--yellow-dim); color: var(--yellow); border-left: 3px solid var(--yellow); }
.flash-info    { background: var(--blue-dim);   color: var(--blue);   border-left: 3px solid var(--blue); }

/* ── MAIN LAYOUT ────────────────────────────────────────────────────────── */
.site-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  min-height: 70vh;
}

/* ── PRODUCT GRID ───────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}
.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-card-2);
}
.product-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-thumb img { transform: scale(1.04); }
.product-card-thumb .badge-free {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.product-card-thumb .badge-featured {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--yellow);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.product-card-body {
  padding: 14px 16px 16px;
}

.product-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.product-card-meta .seller-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card-2);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: var(--accent);
  overflow: hidden;
}
.seller-name { font-size: .8rem; color: var(--text-muted); }

.product-card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price { font-size: 1rem; font-weight: 700; color: var(--price); }
.product-price .old-price {
  font-size: .8rem;
  color: var(--old-price);
  font-weight: 400;
  text-decoration: line-through;
  margin-left: 6px;
}
.product-price.free { color: var(--accent); }

.product-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  color: var(--text-dim);
}
.product-stats i { font-size: .75rem; }

/* ── PRODUCT DETAIL ─────────────────────────────────────────────────────── */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
}
.product-screenshots {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--bg-card-2);
}
.product-screenshots img {
  width: 100%;
  cursor: pointer;
  transition: opacity .2s;
}
.screenshot-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
}
.screenshot-thumbs img {
  width: 80px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: .7;
  transition: all .2s;
}
.screenshot-thumbs img.active, .screenshot-thumbs img:hover { border-color: var(--accent); opacity: 1; }

.product-purchase-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.purchase-price { font-size: 2rem; font-weight: 700; color: var(--price); margin-bottom: 4px; }
.purchase-old { font-size: 1rem; color: var(--text-dim); text-decoration: line-through; }

.product-info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-muted); }
.info-row .val { font-weight: 500; }

/* ── FORMS ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
}
.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .9rem;
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control option { background: var(--bg-card); }
.form-hint { font-size: .8rem; color: var(--text-dim); margin-top: 5px; }
.form-error { font-size: .8rem; color: var(--red); margin-top: 5px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* File drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-card);
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: var(--accent-dim); }
.drop-zone .icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .6; }
.drop-zone p { font-size: .9rem; color: var(--text-muted); }
.drop-zone input[type=file] { display: none; }

/* ── AUTH PAGES ─────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon { font-size: 2.5rem; }
.auth-logo h2 { font-size: 1.4rem; margin-top: 8px; }
.auth-logo p { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: .875rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); }

/* ── DASHBOARD ──────────────────────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}
.dashboard-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.sidebar-user {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.sidebar-user .avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  margin: 0 auto 10px;
  object-fit: cover;
  background: var(--bg-card-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--accent);
  overflow: hidden;
}
.sidebar-user strong { display: block; font-size: .95rem; }
.sidebar-user span { font-size: .8rem; color: var(--text-muted); }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: .875rem;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.sidebar-nav a:hover { background: var(--bg-card-2); color: var(--text); }
.sidebar-nav a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); }
.sidebar-nav a i { width: 18px; }

.dashboard-content {}
.page-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; }

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .stat-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.stat-card .stat-val {
  font-size: 1.6rem;
  font-weight: 700;
}
.stat-card .stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── TABLE ──────────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--bg-card-2);
  padding: 12px 16px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  font-size: .875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card-2); }

/* ── BADGE STATUS ───────────────────────────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-approved  { background: var(--accent-dim);  color: var(--accent); }
.badge-pending   { background: var(--yellow-dim);  color: var(--yellow); }
.badge-rejected  { background: var(--red-dim);     color: var(--red); }
.badge-draft     { background: var(--bg-card-2);   color: var(--text-muted); }

/* ── COMMENTS ───────────────────────────────────────────────────────────── */
.comment {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.comment-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author strong { font-size: .9rem; display: block; }
.comment-author span { font-size: .78rem; color: var(--text-muted); }
.comment-body { font-size: .9rem; line-height: 1.6; color: var(--text-muted); }
.stars { color: var(--yellow); letter-spacing: 2px; }

/* ── PAGINATION ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.pagination a, .pagination span {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.pagination a { color: var(--text-muted); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: #000; border-color: var(--accent); }
.pagination .dots { border-color: transparent; color: var(--text-dim); }

/* ── ADMIN ──────────────────────────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.admin-sidebar h3 {
  padding: 16px 20px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: .875rem;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.admin-sidebar a:hover { background: var(--bg-card-2); color: var(--text); }
.admin-sidebar a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); }
.admin-sidebar a i { width: 18px; }

/* ── INBOX ──────────────────────────────────────────────────────────────── */
.inbox-layout { display: grid; grid-template-columns: 280px 1fr; gap: 0; }
.inbox-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  overflow: hidden;
}
.inbox-message {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.inbox-message:hover, .inbox-message.active { background: var(--bg-card-2); }
.inbox-message.unread .msg-subject { font-weight: 700; color: var(--text); }
.msg-subject { font-size: .875rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-preview { font-size: .78rem; color: var(--text-dim); margin-top: 3px; }
.msg-time { font-size: .72rem; color: var(--text-dim); }
.inbox-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 24px;
}

/* ── MOBILE ─────────────────────────────────────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  display: block;
  transition: all .3s;
}

@media (max-width: 1100px) {
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-purchase-box { position: static; }
}
@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; }
}
@media (max-width: 768px) {
  .header-inner { gap: 12px; }
  .header-search { max-width: none; flex: 1; }
  .header-nav .btn-accent { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .inbox-layout { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 500px) {
  .header-search { display: none; }
  .menu-toggle { display: flex; }
  .site-main { padding: 20px 16px; }
}

/* ── UTILITIES ──────────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--red); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; opacity: .3; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 6px; }
.empty-state p { font-size: .875rem; color: var(--text-dim); }

/* ── WALLET / TOPUP ─────────────────────────────────────────────────────── */
.wallet-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
}

/* ── STAR RATING interactive ────────────────────────────────────────────── */
.star-rating span {
  cursor: pointer;
  user-select: none;
  transition: color .15s, transform .1s;
  display: inline-block;
}
.star-rating span:hover {
  transform: scale(1.2);
}
.star-rating span.selected {
  color: var(--yellow) !important;
}

/* ── PRODUCT detail tweaks ───────────────────────────────────────────────── */
.product-info-box .label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.product-info-box .val {
  font-size: .875rem;
}

/* ── MOBILE nav open ────────────────────────────────────────────────────── */
@media (max-width: 500px) {
  .header-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    z-index: 199;
    gap: 10px;
    box-shadow: var(--shadow);
  }
  .header-nav.mobile-open .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── CODE blocks ─────────────────────────────────────────────────────────── */
code {
  font-family: var(--font-mono);
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .82rem;
  color: var(--accent);
}

/* ── SCROLLBAR ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── SELECTION ───────────────────────────────────────────────────────────── */
::selection { background: var(--accent-dim); color: var(--accent); }

/* ── FOCUS visible ───────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── LOADING skeleton ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── BACK TO TOP ─────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow);
  transition: opacity .2s;
  z-index: 100;
}
.back-to-top.visible { display: flex; }

/* ── NOTIFICATION dot ────────────────────────────────────────────────────── */
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 4px;
}

/* ── PRODUCT card hover overlay ──────────────────────────────────────────── */
.product-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,212,161,0);
  transition: background .25s;
}
.product-card:hover .product-card-thumb::after {
  background: rgba(0,212,161,.04);
}

/* ── INPUT range ─────────────────────────────────────────────────────────── */
input[type=range] {
  accent-color: var(--accent);
}

/* ── Checkbox & radio ────────────────────────────────────────────────────── */
input[type=checkbox], input[type=radio] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── TOPUP card special border ───────────────────────────────────────────── */
.card.payment-card {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card), rgba(0,212,161,.04));
}

/* ── PRICE highlight on purchase box ─────────────────────────────────────── */
.product-purchase-box .purchase-price {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

/* ── SECTION divider ─────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── ALERT boxes ─────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-info    { background: var(--blue-dim);   color: var(--blue);   border-left: 3px solid var(--blue); }
.alert-success { background: var(--accent-dim); color: var(--accent); border-left: 3px solid var(--accent); }
.alert-warning { background: var(--yellow-dim); color: var(--yellow); border-left: 3px solid var(--yellow); }
.alert-danger  { background: var(--red-dim);    color: var(--red);    border-left: 3px solid var(--red); }

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
}
.footer-brand p {
  font-size: .875rem;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 240px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-col h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  text-align: center;
  font-size: .82rem;
  color: var(--text-dim);
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
}
