/* ============================================================
   freeCADblocks — main.css (VectorSticker-style UI)
   Dark marketplace aesthetic: near-black bg, neon accent
   Font: Bebas Neue (display) + DM Sans (body)
   ============================================================ */

/* ── Theme tokens (dark / light / system) ──────────────────── */
html[data-theme="dark"] {
  --bg:              #0d0d0f;
  --bg-alt:          #131316;
  --bg-card:         #18181c;
  --bg-card-hover:   #1f1f25;
  --border:          #2a2a32;
  --border-light:    #35353f;
  --text:            #f0f0f4;
  --text-muted:      #8a8a9a;
  --text-dim:        #5a5a6a;
  --header-bg:       rgba(13, 13, 15, 0.92);
  --hero-glow:       rgba(0, 229, 160, 0.07);
  --thumb-bg:        #111111;
  --overlay-bg:      rgba(0, 0, 0, 0.55);
  --code-bg:         #0a0a0c;
  --cat-dark:        #111116;
  --cat-blue:        #0f1420;
  --cat-warm:        #1a1109;
  --cat-green:       #0a1612;
  --shadow:          0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] {
  --bg:              #f3f4f6;
  --bg-alt:          #e8eaef;
  --bg-card:         #ffffff;
  --bg-card-hover:   #f8f9fb;
  --border:          #d4d7de;
  --border-light:    #c2c6d0;
  --text:            #12141a;
  --text-muted:      #4b5060;
  --text-dim:        #6b7280;
  --header-bg:       rgba(255, 255, 255, 0.92);
  --hero-glow:       rgba(0, 180, 120, 0.12);
  --thumb-bg:        #e4e6eb;
  --overlay-bg:      rgba(0, 0, 0, 0.4);
  --code-bg:         #eef0f4;
  --cat-dark:        #e8e6f2;
  --cat-blue:        #e3ecf8;
  --cat-warm:        #f5efe4;
  --cat-green:       #e4f5ef;
  --shadow:          0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.06);
}





:root,
html {
  --accent:          #00e5a0;
  --accent-dim:      #00c488;
  --accent-glow:     rgba(0, 229, 160, 0.18);
  --accent2:         #7c6ff7;
  --btn-on-accent:   #000000;
  --red:             #ff4d6d;
  --yellow:          #ffd166;
  --radius:          10px;
  --radius-lg:       16px;
  --transition:      0.18s ease;
  --header-h:        64px;
  color-scheme: dark;
}

html[data-theme="light"] { color-scheme: light; }



html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}
ul { list-style: none; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 0.95rem; font-weight: 500; }

/* Logo theme switching */
html[data-theme="dark"]  .logo-light { display: none !important; }
html[data-theme="light"] .logo-dark  { display: none !important; }
html:not([data-theme])   .logo-dark  { display: none !important; }

.logo { display: flex; align-items: center; gap: 8px; }


