/* ═══════════════════════════════════════════════════════════════════
   3DSEARCH.NET – theme.css v1 – "SLICER STUDIO"
   ───────────────────────────────────────────────────────────────────
   Muss als LETZTES CSS geladen werden (nach style-index.css und allen
   seitenspezifischen Styles). Überschreibt das Token-System global.

   Zum Deaktivieren: <link> in header.php auskommentieren -> altes
   Design ist unverändert zurück. Es wird keine andere Datei verändert.

   Signatur: Layer-Lines (Schichtlinien) + Filament-Farbpunkte.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── TOKENS: BASIS ────────────────────────────────────────────────
   Höhere Spezifität (html[...] = 0,1,1) als die alten Definitionen
   in style-category.css / style-model.css / style-designer.css,
   damit die Reihenfolge der CSS-Dateien egal ist.
   ───────────────────────────────────────────────────────────────── */
:root {
  --accent:        #ff7a1a;
  --accent-h:      #ff5c00;
  --accent-sub:    rgba(255,122,26,0.12);
  --accent-grad:   linear-gradient(90deg, #ff5c00 0%, #ff9a3d 60%, #ffc46b 100%);

  --radius-xs:     5px;
  --radius-sm:     8px;
  --radius:        11px;
  --radius-lg:     16px;
  --r:             11px;
  --r-lg:          16px;

  --trans:         0.18s cubic-bezier(.4,0,.2,1);
  --sidebar-w:     236px;
  --header-h:      60px;

  --font:          'Inter', 'Figtree', system-ui, -apple-system, sans-serif;
  --font-display:  'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono:          'IBM Plex Mono', 'Space Mono', ui-monospace, monospace;

  /* Filament-Farben je Plattform (Quellen-Identität) */
  --c-thingiverse:  #3b9cff;
  --c-printables:   #fa6831;
  --c-cults3d:      #9450f1;
  --c-makerworld:   #00c853;
  --c-myminifactory:#ffd31d;
  --c-makeronline:  #4da3ff;
  --c-grabcad:      #ff4d5e;
  --c-crealitycloud:#37d6a0;
  --c-sketchfab:    #1caad9;
}

/* ─── TOKENS: DARK (default) ─────────────────────────────────────── */
:root,
html[data-theme="dark"] {
  /* Sagt dem Browser, dass native Bedienelemente dunkel gerendert
     werden sollen: aufgeklappte <select>-Listen, Systemscrollbalken,
     Datumsfelder, Autofill. Ohne das zeichnet das Betriebssystem sie
     hell - grauer Kasten mit kaum lesbarer Schrift im Dunkelmodus. */
  color-scheme: dark;

  --bg:            #10141b;
  --bg-deep:       #0b0e14;
  --bg-nav:        #131923;
  --bg-card:       #171d27;
  --bg-card-h:     #1c2432;
  --bg-input:      #1f2733;
  --bg-sidebar:    #131923;
  --bg-elevated:   #1f2733;
  --bg-2:          #171d27;
  --bg-3:          #1f2733;
  --bg-tag:        #1f2733;
  --bg-tag-h:      #28313f;
  --bg-hover:      rgba(255,255,255,0.045);
  --bg-overlay:    rgba(6,9,14,0.66);

  --text:          #eaeff6;
  --text-dim:      #8c99ab;
  --text-muted:    #5c687a;

  --border:        #28313f;
  --border-soft:   #1e2632;
  --border-h:      #3a465a;

  --nav-shadow:    0 1px 0 #1e2632;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:     0 8px 26px rgba(0,0,0,0.42);
  --shadow:        0 10px 34px rgba(0,0,0,0.45);
  --card-shadow:   0 1px 3px rgba(0,0,0,0.3);
  --card-shadow-h: 0 10px 30px rgba(0,0,0,0.45);

  /* Schichtlinien-Overlay (hell auf dunkel) */
  --layer-line:    rgba(255,255,255,0.022);
}

/* ─── TOKENS: LIGHT (opt-in) ─────────────────────────────────────── */
html[data-theme="light"] {
  color-scheme: light;

  --bg:            #f5f6f8;
  --bg-deep:       #eceef2;
  --bg-nav:        #ffffff;
  --bg-card:       #ffffff;
  --bg-card-h:     #fbfcfd;
  --bg-input:      #ffffff;
  --bg-sidebar:    #ffffff;
  --bg-elevated:   #f0f2f6;
  --bg-2:          #ffffff;
  --bg-3:          #f0f2f6;
  --bg-tag:        #f0f2f6;
  --bg-tag-h:      #e6e9ef;
  --bg-hover:      rgba(20,30,60,0.035);
  --bg-overlay:    rgba(20,25,34,0.4);

  --text:          #141922;
  --text-dim:      #5d6a7c;
  --text-muted:    #93a0b2;

  --border:        #e2e6ec;
  --border-soft:   #ebeef3;
  --border-h:      #ccd3dd;

  --accent-sub:    rgba(255,92,0,0.10);

  --nav-shadow:    0 1px 0 #e2e6ec;
  --shadow-sm:     0 1px 3px rgba(20,30,50,0.07);
  --shadow-md:     0 8px 26px rgba(20,30,50,0.10);
  --shadow:        0 10px 34px rgba(20,30,50,0.12);
  --card-shadow:   0 1px 3px rgba(20,30,50,0.06);
  --card-shadow-h: 0 10px 28px rgba(20,30,50,0.12);

  --layer-line:    rgba(20,30,60,0.035);
}

/* ─── BASIS ──────────────────────────────────────────────────────── */
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  letter-spacing: -0.005em;
}

/* Display-Schrift für Überschriften */
h1, h2, h3, .logo, .card-title, .cat-title, .model-title, .page-title {
  font-family: var(--font-display);
  letter-spacing: -0.018em;
}

/* Auswahlfelder: geschlossener Zustand wird von uns gezeichnet,
   die aufgeklappte Liste vom System (siehe color-scheme oben).
   option-Farben helfen zusätzlich unter Windows/Linux. */
select {
  background-color: var(--bg-input);
  color: var(--text);
  border-color: var(--border);
}
select option {
  background-color: var(--bg-card);
  color: var(--text);
}
select option:checked {
  background-color: var(--accent);
  color: #fff;
}

