/* ═══════════════════════════════════════════════════════════════
   MATERIKA DIGITAL — Global CSS
   by Frank Ricci Design
   ═══════════════════════════════════════════════════════════════ */

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg:            #0A0A0A;
  --surface:       #141414;
  --surface-hover: #1C1C1C;
  --border:        #2A2A2A;
  --accent:        #E8600A;
  --accent-hover:  #B84A08;
  --accent-light:  #FF8A3D;
  --text-1:        #F5F5F5;
  --text-2:        #999999;
  --text-3:        #666666;
  --success:       #4ADE80;
  --warning:       #FBBF24;
  --error:         #EF4444;
  --info:          #60A5FA;
  --radius-card:   8px;
  --radius-btn:    6px;
  --radius-badge:  4px;
  --gap:           24px;
  --sidebar-w:     220px;
  --topbar-h:      56px;
  --font-head:     'Roboto Mono', 'Courier New', monospace;
  --font-body:     'Barlow', Arial, sans-serif;
  --container-max: 1280px;
  --container-pad: 48px;
  --container-pad-mobile: 20px;
}

/* ─── BASE ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-pad); width: 100%; }

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: #0E0E0E;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-mark { display: flex; align-items: center; gap: 10px; }
.logo-m {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700;
  color: #0A0A0A;
  letter-spacing: -1px;
  position: relative; overflow: hidden;
  flex-shrink: 0;
}
.logo-m::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
}
.logo-text .brand {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}
.logo-text .sub { font-size: 10px; color: var(--text-3); letter-spacing: 0.05em; }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section {
  padding: 8px 12px 4px;
  font-size: 10px; color: var(--text-3);
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface); color: var(--text-1); }
.nav-item.active { color: var(--accent); border-left-color: var(--accent); background: rgba(232,96,10,0.06); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }
.sidebar-bottom { padding: 16px 20px; border-top: 1px solid var(--border); }
.by-frd { font-size: 11px; color: var(--text-3); }
.by-frd span { color: var(--text-2); font-weight: 500; }

/* ─── MOBILE NAV ──────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #0E0E0E;
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 0;
}
.mobile-nav-items { display: flex; }
.mobile-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 4px 12px;
  color: var(--text-3);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  gap: 4px;
  text-decoration: none;
  transition: color 0.15s;
}
.mobile-nav-item:hover, .mobile-nav-item.active { color: var(--accent); }
.mobile-nav-item svg { width: 20px; height: 20px; }

/* ─── TOPBAR ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #0E0E0E;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 32px;
  position: sticky; top: 0; z-index: 50;
}
.search-wrap { flex: 1; max-width: 480px; position: relative; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 15px; height: 15px; }
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 14px 7px 36px;
  color: var(--text-1);
  font-family: var(--font-body); font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { border-color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.icon-btn {
  width: 32px; height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2);
  transition: all 0.15s;
  position: relative;
  text-decoration: none;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 16px; height: 16px; }
.badge-dot {
  position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  font-size: 9px; font-weight: 700;
  color: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
}
.credits-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px 5px 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  font-size: 13px; font-weight: 600; color: var(--text-1);
  text-decoration: none;
}
.credits-pill:hover { border-color: var(--accent); }
.cr-icon {
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #0A0A0A;
}
.cr-label { font-size: 11px; color: var(--text-3); margin-left: 2px; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1 { font-family: var(--font-head); font-size: 42px; font-weight: 400; line-height: 1.05; letter-spacing: 0.02em; }
h2 { font-family: var(--font-head); font-size: 28px; font-weight: 400; line-height: 1.1; }
h3 { font-family: var(--font-head); font-size: 19px; font-weight: 400; }
h4 { font-family: var(--font-head); font-size: 15px; font-weight: 400; }

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer; border: none;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1;
}
.btn-primary { background: var(--accent); color: #0A0A0A; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text-1); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-2); background: var(--surface); }
.btn-ghost { background: transparent; color: var(--text-2); padding: 8px 12px; }
.btn-ghost:hover { color: var(--text-1); }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ─── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  font-size: 11px; font-weight: 600;
  border-radius: var(--radius-badge);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-head);
}
.badge-free    { background: rgba(74,222,128,0.12); color: var(--success); border: 1px solid rgba(74,222,128,0.25); }
.badge-cat     { background: var(--surface-hover); color: var(--accent); border: 1px solid rgba(232,96,10,0.2); }
.badge-format  { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); font-size: 10px; }
.badge-best    { background: rgba(232,96,10,0.15); color: var(--accent-light); border: 1px solid rgba(232,96,10,0.3); }
.badge-new     { background: rgba(96,165,250,0.12); color: #60A5FA; border: 1px solid rgba(96,165,250,0.25); }
.badge-bundle  { background: rgba(251,191,36,0.1); color: var(--warning); border: 1px solid rgba(251,191,36,0.2); }

/* ─── PRODUCT CARD ───────────────────────────────────────────── */
.prod-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  text-decoration: none;
  display: block;
}
.prod-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(232,96,10,0.12); }
.prod-card:hover .card-overlay { opacity: 1; }
.card-img { aspect-ratio: 1/1; position: relative; overflow: hidden; }
.card-img-inner { width: 100%; height: 100%; transition: transform 0.3s; }
.prod-card:hover .card-img-inner { transform: scale(1.04); }
.card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.18s;
}
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.card-info { padding: 12px; background: rgba(20,20,20,0.72); position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; }
.card-name { font-family: var(--font-head); font-size: 14px; font-weight: 400; color: var(--text-1); line-height: 1.3; margin-bottom: 4px; }
.card-meta { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-price { font-family: var(--font-head); font-size: 16px; font-weight: 400; color: var(--text-1); }
.card-price.free-price { color: var(--success); }
.card-price.strike { text-decoration: line-through; color: var(--text-3); font-size: 13px; }
.card-format { display: flex; gap: 4px; flex-wrap: wrap; }
.card-credits { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.card-credits span { color: var(--accent-light); font-weight: 600; }

/* ─── PRODUCT GRID ───────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.product-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── SECTION ─────────────────────────────────────────────────── */
.section { padding: 32px 32px 0; }
.section-last { padding-bottom: 48px; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--text-1); letter-spacing: 0.02em; }
.section-link { font-size: 13px; color: var(--accent); cursor: pointer; text-decoration: none; }
.section-link:hover { text-decoration: underline; }

/* ─── HORIZONTAL SCROLL ──────────────────────────────────────── */
.hscroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .prod-card { flex: 0 0 calc((100% - 80px) / 6); min-width: 180px; }

/* ─── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: #0E0E0E;
  border-top: 1px solid var(--border);
  padding: 32px;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  flex-wrap: wrap; gap: 16px;
}
.footer-left { display: flex; flex-direction: column; gap: 4px; }
.footer-brand { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text-1); letter-spacing: 0.05em; }
.footer-sub { font-size: 11px; color: var(--text-3); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-3); text-decoration: none; }
.footer-links a:hover { color: var(--text-2); }

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 0.06em; }
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  color: var(--text-1);
  font-family: var(--font-body); font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-3); }

/* ─── UTILITY ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); }
.text-accent { color: var(--accent); }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.text-success { color: var(--success); }
.hidden { display: none !important; }
.eyebrow { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .mobile-nav { display: flex; }
  .topbar { padding: 0 20px; }
  .section { padding: 24px 20px 0; }
  .product-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .site-footer { padding: 24px 20px; }
  body { padding-bottom: 64px; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .credits-pill .cr-label { display: none; }
}