.logo-icon { color: var(--accent); font-size: 1.3rem; }
.logo:hover { color: var(--accent); }
.accent { color: var(--accent); }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 56px 0;
}
.section.bg-alt {
  background: var(--bg-alt);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--accent);
  color: var(--btn-on-accent);
}
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-light);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.mt-1 { margin-top: 10px; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  overflow: visible;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  overflow: visible;
  height: 100%;
}
.main-nav > a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.main-nav > a:hover, .main-nav > a.active {
  color: var(--text);
  background: var(--bg-card);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.search-form:focus-within {
  border-color: var(--accent);
}
.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 8px 14px;
  width: 220px;
  font-size: 0.875rem;
}
.search-input::placeholder { color: var(--text-dim); }
.search-btn {
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.search-btn:hover { color: var(--accent); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 72px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.hero-inner {
  text-align: center;
  position: relative;
}
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: 0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
  font-weight: 400;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.hero-cta .btn-primary { padding: 12px 28px; font-size: 0.95rem; }
.hero-cta .btn-ghost {
  padding: 12px 28px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.stat span { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Page Hero ─────────────────────────────────────────────── */
.page-hero {
  padding: 52px 0 40px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.page-hero p { color: var(--text-muted); }

/* ── Section Header ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.view-all {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  transition: opacity var(--transition);
}
.view-all:hover { opacity: 0.8; }

/* ── Category Grid ─────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.cat-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition);
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}
.cat-card:hover::before { opacity: 1; }
.cat-dark { background: var(--cat-dark); }
.cat-dark::before { background: linear-gradient(135deg, rgba(124,111,247,0.1), transparent); }
.cat-blue { background: var(--cat-blue); }
.cat-blue::before { background: linear-gradient(135deg, rgba(0,140,255,0.1), transparent); }
.cat-warm { background: var(--cat-warm); }
.cat-warm::before { background: linear-gradient(135deg, rgba(255,180,0,0.1), transparent); }
.cat-green { background: var(--cat-green); }
.cat-green::before { background: linear-gradient(135deg, rgba(0,229,160,0.1), transparent); }
.cat-icon { font-size: 2rem; display: block; margin-bottom: 14px; }
.cat-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.cat-card p { font-size: 0.8rem; color: var(--text-muted); }

/* ── Items Grid ────────────────────────────────────────────── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.item-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
  display: block;
}
.item-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.item-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--thumb-bg);
}
.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.item-card:hover .item-thumb img { transform: scale(1.05); }
.item-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.item-card:hover .item-overlay { opacity: 1; }
.item-info {
  padding: 12px 14px;
}
.item-info h3 {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.item-meta { font-size: 0.75rem; color: var(--text-dim); }
.item-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cat-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(0,229,160,0.12);
  color: var(--accent);
  letter-spacing: 0.03em;
}

/* ── Item Detail ───────────────────────────────────────────── */
.item-detail-section { padding: 48px 0; }
.item-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.item-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
}
.item-info-panel .cat-badge { margin-bottom: 12px; display: inline-block; }
.item-info-panel h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}
.item-stats-row {
  display: flex;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.item-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 20px 0;
  line-height: 1.7;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.tag {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.download-btn { margin-bottom: 16px; }
.license-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Filter Tabs ───────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.tab {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
  background: var(--bg-card);
}
.tab:hover, .tab.active {
  background: var(--accent);
  color: var(--btn-on-accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.page-btn {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  color: var(--btn-on-accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ── AdSense Banner ────────────────────────────────────────── */
.ad-banner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto;
  overflow: hidden;
}

/* ── Auth Pages ────────────────────────────────────────────── */
.auth-section {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background: var(--bg);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}
.auth-card h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  font-size: 2rem;
  margin-bottom: 24px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.auth-form input {
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.auth-form input:focus { border-color: var(--accent); }
.auth-form input::placeholder { color: var(--text-dim); }
.auth-alt {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-alt a { color: var(--accent); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }
.error-msg {
  background: rgba(255,77,109,0.12);
  border: 1px solid rgba(255,77,109,0.35);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.success-msg {
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.3);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* ── Profile ───────────────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: start;
}
.profile-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.profile-avatar {
  margin-bottom: 16px;
}
.profile-avatar img {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  border: 2px solid var(--accent);
}
.avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--btn-on-accent);
  margin: 0 auto;
}
.profile-sidebar h2 { margin-bottom: 4px; }
.user-role {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.profile-main h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

/* ── Upload Form ───────────────────────────────────────────── */
.upload-section { padding: 48px 0; }
.upload-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 680px;
}
.upload-card h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  font-size: 2rem;
  margin-bottom: 32px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%238a8a9a' d='M8 10L3 5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.file-drop {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
}
.file-drop:hover, .file-drop.drag-over {
  border-color: var(--accent);
  background: rgba(0,229,160,0.04);
}
.file-drop-icon { font-size: 2.5rem; margin-bottom: 12px; }
.file-drop p { color: var(--text-muted); font-size: 0.875rem; }
.file-drop span { color: var(--accent); font-weight: 600; }
.file-drop input[type="file"] {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}
.file-drop { position: relative; cursor: pointer; }
.file-chosen {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  word-break: break-all;
}

/* Plain upload inputs — most reliable on mobile / Hostinger */
.file-field-plain { margin-bottom: 22px; }
.input-file-visible {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}
.input-file-visible:hover { border-color: var(--accent); }
.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}
.upload-debug, .upload-server-info pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow-x: auto;
  margin: 16px 0;
  white-space: pre-wrap;
}
.upload-server-info { margin-top: 24px; font-size: 0.85rem; color: var(--text-muted); }
.upload-server-info summary { cursor: pointer; color: var(--accent); }

/* ── Static Pages ──────────────────────────────────────────── */
.static-page { padding: 60px 0; }
.static-page .prose {
  max-width: 720px;
  margin: 0 auto;
}
.prose h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 36px 0 12px;
  color: var(--text);
}
.prose p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}
.prose ul {
  list-style: disc;
  padding-left: 24px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.prose ul li { margin-bottom: 8px; line-height: 1.7; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }

/* ── Contact ───────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.contact-info h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.contact-info p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.contact-item span:first-child { font-size: 1.2rem; }

/* ── Admin ─────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--header-h));
}
.admin-sidebar {
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  padding: 28px 16px;
}
.admin-sidebar h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0 10px;
  margin-bottom: 10px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--transition);
  margin-bottom: 2px;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: var(--bg-card);
  color: var(--text);
}
.admin-main { padding: 32px; }
.admin-main h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.stat-card .stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg-card); }
.data-table img {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 6px;
}
.status-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status-active { background: rgba(0,229,160,0.12); color: var(--accent); }
.status-pending { background: rgba(255,209,102,0.12); color: var(--yellow); }
.status-hidden { background: rgba(255,77,109,0.12); color: var(--red); }
.action-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 10px;
}
.action-link.danger { color: var(--red); }
.action-link:hover { text-decoration: underline; }
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state p { margin-bottom: 20px; font-size: 1rem; }

/* ── 404 ───────────────────────────────────────────────────── */
.error-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}
.error-code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(6rem, 15vw, 12rem);
  line-height: 1;
  color: var(--border-light);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.error-page h2 { margin-bottom: 12px; }
.error-page p { color: var(--text-muted); margin-bottom: 28px; }

/* ── Search Hero ───────────────────────────────────────────── */
.search-form-lg {
  max-width: 540px;
  margin: 20px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: flex;
  gap: 0;
}
.search-form-lg .search-input {
  flex: 1;
  width: auto;
  font-size: 0.95rem;
  padding: 10px 16px;
}
.search-form-lg .btn {
  border-radius: 8px;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); max-width: 260px; line-height: 1.7; }
.footer-links h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-links a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-dim); }

/* ── Search form in hero page ──────────────────────────────── */
.page-hero .search-form-lg {
  margin-top: 20px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { display: flex; align-items: center; gap: 20px; text-align: left; }
  .profile-avatar { margin-bottom: 0; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px; }
  .item-detail { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .search-input { width: 160px; }
  .hero { padding: 60px 0 48px; }
  .hero-stats { gap: 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .items-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .upload-card { padding: 24px; }
  .auth-card { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .items-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .header-actions .btn-ghost { display: none; }
  .hero h1 { font-size: 2.8rem; }
}

/* ── Utility ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.gap-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-new { background: rgba(0,229,160,0.15); color: var(--accent); }
.badge-hot { background: rgba(255,77,109,0.15); color: var(--red); }

/* ── Mobile nav ────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.25rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  margin-left: auto;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
}
.mobile-nav a:hover { background: var(--bg-card); color: var(--text); }
.mobile-nav.open { display: flex; }

.file-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--btn-on-accent);
  letter-spacing: 0.06em;
}
.file-badge-lg {
  top: 16px;
  left: 16px;
  font-size: 0.8rem;
  padding: 6px 14px;
}
.item-preview { position: relative; }

.ad-placeholder {
  min-height: 90px;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
  padding: 16px;
  background: var(--bg-card);
}


/* ── Nav dropdowns ─────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  /* Extend hover area downward to bridge the gap to the menu */
  padding-bottom: 8px;
  margin-bottom: -8px;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  border: none;
  text-decoration: none;
}
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.is-open .nav-dropdown-trigger {
  color: var(--text);
  background: var(--bg-card);
}
.nav-caret {
  font-size: 0.65em;
  opacity: 0.6;
  transition: transform 0.2s ease;
  display: inline-block;
  margin-left: 2px;
}
.nav-dropdown:hover .nav-caret,
.nav-dropdown.is-open .nav-caret {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% - 0px);
  left: 0;
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  padding: 6px;
  z-index: 9999;
  /* Hidden by default */
  display: none;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.nav-dropdown-menu a:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}
.nav-dropdown-menu .nav-dropdown-all {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  margin-bottom: 4px;
  padding-bottom: 10px;
}
.nav-dropdown-menu .nav-dropdown-all:hover {
  color: var(--accent-dim);
}

/* ── Mobile nav groups ─────────────────────────────────────── */
.mobile-nav-group {
  width: 100%;
}
.mobile-nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition), background var(--transition);
}
.mobile-nav-group summary::-webkit-details-marker { display: none; }
.mobile-nav-group summary:hover {
  color: var(--text);
  background: var(--bg-card);
}
.mobile-nav-group[open] summary { color: var(--text); }
.mobile-nav-group[open] .nav-caret { transform: rotate(180deg); }
.mobile-nav-sub {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mobile-nav-sub a {
  padding: 10px 32px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.mobile-nav-sub a:hover {
  color: var(--text);
  background: var(--bg-card);
}

/* ── Theme switcher ────────────────────────────────────────── */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.theme-btn:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}
.theme-btn.active {
  background: var(--accent);
  color: var(--btn-on-accent);
}
.theme-switcher-mobile {
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 10px;
  width: 100%;
}
.theme-switcher-mobile .theme-label {
  width: 100%;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.theme-switcher-mobile .theme-btn {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; }
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .header-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .header-actions > .theme-switcher:not(.theme-switcher-mobile) { display: none; }
  .search-input { width: 140px; }
}

/* ── Sidebar Ad Layout ─────────────────────────────────────── */
.page-with-sidebar {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.page-main-content {
  flex: 1;
  min-width: 0;
}
.sidebar-col {
  width: 180px;
  flex-shrink: 0;
  padding-left: 20px;
}
.sidebar-col-left {
  width: 180px;
  flex-shrink: 0;
  padding-right: 20px;
  order: -1;
}
.sidebar-ad {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.sidebar-ad.ad-placeholder {
  width: 160px;
  height: 600px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 12px;
}

/* Hide sidebar on smaller screens */
@media (max-width: 1200px) {
  .sidebar-col,
  .sidebar-col-left {
    display: none;
  }
  .page-with-sidebar {
    display: block;
    padding: 0 20px;
  }
}