/* Fokus immer sichtbar (Tastaturbedienung) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  border: 2.5px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-h); }
::selection { background: var(--accent); color: #fff; }

/* ─── HEADER ─────────────────────────────────────────────────────── */
.header {
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-nav) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: none;
}
.header-inner { min-height: var(--header-h); gap: 11px; }

/* Logo mit Extruder-Würfel */
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  gap: 8px;
}
.logo::before {
  content: "";
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--accent-grad);
  box-shadow: 0 3px 10px rgba(255,92,0,0.35);
  flex-shrink: 0;
  /* Würfel-Silhouette ausgestanzt */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5M12 22V12'/%3E%3C/svg%3E") center / 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5M12 22V12'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.logo span { color: var(--accent); }

.sidebar-toggle { border-radius: var(--radius-sm); }
.sidebar-toggle:hover { background: var(--bg-tag); }

/* ─── HEADER-SUCHE ───────────────────────────────────────────────── */
.header-search { max-width: 580px; }
.header-search input {
  height: 40px;
  background: var(--bg-tag);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.header-search input:hover {
  background: var(--bg-tag-h);
  border-color: var(--border);
}
.header-search input:focus {
  background: var(--bg-input);
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-sub);
}
.header-search .search-submit:hover { color: var(--accent); }

/* ─── HEADER-BUTTONS ─────────────────────────────────────────────── */
.header-btn {
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 500;
}
.header-btn:hover { background: var(--bg-tag); color: var(--text); }

.theme-btn {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-dim);
}
.theme-btn:hover { background: var(--bg-tag); border-color: var(--border-h); color: var(--text); }

.lang-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
}
.lang-select:hover { border-color: var(--border-h); color: var(--text); }

.login-btn {
  background: var(--accent-grad);
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255,92,0,0.3);
  transition: transform var(--trans), box-shadow var(--trans);
}
.login-btn:hover {
  background: var(--accent-grad);
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(255,92,0,0.42);
}

/* ─── DROPDOWNS ──────────────────────────────────────────────────── */
.user-dropdown,
.community-dropdown,
.autocomplete-dropdown,
.search-tips-pop {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.dropdown-item, .community-dropdown a {
  border-radius: var(--radius-sm);
  transition: background var(--trans), color var(--trans);
}
.dropdown-item:hover, .community-dropdown a:hover {
  background: var(--bg-tag);
  color: var(--text);
}
.dropdown-name { font-family: var(--font-display); font-weight: 600; }
.dropdown-email { font-family: var(--mono); font-size: 10.5px; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--bg-tag); }
.avatar { border: 1.5px solid var(--border); }

/* ─── MAIN / KOPFZEILE ───────────────────────────────────────────── */
.main h1 {
  font-family: var(--font-display) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.results-info { font-family: var(--mono); font-size: 0.78rem; }
.results-info strong { color: var(--text); font-weight: 600; }

.trending-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
}
.trending-pill {
  height: 28px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: 0.79rem;
  font-weight: 500;
}
.trending-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-sub);
}
.filter-chip {
  height: 29px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 99px;
  font-weight: 600;
}

/* ─── MODEL-CARDS ────────────────────────────────────────────────── */
.model-grid { gap: 18px; }

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: none;
  transition: transform 0.2s cubic-bezier(.4,0,.2,1),
              box-shadow 0.2s cubic-bezier(.4,0,.2,1),
              border-color 0.2s ease;
}
.model-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-h);
}

/* SIGNATUR: Beim Hover "druckt" sich eine Extrusionslinie über die Karte */
.model-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  z-index: 3;
  background: var(--accent-grad);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(.6,0,.2,1);
  pointer-events: none;
}
.model-card:hover::after { transform: scaleX(1); }
.ad-card::after { display: none; }

/* Thumbnail: Schichtlinien-Textur über dem Platzhalter */
.card-img { background: var(--bg-elevated); }
.card-img::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 6px,
    var(--layer-line) 6px 7px
  );
}
.card-img img { position: relative; z-index: 2; }
.model-card:hover .card-img img { transform: scale(1.05); }

/* Quellen-Badge: dezenter Glas-Look + Filament-Punkt statt Vollfläche */
.card-source {
  height: 23px;
  padding: 0 10px 0 8px;
  gap: 6px;
  border-radius: 99px;
  font-family: var(--font);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  z-index: 4;
  background: rgba(10,14,20,0.6) !important;
  color: #fff !important;
  border: none !important;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.card-source::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--src-c, var(--accent));
  flex-shrink: 0;
}
.card-source.printables     { --src-c: var(--c-printables); }
.card-source.thingiverse    { --src-c: var(--c-thingiverse); }
.card-source.cults3d        { --src-c: var(--c-cults3d); }
.card-source.makerworld     { --src-c: var(--c-makerworld); }
.card-source.myminifactory  { --src-c: var(--c-myminifactory); }
.card-source.makeronline    { --src-c: var(--c-makeronline); }
.card-source.grabcad        { --src-c: var(--c-grabcad); }
.card-source.crealitycloud  { --src-c: var(--c-crealitycloud); }
.card-source.sketchfab      { --src-c: var(--c-sketchfab); }

.card-body { padding: 13px 14px 12px; }
.card-title {
  font-family: var(--font-display);
  font-size: 0.895rem;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.012em;
}
.card-designer { font-size: 0.765rem; }
.designer-link:hover { color: var(--accent); }
.card-likes { font-family: var(--mono); font-weight: 500; }

.card-tag {
  height: 23px;
  border-radius: var(--radius-xs);
  background: var(--bg-tag);
  border: 1px solid var(--border-soft);
  font-size: 0.685rem;
}
.card-tag:hover {
  background: var(--accent-sub);
  border-color: var(--accent);
  color: var(--accent);
}

