:root {
  --bg: #0d0f12;
  --bg-alt: #15181d;
  --card: #1b1f26;
  --border: #2a2f38;
  --text: #e8e9eb;
  --text-dim: #9aa0aa;
  --silver: #c9d1d9;
  --silver-bright: #f4f5f7;
  --silver-mid: #c0c0c0;
  --silver-dim: #7d838c;
  --silver-gradient: linear-gradient(135deg, var(--silver-bright) 0%, var(--silver-mid) 55%, var(--silver-dim) 100%);
  --accent: var(--silver-mid);
  --accent-dark: var(--silver-dim);
  --danger: #e05c5c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

button, .btn-ghost, .btn-solid, .nav .discord-link {
  transition: filter 0.15s ease, transform 0.1s ease, background-color 0.15s ease;
}
button:active, .btn-ghost:active, .btn-solid:active, .nav .discord-link:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.demo-banner {
  background: #3a2f0f;
  color: #f3d98b;
  text-align: center;
  padding: 8px 12px;
  font-size: 14px;
  border-bottom: 1px solid #6b551a;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--silver);
  letter-spacing: 0.5px;
}
.brand span {
  background: var(--silver-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand:hover { text-decoration: none; }

.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--text-dim); font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .discord-link {
  background: var(--silver-gradient);
  color: #14161a;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
}
.nav .discord-link:hover { filter: brightness(1.08); color: #14161a; }

.hero {
  padding: 64px 0 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #1c2128 0%, var(--bg) 70%);
}
.hero h1 {
  font-size: 32px;
  margin: 0 0 12px;
  background: var(--silver-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--text-dim); margin: 0; font-size: 16px; }

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.btn-ghost, .btn-solid {
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
}
.btn-ghost { background: transparent; color: var(--silver-bright); }
.btn-ghost:hover { border-color: var(--silver-mid); }
.btn-solid { background: var(--silver-gradient); color: #14161a; border: none; }
.btn-solid:hover { filter: brightness(1.08); }

.server-info {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
}
.server-info h2 { color: var(--silver); font-size: 20px; margin: 0 0 18px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.info-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-stat[hidden] { display: none; }
.info-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 16px; font-weight: 700; color: var(--silver-bright); }

.checkout-bar {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.checkout-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}
.checkout-field { display: flex; flex-direction: column; gap: 6px; }
.checkout-field label { font-weight: 600; font-size: 14px; }
.checkout-field .optional { font-weight: 400; color: var(--text-dim); font-size: 12px; }
.checkout-bar input {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  width: 200px;
  transition: outline-color 0.15s ease;
}
.checkout-bar input:focus { outline: 2px solid var(--accent); }
.username-hint { color: var(--text-dim); font-size: 13px; flex-basis: 100%; }

#catalog { padding: 48px 24px; }
.loading, .error { color: var(--text-dim); text-align: center; padding: 40px 0; }

.category { margin-bottom: 48px; }
.category h2 {
  color: var(--silver);
  font-size: 22px;
  margin-bottom: 20px;
  border-left: 4px solid transparent;
  border-image: var(--silver-gradient) 1;
  padding-left: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}

.product-card {
  background: linear-gradient(160deg, var(--card) 0%, #14171c 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--silver-dim);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.product-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--silver-gradient);
}
.product-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-alt);
}
.product-card h3 { margin: 0; font-size: 17px; color: var(--text); }
.product-card p { margin: 0; color: var(--text-dim); font-size: 13px; flex-grow: 1; }
.product-card .price { font-size: 18px; font-weight: 700; color: var(--silver-bright); display: flex; flex-direction: column; gap: 2px; }
.product-card .price .was { font-size: 13px; font-weight: 500; color: var(--text-dim); text-decoration: line-through; }
.product-card .price .now { color: var(--silver-bright); }
.product-card .price .sar,
.product-card .price .tax-note { font-size: 12px; font-weight: 500; color: var(--text-dim); margin-top: 2px; }
.product-card .featured { position: absolute; top: 10px; right: -30px; transform: rotate(40deg); background: var(--silver-gradient); color: #14161a; font-size: 11px; font-weight: 700; padding: 3px 32px; }
.product-card .sale-badge { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg, #ff8a65, #e05c5c); color: #1a0e0e; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.product-card:has(.sale-badge) { padding-top: 44px; }
.product-card button {
  background: var(--silver-gradient);
  color: #14161a;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}
.product-card button:hover { filter: brightness(1.08); }
.product-card button:disabled { background: var(--border); color: var(--text-dim); cursor: not-allowed; filter: none; }

.fade-in { animation: fade-in-up 0.35s ease both; }
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.skeleton-grid { pointer-events: none; }
.product-card.skeleton {
  height: 220px;
  background: linear-gradient(100deg, var(--card) 30%, #232830 50%, var(--card) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.faq { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 40px 0; }
.faq h2 { color: var(--silver); font-size: 20px; }
.faq ul { color: var(--text-dim); font-size: 14px; padding-left: 20px; }
.faq li { margin-bottom: 8px; }

.site-footer {
  padding: 24px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  max-width: 360px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.15s ease;
}
.modal.open .modal-box { transform: scale(1); }
.modal-box p { color: var(--text); margin-bottom: 16px; }
.modal-box button {
  background: var(--silver-gradient);
  color: #14161a;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 640px) {
  .nav { gap: 14px; }
  .hero h1 { font-size: 24px; }
  .checkout-bar input { width: 100%; }
  .checkout-field { width: 100%; }
}
