/* Vectopalm Free 3D Library – Ansicht innerhalb der Free Library (gleiches Erscheinungsbild wie die Free SVG Library).
   Kein deckender Hintergrund: das Wallpaper der Website bleibt sichtbar. */
.vp3w {
	--ink: var(--wp--preset--color--contrast, #111111);
	--bg: var(--wp--preset--color--base, #ffffff);
	--muted: color-mix(in srgb, var(--ink) 58%, var(--bg));
	--line: color-mix(in srgb, var(--ink) 12%, var(--bg));
	--soft: color-mix(in srgb, var(--ink) 4%, var(--bg));
	--tile: color-mix(in srgb, var(--ink) 3%, var(--bg));
	--accent: var(--wp--preset--color--accent-3, #503aa8);
	--radius: 16px;
	color: var(--ink); background: transparent; /* Hintergrund der Website (z. B. animiertes Wallpaper) scheint durch */
	font-family: inherit; /* Schrift des Themes übernehmen */
	font-size: 16px; line-height: 1.5; text-align: left;
	-webkit-font-smoothing: antialiased;
}
.vp3w *, .vp3w *::before, .vp3w *::after { box-sizing: border-box; }
.vp3w [hidden] { display: none !important; }
.vp3w button { font: inherit; color: inherit; cursor: pointer; }
.vp3w :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vp3w-wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* Kopf */
.vp3w-hero { padding-block: 0 clamp(20px, 3vw, 32px); text-align: center; }
.vp3w-langs { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 12px; }
.vp3w-langs button { background: none; border: 0; padding: 4px 8px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.vp3w-langs button[aria-pressed="true"] { color: var(--ink); background: var(--soft); font-weight: 600; }
.vp3w-title { margin: 0 0 12px; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700; }
.vp3w-intro { margin: 0 auto 28px; max-width: 640px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }
.vp3w-searchbar { position: relative; max-width: 720px; margin: 0 auto; }
.vp3w-searchbar svg { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.vp3w-searchbar input {
	width: 100%; height: 64px; padding: 0 24px 0 58px; border-radius: 999px; border: 1.5px solid var(--line);
	background: var(--bg); color: var(--ink); font: inherit; font-size: 18px; outline: none;
	box-shadow: 0 8px 30px -18px color-mix(in srgb, var(--ink) 40%, transparent);
}
.vp3w-searchbar input:focus { border-color: var(--ink); }
.vp3w-searchbar input::placeholder { color: var(--muted); }

/* Filter */
.vp3w-filters { padding-block: 8px 4px; }
.vp3w-filter-row { display: flex; align-items: flex-start; gap: 14px; margin-top: 14px; }
.vp3w-filter-label { flex: 0 0 124px; white-space: nowrap; padding-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.vp3w-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.vp3w-chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--bg); font-size: 14px; line-height: 1.3; white-space: nowrap;
}
.vp3w-chip:hover { border-color: var(--ink); }
.vp3w-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.vp3w-chip-n { font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }
.vp3w-chips--tags .vp3w-chip { background: var(--soft); border-color: transparent; }
.vp3w-chips--tags .vp3w-chip[aria-pressed="true"] { background: var(--ink); }
.vp3w-chips:not(.is-open) .is-extra { display: none; }
/* Beliebtheit: je häufiger gesucht, heruntergeladen oder geliked, desto dunkler (Farben setzt das Skript). */
.vp3w-chips .vp3w-chip.is-pop { background: var(--chip-bg); color: var(--chip-fg); border-color: transparent; }
.vp3w-chips .vp3w-chip.is-pop:hover { border-color: var(--ink); }
.vp3w-chips .vp3w-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.vp3w-link { background: none; border: 0; padding: 7px 4px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.vp3w-link:hover { color: var(--ink); }

/* Werkzeugleiste */
.vp3w-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding: 14px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.vp3w-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.vp3w-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.vp3w-active-chip { border: 1px solid var(--ink); background: var(--bg); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.vp3w-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.vp3w-sort select { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }

/* Galerie */
.vp3w-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: clamp(12px, 1.6vw, 22px); transition: opacity .12s; }
.vp3w[aria-busy="true"] .vp3w-grid { opacity: .45; }
.vp3w-card { position: relative; min-width: 0; }
.vp3w-card-media {
	display: grid; place-items: center; aspect-ratio: 1; padding: 13%; border-radius: var(--radius);
	background: var(--tile); border: 1px solid transparent; overflow: hidden;
}
.vp3w-card-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vp3w-card:hover .vp3w-card-media, .vp3w-card-media:focus-visible { border-color: var(--ink); }
.vp3w-card-body { padding: 10px 2px 0; }
.vp3w-card-name { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp3w-card-name::after { content: ""; position: absolute; inset: 0 0 auto 0; aspect-ratio: 1; border-radius: var(--radius); } /* ganze Kachel klickbar */
.vp3w-card-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; align-items: center; }
.vp3w-card-cat { background: none; border: 0; padding: 0; font-size: 13px; color: var(--muted); position: relative; }
.vp3w-card-cat:hover { color: var(--ink); text-decoration: underline; }
/* Tag-Zeile: was nicht in die erste Zeile passt, bricht um und wird vom Skript ausgeblendet (Zeilenhöhe misst das Skript). */
.vp3w-card-tags { display: flex; gap: 4px; flex-wrap: wrap; align-items: flex-start; overflow: hidden; margin-top: 6px; }
.vp3w-tag { position: relative; flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--soft); border: 0; border-radius: 999px; padding: 2px 9px; font-size: 12px; line-height: 18px; color: var(--muted); }
/* Fremde Knopf-Stile der Website (Mindesthöhe, Abstände, Schatten) nicht auf Tags und Zähler durchschlagen lassen. */
.vp3w .vp3w-tag, .vp3w .vp3w-stat { min-height: 0; min-width: 0; height: auto; margin-top: 0; margin-bottom: 0; box-shadow: none; text-transform: none; letter-spacing: normal; font-weight: 400; }
.vp3w .vp3w-tag { margin: 0; line-height: 20px; }
/* Downloads und Likes */
.vp3w-card-stats { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.vp3w-stat { position: relative; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; font-size: 13px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.vp3w-stat svg { width: 15px; height: 15px; flex: none; }
button.vp3w-stat { padding: 4px 6px; margin: -4px -6px; border-radius: 999px; }
button.vp3w-stat:hover { color: #e0245e; }
button.vp3w-stat[aria-pressed="true"] { color: #e0245e; }
button.vp3w-stat[aria-pressed="true"] svg { fill: currentColor; }
.vp3w-detail-stats { display: flex; align-items: center; gap: 18px; margin: -8px 0 22px; }
.vp3w-detail-stats .vp3w-stat { font-size: 15px; }
.vp3w-detail-stats .vp3w-stat svg { width: 19px; height: 19px; }
.vp3w-tag:hover { color: var(--ink); }

/* Status & Pagination */
.vp3w-status { margin: 48px auto; text-align: center; color: var(--muted); max-width: 520px; }
.vp3w-status strong { display: block; color: var(--ink); font-size: 20px; margin-bottom: 6px; }
.vp3w-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin: 40px 0 72px; }
.vp3w-page { min-width: 42px; height: 42px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-variant-numeric: tabular-nums; }
a.vp3w-page:hover { border-color: var(--ink); }
.vp3w-page.is-current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.vp3w-page.is-gap { border: 0; min-width: 20px; padding: 0; }
.vp3w-page.is-disabled { opacity: .35; }
.vp3w-noscript-list { columns: 3 220px; padding: 16px 20px; }

/* Einzelansicht */
.vp3w-detail { width: min(1040px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--bg); overflow: auto; }
.vp3w-detail::backdrop { background: color-mix(in srgb, #000 55%, transparent); }
.vp3w-detail-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.vp3w-detail[aria-busy="true"] .vp3w-detail-inner { opacity: .35; }
.vp3w-detail-media {
	display: grid; place-items: center; aspect-ratio: 1; padding: 10%;
	background-color: var(--tile);
	background-image: linear-gradient(45deg, var(--soft) 25%, transparent 25%, transparent 75%, var(--soft) 75%), linear-gradient(45deg, var(--soft) 25%, transparent 25%, transparent 75%, var(--soft) 75%);
	background-size: 24px 24px; background-position: 0 0, 12px 12px;
}
.vp3w-detail-media img { width: 100%; height: 100%; object-fit: contain; }
.vp3w-detail-info { padding: clamp(20px, 3vw, 36px); position: relative; }
.vp3w-detail-close { position: sticky; float: right; top: 12px; margin: 12px 12px -52px 0; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font-size: 20px; line-height: 1; }
.vp3w-detail-close:hover { border-color: var(--ink); }
.vp3w-detail h2 { margin: 0 44px 10px 0; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -0.02em; }
.vp3w-detail-desc { margin: 0 0 20px; color: var(--muted); }
.vp3w-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.vp3w-detail-actions .vp3w-btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.vp3w-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.vp3w-btn:hover { border-color: var(--ink); }
.vp3w-btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.vp3w-btn--primary:hover { opacity: .9; }
.vp3w-btn svg { width: 18px; height: 18px; }
.vp3w-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 20px; font-size: 14px; }
.vp3w-dl > div { display: contents; }
.vp3w-dl dt { color: var(--muted); }
.vp3w-dl dd { margin: 0; overflow-wrap: anywhere; }
.vp3w-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.vp3w-detail-tags .vp3w-tag { font-size: 13px; padding: 4px 11px; }
.vp3w-h3 { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.vp3w-rels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.vp3w-rel { display: grid; place-items: center; aspect-ratio: 1; padding: 14%; border-radius: 12px; background: var(--tile); border: 1px solid transparent; }
.vp3w-rel:hover { border-color: var(--ink); }
.vp3w-rel img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 820px) {
	.vp3w-filter-row { flex-direction: column; gap: 6px; }
	.vp3w-filter-label { flex: none; padding-top: 0; }
	.vp3w-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.vp3w-chips::-webkit-scrollbar { display: none; }
	.vp3w-chips.is-open { flex-wrap: wrap; }
	.vp3w-searchbar input { height: 56px; font-size: 16px; }
	.vp3w-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vp3w-detail-inner { grid-template-columns: minmax(0, 1fr); }
	.vp3w-detail-media { aspect-ratio: 4 / 3; padding: 6%; }
	.vp3w-detail { border-radius: 18px; }
	.vp3w-rels { grid-template-columns: repeat(3, 1fr); }
	.vp3w-page:not(.is-current):not([rel]):not(.is-gap):not(.is-disabled) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vp3w-grid { transition: none; } }

/* ---- Ergänzungen der 3D-Ansicht (Links statt Knöpfe, Modellansicht als Seite) ---- */
.vp3w a.vp3w-chip, .vp3w a.vp3w-tag, .vp3w a.vp3w-card-cat, .vp3w a.vp3w-active-chip, .vp3w a.vp3w-link { text-decoration: none; color: inherit; }
.vp3w a.vp3w-chip { color: var(--ink); }
.vp3w .vp3w-chips .vp3w-chip.is-pop { color: var(--chip-fg); }
.vp3w .vp3w-chips .vp3w-chip[aria-pressed="true"] { color: var(--bg); }
.vp3w a.vp3w-link { text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.vp3w-sort { margin: 0; }
.vp3w-sort label { display: flex; align-items: center; gap: 8px; }
.vp3w-card-media { text-decoration: none; }
.vp3w-card-name { position: static; }
.vp3w-card-name::after { content: none; }
.vp3w-card-tags { max-height: 20px; }
.vp3w-card-cat { text-decoration: none; }
.vp3w-tag { display: inline-block; text-decoration: none; }
.vp3w-status strong { display: block; }
.vp3w-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.vp3w-crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; }
.vp3w-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.vp3w-crumbs svg { width: 16px; height: 16px; }
.vp3w-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); width: auto; max-height: none; overflow: hidden; border: 1px solid var(--line); background: transparent; }
.vp3w-detail-media { border-radius: 0; }
.vp3w-detail-info { background: transparent; }
.vp3w-eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.vp3w-detail .vp3w-detail-title { margin: 0 0 12px; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; letter-spacing: -0.02em; }
.vp3w-detail-stats { margin: 0 0 22px; }
.vp3w button.vp3w-btn { cursor: pointer; font: inherit; font-weight: 600; font-size: 15px; }
.vp3w-btn[aria-disabled="true"] { opacity: .6; cursor: default; }
.vp3w-msg { min-height: 1.4em; margin: -12px 0 14px; font-size: 14px; color: #b42318; }
.vp3w-app { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.vp3w-related { margin: clamp(28px, 4vw, 48px) 0 72px; }
.vp3w-grid--small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.vp3w-model .vp3w-wrap { padding-bottom: 8px; }
@media (max-width: 820px) {
	.vp3w-detail { grid-template-columns: minmax(0, 1fr); }
	.vp3w-grid--small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Modellansicht steht im Seitenfluss (kein Dialog): Vorschaufläche nur leicht getönt, nicht deckend */
.vp3w-detail .vp3w-detail-media { background: color-mix(in srgb, var(--ink) 4%, transparent); background-image: none; }
.vp3w-detail-info { padding-top: clamp(20px, 3vw, 36px); }
.vp3w[aria-busy="true"] [data-vp3w-results] { opacity: .45; transition: opacity .12s; }
/* Knöpfe: Themen- und Grundregeln dürfen Schrift/Farbe nicht überschreiben */
.vp3w button.vp3w-btn--primary { color: var(--bg); }
.vp3w a.vp3w-chip, .vp3w a.vp3w-card-cat, .vp3w a.vp3w-active-chip { font-size: inherit; }
.vp3w .vp3w-card-tags a.vp3w-tag { font-size: 14px; line-height: 20px; }
.vp3w .vp3w-card-tags { max-height: 24px; }