.wish-btn, .col-btn {
  border-radius: var(--radius-sm);
  background: rgba(10,14,20,0.55);
  border: none;
  color: #fff;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  z-index: 4;
}
html[data-theme="light"] .wish-btn,
html[data-theme="light"] .col-btn {
  background: rgba(255,255,255,0.86);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.wish-btn:hover { color: #ff4d5e; border-color: transparent; }
.wish-btn.active { color: #ff4d5e; border-color: transparent; }
.col-btn:hover { color: var(--accent); border-color: transparent; }

/* ─── PAGINATION ─────────────────────────────────────────────────── */
.page-btn {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text-dim);
}
.page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-sub);
}
.page-btn.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
}

/* ─── KATEGORIE-SEITE ────────────────────────────────────────────── */
.cat-hero {
  background: radial-gradient(760px 300px at 22% -90px, var(--accent-sub), transparent 64%), var(--bg-deep);
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}
.cat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, var(--layer-line) 5px 6px);
  -webkit-mask-image: radial-gradient(90% 100% at 30% 0%, #000 15%, transparent 88%);
  mask-image: radial-gradient(90% 100% at 30% 0%, #000 15%, transparent 88%);
}
.cat-hero-inner { position: relative; }
.cat-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.cat-stat-badge {
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: var(--bg-card);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.cat-stat-badge strong { color: var(--text); }
.sidebar-block {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}
.sidebar-block h3 {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.11em;
}
.sort-link { border-radius: var(--radius-sm); }
.sort-link:hover { background: var(--bg-tag); }
.sort-link.active {
  background: var(--accent-sub);
  color: var(--accent);
  font-weight: 600;
}
.designer-list .dim { font-family: var(--mono); }
.rel-cat-tag {
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: transparent;
}
.rel-cat-tag:hover {
  background: var(--accent-sub);
  border-color: var(--accent);
  color: var(--accent);
}
.seo-text {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}
.seo-text h2 { font-family: var(--font-display); }

/* ─── DESIGNER-SEITE ─────────────────────────────────────────────── */
.cat-pill, .sort-pill {
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: transparent;
}
.cat-pill:hover, .sort-pill:hover { border-color: var(--accent); color: var(--accent); }
.sort-pill.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
}
.card-stats { font-family: var(--mono); }

/* ─── COOKIE-BANNER / SUCHTIPPS ──────────────────────────────────── */
.cookie-banner {
  background: color-mix(in srgb, var(--bg-card) 94%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.cookie-accept {
  background: var(--accent-grad) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}
.cookie-decline { border-radius: var(--radius-sm) !important; }
.search-tips-pop .stp-title { font-family: var(--font-display); }
.search-tips-pop .stp-row code {
  font-family: var(--mono);
  border-radius: var(--radius-xs);
  background: var(--bg-tag);
  border-color: var(--border);
}

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.footer, .footer-wrap {
  border-top: 1px solid var(--border-soft);
}
.footer a:hover { color: var(--accent); }

/* ─── ALLGEMEINE BUTTONS ─────────────────────────────────────────── */
.submit-btn, .auth-submit, .back-home-btn, .btn-primary, .is-btn-primary {
  background: var(--accent-grad) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  transition: transform var(--trans), box-shadow var(--trans);
}
.submit-btn:hover, .auth-submit:hover, .back-home-btn:hover, .is-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(255,92,0,0.4);
}

/* ═══════════════════════════════════════════════════════════════════
   HERO + SIDEBAR
   Die Filter leben in der Sidebar. Leitbild: ein Filament-Rack -
   jede Quelle eine Rolle im Regal, aktive zeigen Farbe.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── HERO ───────────────────────────────────────────────────────
   Sitzt IM Inhaltsbereich, nicht über der ganzen Breite - sonst
   drückt er die Sidebar nach unten und die Filter sind erst nach
   dem Scrollen da. So beginnt die Sidebar oben wie in der Suche.
   ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  /* KEIN overflow:hidden - das schnitt Suchtipps und Autovorschlag ab.
     Die Schichtlinien werden stattdessen selbst gerundet (::before). */
  margin-bottom: 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(760px 340px at 50% -120px, rgba(255,110,30,0.16), transparent 68%),
    var(--bg-deep);
}
/* SIGNATUR: Schichtlinien wie bei einem 3D-Druck */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, var(--layer-line) 5px 6px);
  -webkit-mask-image: radial-gradient(78% 100% at 50% 0%, #000 18%, transparent 90%);
  mask-image: radial-gradient(78% 100% at 50% 0%, #000 18%, transparent 90%);
}
.hero-in {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 24px 28px;
  text-align: center;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.9vw, 2rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.035em;
  margin: 0;
}
.hero-sub {
  max-width: 620px;
  margin: 9px auto 0;
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.hero-search {
  position: relative;
  z-index: 20;          /* Popover + Autovorschlag über die Karten legen */
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 20px auto 0;
  padding: 6px 6px 6px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-sub), var(--shadow);
}

/* Suchtipps im Hero-Suchfeld - gleiche Hilfe wie im Header */
.hero-tips-btn {
  flex: none;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-muted);
  transition: color var(--trans), background var(--trans);
}
.hero-tips-btn svg { width: 17px; height: 17px; }
.hero-tips-btn:hover { color: var(--accent); background: var(--accent-sub); }
.hero-tips-pop {
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  text-align: left;
}

/* Autovorschlag - wie im Header, nur an das größere Feld angepasst */
.hero-ac {
  top: calc(100% + 8px);
  border-radius: var(--radius);
  border-color: var(--border);
  text-align: left;
  overflow: hidden;
}
.hero-ac .autocomplete-item {
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
  cursor: pointer;
}
.hero-ac .autocomplete-item strong { color: var(--text); font-weight: 600; }
.hero-ac .autocomplete-item:hover,
.hero-ac .autocomplete-item.active { background: var(--bg-tag); color: var(--text); }
.hero-search > svg { width: 19px; height: 19px; flex: none; color: var(--text-muted); }
.hero-search input {
  flex: 1;
  min-width: 0;
  height: 38px;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
}
.hero-search input::placeholder { color: var(--text-muted); }
.hero-go {
  flex: none;
  padding: 11px 24px;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 5px 16px rgba(255,92,0,0.34);
  transition: transform var(--trans), box-shadow var(--trans);
}
.hero-go:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(255,92,0,0.45); }

