:root {
  --bg: #0f0d0a;
  --bg-2: #16130e;
  --card: #1b1712;
  --card-2: #211c16;
  --line: #2c251d;
  --text: #E0D5BF;
  --muted: #9a8f7a;
  --accent: #BF4718;
  --accent-2: #d96a2e;
  --green: #7fae5a;
  --red: #c0392b;
  --gold: #d4a13a;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: var(--accent-2); text-decoration: none; }

.sf-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sf-narrow { max-width: 720px; }

/* Header */
.sf-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,13,10,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.sf-header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.sf-logo { height: 40px; width: auto; }
.sf-nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.sf-nav a { color: var(--muted); font-weight: 600; letter-spacing: .5px; font-size: 14px; }
.sf-nav a:hover { color: var(--text); }
.sf-cart-btn {
  position: relative; border: 1px solid var(--line); background: var(--card);
  color: var(--text); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-size: 18px;
}
.sf-cart-btn:hover { border-color: var(--accent); }
.sf-cart-count {
  position: absolute; top: -7px; right: -7px; background: var(--accent); color: #fff;
  border-radius: 50%; min-width: 20px; height: 20px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* Banner */
.sf-banner {
  background: #7c3aed; color: #fff; text-align: center; padding: 10px 16px;
  font-size: 14px; font-weight: 600;
}

/* Hero */
.sf-hero { padding: 70px 20px 56px; text-align: center;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(191,71,24,.25), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--line);
}
.sf-hero-title {
  font-family: 'Bebas Neue', Impact, sans-serif; font-weight: 400;
  font-size: clamp(40px, 7vw, 68px); letter-spacing: 6px; margin: 0 0 8px; color: var(--text);
}
.sf-hero-sub { color: var(--muted); font-size: 18px; margin: 0 0 26px; letter-spacing: .5px; }

/* Buttons */
.sf-btn {
  display: inline-block; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 22px; font-family: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer; background: var(--card); color: var(--text); letter-spacing: .5px;
  transition: all .15s ease;
}
.sf-btn:hover { transform: translateY(-1px); }
.sf-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.sf-btn-primary:hover { background: var(--accent-2); }
.sf-btn-ghost { background: transparent; }
.sf-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.sf-block { width: 100%; }

/* Sections */
.sf-section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.sf-section-title {
  font-family: 'Bebas Neue', Impact, sans-serif; font-weight: 400;
  font-size: 34px; letter-spacing: 3px; margin: 0 0 8px;
}
.sf-muted { color: var(--muted); }
.sf-small { font-size: 14px; }
.sf-tiny { font-size: 12px; }
.sf-note { font-size: 13px; color: var(--gold); min-height: 1em; margin: 6px 0 0; }

.sf-cat-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.sf-cat-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.sf-cat-tabs a {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 14px; text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px; transition: all .15s ease;
}
.sf-cat-tabs a:hover { border-color: var(--accent); }
.sf-cat-tabs a.active { color: var(--text); border-color: var(--accent); background: rgba(191,71,24,.15); }
.sf-cat-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sf-cat-count {
  font-size: 11px; font-weight: 700; background: rgba(191,71,24,.18); color: var(--gold);
  border-radius: 999px; padding: 2px 8px; line-height: 1.4;
}

/* Product grid */
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.sf-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: all .15s ease; position: relative; overflow: hidden;
}
.sf-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.sf-card-badge {
  position: absolute; top: 12px; right: 12px; background: var(--gold); color: #211;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .5px;
}
.sf-card-img {
  height: 120px; border-radius: 8px; margin-bottom: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 44px; background: var(--card-2); border: 1px solid var(--line);
  overflow: hidden;
}
.sf-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-card-img span { font-size: 44px; }
.sf-card-cat { font-size: 12px; color: var(--accent-2); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.sf-card h3 { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 22px; letter-spacing: 1px; margin: 6px 0 4px; }
/* Product-card excerpt: sanitized plain text, clamped to ~3 lines so the grid
 * stays compact. The full description is never rendered on the card. */
.sf-card-desc {
  color: var(--muted); font-size: 14px; line-height: 1.45; margin: 4px 0 4px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.9em;
}
.sf-card-more {
  display: block; color: var(--accent-2); font-size: 12px; font-weight: 700;
  letter-spacing: .5px; margin: 0 0 12px;
}
.sf-card-foot { display: flex; align-items: center; justify-content: space-between; }
.sf-price { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 24px; letter-spacing: 1px; color: var(--gold); }
.sf-add {
  border: none; background: var(--accent); color: #fff; font-family: inherit; font-weight: 700;
  border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 14px;
}
.sf-add:hover { background: var(--accent-2); }
.sf-add.sold-out { background: #444; cursor: not-allowed; }
.sf-card.sold-out { opacity: .6; }

/* Empty / error */
.sf-empty, .sf-error { text-align: center; padding: 60px 20px; color: var(--muted); }
.sf-empty-icon { font-size: 48px; margin-bottom: 12px; }
.sf-error { color: var(--red); }

/* Modal */
body.sf-modal-open { overflow: hidden; }
.sf-modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.7); padding: 20px;
}
.sf-modal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  max-width: 620px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 26px; position: relative;
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}
/* Full product description in the detail surface: preserve paragraph / list /
 * line-break structure, never line-clamp or clip. */