/* SIGNATUR: Extrusionslinie - fährt wie ein Druckkopf durchs Bild */
.hero-extrude {
  position: relative;
  max-width: 660px;
  height: 2px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 2px;
}
.hero-extrude::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-grad);
  transform: translateX(-100%);
  animation: hero-extrude 3.4s ease-in-out infinite;
}
@keyframes hero-extrude {
  0%   { transform: translateX(-100%); }
  55%  { transform: translateX(0); }
  100% { transform: translateX(102%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-extrude::after { animation: none; transform: translateX(0); opacity: 0.5; }
}
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 18px;
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.hero-stats b { color: var(--text); font-weight: 600; }
.hero-stats .hs-dot { color: var(--accent); }
.hero-trending {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.hero-trending .trending-pill.hot {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-sub);
}

/* ─── HEADER-SUCHE vs. HERO-SUCHE ────────────────────────────────
   Zwei Suchfelder gleichzeitig sind Unsinn. Solange der Hero im Bild
   ist, tritt die Header-Suche zurück; sobald man vorbeigescrollt ist,
   fährt sie ein. Greift nur mit JS (body.js-hero) - ohne JS bleibt
   sie sichtbar und bedienbar.
   ───────────────────────────────────────────────────────────────── */
body.js-hero .header-search {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
body.js-hero.hero-gone .header-search {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ─── LAYOUT ─────────────────────────────────────────────────────── */
.layout {
  display: flex;
  gap: 26px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
}
/* NUR die Startseite: dort sitzt .main neben der Sidebar in .layout.
   Ungebunden geschrieben wuerde diese Regel das seitliche Padding
   ueberschreiben, das blog/designer/model in ihren eigenen
   Stylesheets fuer .main setzen - auf dem Handy klebte der Inhalt
   dann am Displayrand. */
.layout > .main { flex: 1; min-width: 0; padding: 18px 0 40px; }

/* ─── SIDEBAR ────────────────────────────────────────────────────── */
.sidebar {
  width: 244px;
  flex-shrink: 0;
  padding: 16px 0 24px;
  align-self: flex-start;
  position: sticky;
  top: var(--header-h);
  /* height:auto statt fixer Viewport-Höhe: bei hohen Fenstern ist die
     Leiste dann nur so lang wie ihr Inhalt und es entsteht gar kein
     Scrollbalken. max-height greift erst, wenn es wirklich eng wird. */
  height: auto;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  border-right: none;
  /* Balken bleibt unsichtbar, bis die Maus in der Leiste ist */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.25s ease;
}
.sidebar:hover { scrollbar-color: var(--border-h) transparent; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background 0.25s ease;
}
.sidebar:hover::-webkit-scrollbar-thumb { background: var(--border-h); background-clip: content-box; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: content-box; }

/* Jede Sektion eine eigene Karte statt einer Linienwüste */
.sb-section {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  padding: 0 0 4px;
  overflow: hidden;
  transition: border-color var(--trans);
}
.sb-section:last-child { margin-bottom: 0; padding-bottom: 5px; }
.sb-section:hover { border-color: var(--border); }
.sb-section.collapsed { padding-bottom: 0; }

.sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px 8px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.655rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  user-select: none;
  transition: color var(--trans);
}
.sb-header:hover { color: var(--text-dim); }
.sb-header-left { gap: 8px; }
.sb-header-left svg { width: 14px; height: 14px; color: var(--accent); opacity: 0.85; }
.sb-chevron { width: 13px; height: 13px; opacity: 0.6; }
.sb-body { padding: 0 6px 4px; }

/* ── Quellen: das Filament-Rack ──────────────────────────────────
   Aktive Quelle bekommt links einen Balken in Filamentfarbe -
   wie eine Rolle, die im Regal Farbe zeigt.
   ───────────────────────────────────────────────────────────────── */
.sb-item {
  position: relative;
  gap: 9px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.845rem;
  font-weight: 500;
}
/* Kein Farbbalken links: Punkt und Checkbox melden den Zustand
   bereits - ein dritter Farbträger davor liest sich wie ein
   angeschnittenes Kontrollkästchen. */
.sb-src-toggle.active {
  background: color-mix(in srgb, var(--src-color, var(--accent)) 9%, transparent);
  color: var(--text);
  font-weight: 600;
}
.sb-src-toggle:hover {
  background: color-mix(in srgb, var(--src-color, var(--accent)) 13%, transparent);
  color: var(--text);
}
.sb-src-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity var(--trans), box-shadow var(--trans);
}
.sb-src-toggle.active .sb-src-dot {
  opacity: 1;
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--src-color, var(--accent)) 24%, transparent);
}
.sb-src-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Checkbox ganz nach rechts.
   Sie ist im Markup das ERSTE Kind - mit margin-left:auto allein
   entsteht nur Leerraum davor und Punkt + Label rutschen mit nach
   rechts. order:3 schiebt sie ans Ende, dann greift auto sauber.
   Farbe: Akzent, nicht Plattformfarbe - den Ton führen Balken und
   Punkt links, die Checkbox meldet nur den Zustand. */
.sb-check {
  order: 3;
  margin-left: auto;
  width: 15px; height: 15px;
  flex-shrink: 0;
  border: 1.5px solid var(--border-h);
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #fff;
  transition: background var(--trans), border-color var(--trans);
}
.sb-check.checked {
  background: var(--accent);
  border-color: var(--accent);
}
.sb-check svg { width: 10px; height: 10px; }
.sb-src-label { order: 2; flex: 1; }
.sb-src-dot { order: 1; }

/* Alle / Anwenden */
.sb-src-actions { border-top: 1px solid var(--border-soft) !important; }
.sb-src-actions button {
  border-radius: var(--radius-sm) !important;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.sb-src-actions button:last-child {
  background: var(--accent-grad) !important;
  box-shadow: 0 3px 10px rgba(255,92,0,0.3);
}
.sb-src-actions button:last-child:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,92,0,0.42); }
.sb-src-actions button:first-child:hover { border-color: var(--border-h) !important; color: var(--text) !important; }

/* Contests: sticht dezent heraus */
.sb-contests-link {
  margin-top: 4px;
  border: 1px dashed var(--border);
  color: var(--text-dim);
}
.sb-contests-link .sb-icon svg { width: 15px; height: 15px; }
.sb-contests-link:hover {
  border-color: var(--c-myminifactory);
  color: var(--c-myminifactory);
  background: color-mix(in srgb, var(--c-myminifactory) 10%, transparent);
}

/* ── Sortierung / Preis ──────────────────────────────────────────── */
.sb-sort-item {
  position: relative;
  padding: 6px 10px 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.845rem;
  font-weight: 500;
}
.sb-sort-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 0;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  transform: translateY(-50%);
  transition: height 0.22s cubic-bezier(.4,0,.2,1);
}
.sb-sort-item.active::before { height: 60%; }
.sb-sort-item.active { background: var(--accent-sub); color: var(--accent); font-weight: 600; }
.sb-sort-item:hover { background: var(--bg-tag); color: var(--text); }

/* ── "Alle Kategorien durchsuchen" (Sektion, die ein Link ist) ──── */
a.sb-section {
  padding: 12px 13px !important;
  font-size: 0.845rem !important;
  color: var(--text-dim) !important;
  border-bottom: 1px solid var(--border-soft) !important;
  transition: border-color var(--trans), color var(--trans), background var(--trans);
}
a.sb-section:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-sub);
}

/* ── Kategorien & Trending ───────────────────────────────────────── */
.cat-search-input {
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-tag);
}
.cat-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-sub); }

.sb-cat-item {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.sb-cat-item:hover { background: var(--bg-tag); color: var(--text); }
.sb-cat-item.active { background: var(--accent-sub); color: var(--accent); font-weight: 600; }

.sb-trending-item {
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.sb-trending-item:hover { background: var(--bg-tag); }
.sb-trending-rank {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--bg-tag);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 600;
}
/* Top 3 tragen Akzentfarbe */
.sb-trending-item:nth-child(-n+3) .sb-trending-rank {
  background: var(--accent-sub);
  color: var(--accent);
}
.sb-trending-query { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-trending-count {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ─── SIDEBAR MOBIL: Off-Canvas ──────────────────────────────────── */
@media (max-width: 900px) {
  .layout { gap: 0; }
  .sidebar {
    position: fixed;
    left: -300px;
    top: 0; bottom: 0;
    z-index: 160;
    width: 284px;
    height: 100vh;
    padding: 16px 12px;
    background: var(--bg-nav);
    box-shadow: var(--shadow);
    transition: left 0.28s cubic-bezier(.4,0,.2,1);
  }
  .sidebar.open { left: 0; }
  .layout > .main { padding-left: 0; }
  .hero-in { padding: 44px 18px 38px; }
}
.sidebar-overlay {
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* Mobile Filterleiste (Quellen/Sortierung als Dropdown) */
@media (max-width: 640px) {
  .mobile-filter-bar {
    top: var(--header-h) !important;
    background: color-mix(in srgb, var(--bg-nav) 92%, transparent) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft) !important;
  }
  .mf-trigger {
    border-radius: var(--radius) !important;
    border: 1.5px solid var(--border) !important;
    box-shadow: none !important;
  }
  .mf-trigger:hover { border-color: var(--border-h) !important; }
}

/* ─── MOBILE ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .layout { padding: 0 14px; }

  /* Der Login-Button steht auf der Startseite mobil ausgeschrieben da und
     frisst die Breite der Suche. style-category/designer/slicer kürzen ihn
     längst auf ein Icon - style-index.css fehlt der Fix. Hier global. */
  .login-text { display: none; }
  .login-btn {
    width: 36px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  .lang-select { max-width: 50px; padding: 0 2px; font-size: 0.68rem; }

  /* ── HEADER EINZEILIG (alle Seiten) ────────────────────────────
     Vorher brach der Header um und die Suche landete in Zeile 2 -
     ragte damit aus dem 60px hohen Header heraus und legte sich über
     die Filterleiste und das Benutzermenü. Jetzt bleibt alles in einer
     Zeile: Höhe konstant, nichts hängt über.
     Logo zeigt nur den Würfel, Slicer/Community/Discord sind über das
     Menü unten erreichbar. */
  .header,
  .header-inner {
    height: var(--header-h);
    min-height: var(--header-h);
    flex-wrap: nowrap;
    gap: 6px;
  }
  .header-inner { padding: 0 12px; }

  .header-search {
    order: 0;
    flex: 1 1 0;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0 4px;
  }
  .header-search input {
    height: 36px;
    font-size: 16px;
    border-radius: 9px;
  }

  .logo { font-size: 0; gap: 0; flex: none; }
  .logo::before { width: 26px; height: 26px; }

  .header-actions { gap: 4px; flex: none; }
  .header-actions > a[href="/slicer.php"],
  .header-actions > .community-wrapper,
  .header-actions > a[href*="discord"] { display: none; }

  /* Solange der Hero läuft, macht dessen Suchfeld die Arbeit */
  body.js-hero:not(.hero-gone) .header-search {
    position: absolute;
    width: 0; height: 0;
    margin: 0; padding: 0;
    overflow: hidden;
  }

  /* Benutzermenü sicher über das Suchfeld legen */
  .user-dropdown, .community-dropdown { z-index: 400; }

  /* Filterleiste sitzt jetzt bündig unter dem 60px-Header */
  .mobile-filter-bar { top: var(--header-h) !important; }

  .hero-search { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .hero-search > svg { display: none; }
  .hero-search input { flex: 1 1 100%; height: 40px; font-size: 16px; }
  .hero-go { flex: 1 1 100%; }
  .hero-extrude { display: none; }
}
/* ═══════════════════════════════════════════════════════════════════
   MODELLSEITE (model.php)
   Bild links, Info-Panel rechts. Dieselbe Sprache wie das Grid:
   Mono für Zahlen, Filament-Punkt an der Quelle, Extrusionslinie.
   ═══════════════════════════════════════════════════════════════════ */

.model-hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
  gap: 30px;
}

/* ─── Bild ───────────────────────────────────────────────────────── */
.img-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}
/* Schichtlinien wie auf den Karten */
.img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, var(--layer-line) 7px 8px);
}
.img-wrap > img#mainImg { position: relative; z-index: 0; }