.sf-product-desc-title {
  font-family: 'Bebas Neue', Impact, sans-serif; font-size: 18px; letter-spacing: 1px;
  margin: 18px 0 8px; color: var(--accent-2);
}
.sf-product-desc {
  color: var(--muted); font-size: 15px; line-height: 1.65; white-space: pre-wrap;
  word-break: break-word; overflow-wrap: anywhere;
}
.sf-modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; z-index: 2;
}
.sf-modal-close:hover { color: var(--text); }
.sf-product-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.sf-product-hero .sf-card-img { height: 130px; width: 130px; margin: 0; }
.sf-product-hero h2 { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 30px; letter-spacing: 1px; margin: 0; }
.sf-qty-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.sf-qty-row input { width: 70px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px; font-family: inherit; font-size: 16px; text-align: center; }
.sf-qty-btn { border: 1px solid var(--line); background: var(--card-2); color: var(--text); width: 34px; height: 34px;
  border-radius: 8px; font-size: 18px; cursor: pointer; }

/* Form fields */
.sf-form { display: grid; gap: 14px; }
.sf-field { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.sf-field input {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 11px 12px; font-family: inherit; font-size: 15px;
}
.sf-field input:focus { outline: none; border-color: var(--accent); }
.sf-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sf-req { color: var(--accent-2); }

/* Cart drawer */
.sf-drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); }
.sf-drawer {
  position: fixed; top: 0; right: 0; z-index: 70; height: 100vh; width: min(440px, 92vw);
  background: var(--bg-2); border-left: 1px solid var(--line); padding: 20px;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease;
}
.sf-drawer.open { transform: translateX(0); }
.sf-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sf-drawer-head h3 { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 26px; letter-spacing: 2px; margin: 0; }
.sf-cart-body { flex: 1; overflow-y: auto; display: grid; gap: 12px; align-content: start; }
.sf-cart-item { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; align-items: center; }
.sf-cart-item .sf-card-img { height: 52px; width: 52px; margin: 0; font-size: 24px; }
.sf-cart-item-info { flex: 1; }
.sf-cart-item-info h4 { margin: 0 0 2px; font-size: 15px; }
.sf-cart-item-info .sf-muted { font-size: 12px; }
.sf-cart-item-qty { display: flex; align-items: center; gap: 6px; }
.sf-cart-item-qty button { border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: 14px; line-height: 1; }
.sf-cart-item-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 16px; }
.sf-cart-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.sf-cart-checkout { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; display: grid; gap: 10px; }
.sf-summary-row { display: flex; justify-content: space-between; font-size: 15px; }
.sf-total { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 26px; letter-spacing: 1px; color: var(--gold); }
.sf-discount { color: var(--green); }
.sf-rule { border: none; border-top: 1px solid var(--line); margin: 6px 0; }

/* Receipt */
.sf-receipt-status { display: inline-block; padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.sf-rs-pending { background: rgba(212,161,58,.15); color: var(--gold); }
.sf-rs-paid, .sf-rs-fulfilled { background: rgba(127,174,90,.15); color: var(--green); }
.sf-rs-refunded, .sf-rs-failed { background: rgba(192,57,43,.15); color: var(--red); }
.sf-policy { color: var(--muted); white-space: pre-wrap; }
.sf-policy p { margin: 0 0 10px; }

/* Footer */
.sf-footer { padding: 34px 0; text-align: center; color: var(--muted); }
.sf-footer p { margin: 4px 0; }

/* Responsive */
@media (max-width: 640px) {
  .sf-nav { display: none; }
  .sf-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .sf-2col { grid-template-columns: 1fr; }
}

/* ---------------- Steam account ---------------- */
.sf-account { display: flex; align-items: center; margin-right: 10px; }
.sf-account-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; max-width: 220px; white-space: nowrap; overflow: hidden;
}
.sf-account-chip:hover { border-color: #BF4718; }
.sf-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sf-account-block { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.sf-account-confirm { display: flex; gap: 10px; align-items: center; }
.sf-account-confirm .sf-avatar { width: 40px; height: 40px; }
.sf-verified { color: #4caf50; font-weight: 700; }
.sf-btn-steam {
  background: #1b2838; color: #fff; border: 1px solid #66c0f4;
}
.sf-btn-steam:hover { background: #2a475e; }
.sf-account-block code { background: #000; padding: 1px 5px; border-radius: 4px; font-size: 11px; }