/* Quellen-Badge: Glas + Filament-Punkt, wie im Grid */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  z-index: 2;
  padding: 0 11px 0 9px;
  height: 25px;
  border-radius: 99px;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  background: rgba(10,14,20,0.62) !important;
  color: #fff !important;
  border: none !important;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.source-badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--src-c, var(--accent));
  flex-shrink: 0;
}
.source-badge.printables     { --src-c: var(--c-printables); }
.source-badge.thingiverse    { --src-c: var(--c-thingiverse); }
.source-badge.cults3d        { --src-c: var(--c-cults3d); }
.source-badge.makerworld     { --src-c: var(--c-makerworld); }
.source-badge.myminifactory  { --src-c: var(--c-myminifactory); }
.source-badge.makeronline    { --src-c: var(--c-makeronline); }
.source-badge.grabcad        { --src-c: var(--c-grabcad); }
.source-badge.crealitycloud  { --src-c: var(--c-crealitycloud); }
.source-badge.sketchfab      { --src-c: var(--c-sketchfab); }

.img-thumbs { gap: 10px; }

/* ─── Info-Panel ─────────────────────────────────────────────────── */
.info-box {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.cat-pill {
  height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
}
.model-title {
  font-family: var(--font-display) !important;
  font-size: clamp(1.25rem, 2.3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.24;
}
.model-designer { font-size: 0.875rem; }
.model-designer a { font-weight: 600; }

/* Stats: Zahlen in Mono, feine Trennlinien */
.stat-block {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--border-soft);
}
.stat-item {
  padding: 14px 10px;
  background: var(--bg-elevated);
}
.stat-item::before {
  width: 26px;
  height: 2.5px;
  background: var(--accent-grad);
  opacity: 0.5;
  transition: opacity var(--trans);
}
.stat-item:hover::before { opacity: 1; }
.stat-value {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--faint, var(--text-muted));
}

.cta-btn {
  background: var(--accent-grad);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.97rem;
  padding: 14px 24px;
  box-shadow: 0 6px 18px rgba(255,92,0,0.32);
  transition: transform var(--trans), box-shadow var(--trans);
}
.cta-btn:hover {
  background: var(--accent-grad);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255,92,0,0.44);
}

.share-label { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; }
.share-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-sub); }

.hero-action-btn {
  border-radius: var(--radius-sm);
  background: rgba(10,14,20,0.55);
  border: none;
  color: #fff;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
html[data-theme="light"] .hero-action-btn {
  background: rgba(255,255,255,0.88);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.hero-action-btn:hover { color: var(--accent); }
.wish-btn-detail.active { color: #ff4d5e; }

/* ─── Tabs: Unterstrich statt Kartenreiter ──────────────────────── */
.tab-bar {
  gap: 22px;
  padding: 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
}
.tab {
  flex: none;
  justify-content: flex-start;
  padding: 0 2px 11px;
  margin-bottom: -1px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}
.tab:hover { color: var(--text-dim); background: none; }
.tab.active {
  color: var(--text);
  background: none;
  border-color: var(--accent);
  box-shadow: none;
}
.tab-badge {
  background: var(--bg-tag);
  color: var(--text-muted);
  font-family: var(--mono);
  font-weight: 500;
  border-radius: 5px;
}
.tab.active .tab-badge { background: var(--accent-sub); color: var(--accent); }
.tab-panel {
  background: none;
  border: none;
  border-radius: 0;
  padding: 20px 0 0;
}

/* ─── Tags ───────────────────────────────────────────────────────── */
.model-tags { gap: 7px; }
.tag {
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-soft);
  background: var(--bg-tag);
  color: var(--text-muted);
  font-size: 0.72rem;
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-sub); }

/* ─── Verwandte Modelle: gleiche Karte wie im Grid ──────────────── */
.related-grid { gap: 16px; }
.related-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s, border-color 0.2s;
}
.related-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-h);
}
/* Extrusionslinie wie auf den Modellkarten */
.related-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  z-index: 3;
  background: var(--accent-grad);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(.6,0,.2,1);
  pointer-events: none;
}
.related-card:hover::after { transform: scaleX(1); }
.related-name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.012em;
}
.related-stats, .related-designer { font-size: 0.74rem; }
.related-stats { font-family: var(--mono); }

/* ─── Abschnittstrenner ─────────────────────────────────────────── */
.section-div-line { background: var(--border-soft); }
.section-div-count { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; }

/* ─── Cross-Source-Block ────────────────────────────────────────── */
.cs-eyebrow { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.13em; }
.cs-title { font-family: var(--font-display); letter-spacing: -0.025em; }
.cs-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  transition: border-color var(--trans), transform var(--trans);
}
.cs-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cs-card-num { font-family: var(--mono); font-weight: 600; }
.cs-card-unit, .cs-card-count { font-family: var(--mono); font-size: 0.68rem; }

/* ─── Meta-Zeile (Kategorie / Quelle / Daten) ───────────────────
   auto-fill fuellt die Zeile mit leeren Spalten auf - rechts blieb
   ein toter Kasten stehen. auto-fit laesst die Eintraege die Breite
   unter sich aufteilen. */
.meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

/* ─── Anzeigen ──────────────────────────────────────────────────
   Der Inhalt kommt von Google und ist meist hell - ohne Rahmen
   steht mitten im dunklen Layout ein weisser Block. Wenigstens
   einfassen und abrunden. */
.model-detail-ad, .ad-card, .adsense-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}
.model-detail-ad ins, .model-detail-ad .adsbygoogle { border-radius: var(--radius-lg); overflow: hidden; }

/* ─── FAQ / Druckbarkeit ────────────────────────────────────────── */
.faq-card, .printability-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
}
.faq-item summary, .faq-item { font-family: var(--font); }

/* ─── Bewertung / Kommentare / Makes ────────────────────────────── */
.rating-big { font-family: var(--mono); font-weight: 600; }
.rating-count, .rating-label { font-size: 0.75rem; }
.comment-avatar, .make-avatar { background: var(--accent-grad); font-family: var(--font-display); }
.comment-item, .make-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}
.comment-date, .make-date { font-family: var(--mono); font-size: 0.68rem; }
.comment-author, .make-username { font-family: var(--font-display); font-weight: 600; }
/* "Ich hab das gedruckt" ist ein sekundärer Button (Umriss, grauer
   Text). Der Gradient hat nur den Hintergrund getauscht - grauer Text
   auf Orange war unlesbar. Bleibt Umriss; nur der eigentliche
   Absenden-Button trägt den Akzent. */
.make-upload-btn {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: none;
  color: var(--text-dim);
  font-weight: 600;
}
.make-upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-sub);
}
.make-submit-btn {
  background: var(--accent-grad) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}
.make-cancel-btn { border-radius: var(--radius-sm); }
.make-drop-zone { border-radius: var(--radius-lg); border-color: var(--border); }
.make-drop-zone:hover { border-color: var(--accent); background: var(--accent-sub); }

/* ─── Brotkrumen ────────────────────────────────────────────────── */
.breadcrumb { font-size: 0.78rem; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.45; }

@media (max-width: 900px) {
  .model-hero { grid-template-columns: 1fr; gap: 20px; }
  .info-box { position: static; }
}

/* ═══════════════════════════════════════════════════════════════════
   KATEGORIESEITE (category.php)
   ═══════════════════════════════════════════════════════════════════ */

/* Der Hero läuft hier über die volle Breite und schiebt die Filter
   nach unten - wie auf der Startseite gelöst: flach halten. */
.cat-hero { padding: 24px 1.25rem 20px; }
.cat-subtitle { font-size: 0.9rem; }
.cat-layout { gap: 1.75rem; }

.cat-sidebar { align-self: flex-start; }
.sidebar-block { padding: 0 0 6px; overflow: hidden; }
.sidebar-block h3 { padding: 11px 13px 8px; margin: 0; }
.sidebar-block .sort-links,
.sidebar-block .designer-list,
.sidebar-block .related-cats { padding: 0 7px 4px; }

.designer-list li { padding: 5px 4px; }
.designer-list a { font-size: 0.83rem; }

/* Karten wie im Grid */
.model-card .card-img-wrap { position: relative; }
.card-img-placeholder svg { opacity: 0.3; }
.card-designer:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════
   DESIGNERSEITE (designer.php)
   ═══════════════════════════════════════════════════════════════════ */

.designer-header {
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
}
.designer-avatar {
  width: 72px; height: 72px;
  background: var(--accent-grad);
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(255,92,0,0.28);
}
.designer-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.designer-name {
  font-family: var(--font-display) !important;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.designer-meta { font-size: 0.83rem; }
.designer-sources a { color: var(--text-dim); transition: color var(--trans); }
.designer-sources a:hover { color: var(--accent); }
.designer-sources a.active { color: var(--accent); font-weight: 600; }

/* Zahlen wie überall in Mono */
.designer-stats { gap: 22px; }
.stat-num {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.designer-blocked-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 10px;
  border-radius: 99px;
  background: rgba(255,77,94,0.12);
  border: 1px solid rgba(255,77,94,0.3);
  color: #ff4d5e;
  font-size: 0.68rem;
  font-weight: 600;
}

.designer-intro, .designer-activity {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Aktiver Quellenfilter */
.designer-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--accent-sub);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 0.78rem;
}
.dfp-label { color: var(--accent); font-weight: 600; }
.dfp-clear {
  color: var(--accent);
  opacity: 0.7;
  transition: opacity var(--trans);
}
.dfp-clear:hover { opacity: 1; }

/* ─── Designer-Menü (Blockieren, Supporter) ─────────────────────── */
.dm-toggle {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: border-color var(--trans), color var(--trans), background var(--trans);
}
.dm-toggle:hover { border-color: var(--border-h); color: var(--text); background: var(--bg-tag); }
.dm-pop {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 6px;
}
.dm-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.83rem;
  text-align: left;
  transition: background var(--trans), color var(--trans);
}
.dm-item:hover { background: var(--bg-tag); color: var(--text); }
.dm-item.disabled { opacity: 0.5; cursor: default; }
.dm-item.disabled:hover { background: none; color: var(--text-dim); }
.dm-star { color: var(--accent); flex-shrink: 0; }
.dm-hint {
  padding: 8px 11px 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ─── Kategorien-Pillen ─────────────────────────────────────────── */
.designer-categories { gap: 7px; }
.cat-pill span { font-family: var(--mono); font-size: 0.66rem; }

/* ─── Sortierleiste ─────────────────────────────────────────────── */
.sort-bar { margin-bottom: 16px; }
.sort-options { gap: 6px; }

/* ─── Karten (eigene Struktur: card-name statt card-title) ─────── */
.card-name {
  font-family: var(--font-display);
  font-size: 0.855rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-stats { font-family: var(--mono); font-size: 0.72rem; }

/* ─── Blättern ──────────────────────────────────────────────────── */
.pagination { gap: 5px; margin-top: 20px; }
.page-dots { font-family: var(--mono); color: var(--text-muted); }
.page-info { font-family: var(--mono); font-size: 0.75rem; color: var(--text-muted); }

.not-found { padding: 70px 20px; }
.not-found h1 { font-family: var(--font-display); letter-spacing: -0.03em; }
.no-results {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Kategorieseite: Rest ──────────────────────────────────────── */
.cat-main { min-width: 0; }
.cat-stats { gap: 0.5rem; }
.cat-stat-badge .dot { box-shadow: 0 0 0 2.5px color-mix(in srgb, currentColor 20%, transparent); }

/* "Über diese Kategorie" + FAQ werden inline in category.php
   gestylt und erben die Tokens - hier nur der Feinschliff. */
.cat-intro, .cat-faq {
  border-radius: var(--radius-lg) !important;
  border-color: var(--border-soft) !important;
}
.cat-intro summary, .cat-faq summary {
  font-family: var(--font-display);
  transition: background var(--trans), color var(--trans);
}
.cat-intro summary:hover, .cat-faq summary:hover { color: var(--accent); }
.cat-intro-body { font-size: 0.86rem; line-height: 1.65; color: var(--text-dim); }

@media (max-width: 768px) {
  .designer-header { gap: 14px; }
  .designer-avatar { width: 58px; height: 58px; }
  .designer-name { font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   BLOG (blog.php, post.php)
   Leitgedanke: Der Blog spricht dieselbe Sprache wie das Grid.
   Kategorie als Mono-Eyebrow mit Strich, alle Metadaten in Mono,
   Schichtlinien auf den Bildern, Extrusionslinie beim Hover.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Hero ──────────────────────────────────────────────────────── */
.blog-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 22px;
  padding: 40px 24px 34px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 300px at 50% -110px, rgba(255,110,30,0.15), transparent 68%),
    var(--bg-deep);
}
.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, var(--layer-line) 5px 6px);
  -webkit-mask-image: radial-gradient(76% 100% at 50% 0%, #000 16%, transparent 92%);
  mask-image: radial-gradient(76% 100% at 50% 0%, #000 16%, transparent 92%);
}
.blog-hero h1 {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.blog-hero h1 span {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.blog-hero p {
  position: relative;
  margin: 10px auto 0;
  max-width: 520px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ─── Filterchips ───────────────────────────────────────────────── */
.blog-cats { gap: 7px; margin-bottom: 22px; }
.blog-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.79rem;
  font-weight: 500;
  transition: color var(--trans), border-color var(--trans), background var(--trans);
}
.blog-cat:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-sub); }
.blog-cat.active {
  border-color: transparent;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255,92,0,0.3);
}
.cat-count {
  font-family: var(--mono);
  font-size: 0.66rem;
  opacity: 0.75;
}
.blog-cat.active .cat-count { opacity: 0.9; }

/* ─── Layout ────────────────────────────────────────────────────── */
.post-layout { gap: 26px; }
.post-sidebar { top: calc(var(--header-h) + 16px); }

/* ─── SIGNATUR: Kategorie als Mono-Eyebrow mit Strich ───────────── */
.post-cat {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  gap: 8px;
}
.post-cat::before {
  content: "";
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
  flex-shrink: 0;
}

/* ─── Metadaten durchgehend in Mono ─────────────────────────────── */
.post-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  gap: 7px;
}
.post-author { color: var(--text-dim); font-weight: 500; }
.meta-dot { opacity: 0.4; }

/* ─── Beitrag im Fokus ──────────────────────────────────────────── */
.featured-post {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s, border-color 0.2s;
}
.featured-post:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-h);
}
.featured-post::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  z-index: 3;
  background: var(--accent-grad);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(.6,0,.2,1);
  pointer-events: none;
}
.featured-post:hover::after { transform: scaleX(1); }

.featured-img { position: relative; }
.featured-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, var(--layer-line) 7px 8px);
}
.featured-img img { transition: transform 0.5s cubic-bezier(.4,0,.2,1); }
.featured-post:hover .featured-img img { transform: scale(1.04); }

.featured-body { padding: 28px; gap: 12px; }
.featured-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.24;
  color: var(--text);
}
.featured-excerpt {
  font-size: 0.87rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ─── Beitragskarten ────────────────────────────────────────────── */
.post-grid { gap: 18px; }
.post-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s, border-color 0.2s;
}
.post-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-h);
}
.post-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  z-index: 3;
  background: var(--accent-grad);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(.6,0,.2,1);
  pointer-events: none;
}
.post-card:hover::after { transform: scaleX(1); }

.post-card-img { position: relative; background: var(--bg-elevated); }
.post-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, var(--layer-line) 7px 8px);
}
.post-card-img img { transition: transform 0.45s cubic-bezier(.4,0,.2,1); }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-placeholder { color: var(--text-muted); }
.post-card-placeholder svg { opacity: 0.3; }

.post-card-body { padding: 15px 16px 16px; gap: 9px; }
.post-card-body h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}
.post-card-excerpt {
  font-size: 0.81rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ─── Seitenleiste: Top-Modelle mit Rangnummer ──────────────────
   Die Nummern kommen per CSS-Zähler - kein Eingriff ins Markup. */
.sidebar-block { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); }
.sidebar-title {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sidebar-models { counter-reset: sm; }
.sidebar-model-card {
  position: relative;
  border-radius: var(--radius-sm);
  transition: background var(--trans);
}
.sidebar-model-card::before {
  counter-increment: sm;
  content: counter(sm, decimal-leading-zero);
  position: absolute;
  top: 6px; left: 6px;
  z-index: 2;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(10,14,20,0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.5;
}
.sidebar-model-card:hover { background: var(--bg-tag); }
.sidebar-model-img { border-radius: var(--radius-xs); overflow: hidden; }
.sidebar-model-name {
  font-family: var(--font-display);
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sidebar-model-meta { font-family: var(--mono); font-size: 0.66rem; color: var(--text-muted); }
.sidebar-more-link {
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 600;
  transition: opacity var(--trans);
}
.sidebar-more-link:hover { opacity: 0.75; }

/* ─── Blättern / Leer ───────────────────────────────────────────── */
.blog-pagination { gap: 10px; }
.blog-pagination .page-info { font-family: var(--mono); font-size: 0.75rem; }
.blog-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-body { padding: 20px; }
  .blog-hero { padding: 30px 18px 26px; }
}

/* ─── NACHZÜGLER ─────────────────────────────────────────────────
   Einige Alt-Stylesheets setzen 'JetBrains Mono' / 'Figtree' direkt
   statt über die Tokens. Hier auf die neuen Familien umbiegen.
   ───────────────────────────────────────────────────────────────── */
.calc-hero h1, .is-hero h1, .page-title,
.result-value, .range-val, .qd-text,
.card-meta, .hub-model-meta {
  font-family: var(--font-display);
}
.field input, .field select, .field textarea,
.calc-card h2, .calc-results h2, .is-results-header h2,
.result-label, .sub-date, .preset-chip {
  font-family: var(--mono);
}
.result-value, .range-val, .calc-hero h1 span, .is-hero h1 span { color: var(--accent); }

/* ─── MOBILE ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-search input { height: 38px; font-size: 16px; }
  .model-grid { gap: 12px; }
  .card-body { padding: 11px 12px 10px; }
  .card-title { font-size: 0.83rem; }
  .main h1 { font-size: 1.22rem !important; }
  .logo::before { width: 20px; height: 20px; }
}
