/*
Theme Name: Legowunder
Theme URI: https://www.legowunder.ch
Author: Legowunder
Description: Knallbunte Affiliate-Kuratierungsseite für LEGO® Sets – mit Produktkarten, Kategorie-Kacheln, Affiliate-Button und Pinterest-Unterstützung.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: legowunder
*/

:root {
	--red: #E3000F;
	--yellow: #FFD500;
	--blue: #0057B8;
	--navy: #0B1F4B;
	--green: #00873F;
	--orange: #FF6B00;
	--purple: #8A2BE2;
	--ink: #14142B;
	--paper: #FFFBEA;
	--white: #fff;
	--radius: 18px;
	--bd: 3px solid var(--ink);
	--shadow: 6px 6px 0 var(--ink);
	--font: "Trebuchet MS", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--font-head: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(780px, 100% - 32px); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Kategorie-Farben --------------------------------------------------- */
.c-default { --c: var(--blue); --on: #fff; }
.c-icons   { --c: var(--red);    --on: #fff; }
.c-blumen  { --c: var(--green);  --on: #fff; }
.c-art     { --c: var(--blue);   --on: #fff; }
.c-ideas   { --c: var(--orange); --on: var(--ink); }
.c-arch    { --c: var(--purple); --on: #fff; }

/* Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--yellow); border-bottom: 5px solid var(--ink); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__studs { width: 42px; height: 42px; flex: none; }
.brand__text { font-family: var(--font-head); font-size: 1.8rem; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.brand__text strong { color: var(--red); font-weight: 900; }
.custom-logo { max-height: 56px; width: auto; }

.primary-nav .menu { list-style: none; display: flex; flex-wrap: nowrap; gap: 5px; margin: 0; padding: 0; }
.primary-nav a {
	display: block; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; white-space: nowrap;
	color: var(--ink); text-decoration: none; font-weight: 700; font-size: .84rem; transition: transform .12s, background .12s;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-cat > a { background: var(--ink); color: #fff; transform: translateY(-2px); }

.nav-toggle { display: none; background: #fff; border: var(--bd); border-radius: 12px; width: 48px; height: 48px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 22px; height: 3px; background: var(--ink); border-radius: 2px; content: ""; position: relative; }
.nav-toggle__bars::before { position: absolute; top: -7px; }
.nav-toggle__bars::after { position: absolute; top: 7px; }

@media (max-width: 1200px) {
	.nav-toggle { display: inline-flex; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--yellow); border-bottom: 5px solid var(--ink); padding: 14px 16px 18px; }
	.primary-nav.is-open { display: block; }
	.primary-nav .menu { flex-direction: column; flex-wrap: wrap; }
	.primary-nav a { font-size: 1rem; padding: 10px 16px; }
}

/* Buttons ----------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border: var(--bd); border-radius: 999px;
	font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer;
	box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; background: var(--red); color: #fff; line-height: 1.2;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); color: inherit; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--white { background: #fff; color: var(--ink); }
.btn--buy { background: var(--red); color: #fff; font-size: 1.15rem; }
.btn--buy:hover { color: #fff; }
.btn--pin { background: #fff; color: var(--red); }
.btn--small { white-space: nowrap; padding: 8px 13px; font-size: .9rem; background: var(--c, var(--blue)); color: var(--on, #fff); box-shadow: 3px 3px 0 var(--ink); }
.btn--small:hover { color: var(--on, #fff); }
.btn--disabled { background: #e9e5d2; color: #6b6a5a; box-shadow: none; cursor: not-allowed; border-style: dashed; }
.btn--disabled:hover { transform: none; box-shadow: none; }

/* Hero ---------------------------------------------------------------------- */
.hero {
	background-color: var(--blue); color: #fff; border-bottom: 5px solid var(--ink);
	background-image: radial-gradient(circle at 24px 24px, rgba(255,255,255,.16) 0 10px, transparent 11px);
	background-size: 48px 48px; overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; padding: 64px 0 72px; }
.eyebrow { display: inline-block; background: var(--yellow); color: var(--ink); border: var(--bd); border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); color: #fff; margin: 16px 0 18px; text-shadow: 4px 4px 0 var(--ink); }
.hero .hl { color: var(--yellow); }
.lead { font-size: 1.2rem; max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero__art svg { width: 100%; max-width: 440px; margin-inline: auto; filter: drop-shadow(8px 8px 0 rgba(20,20,43,.55)); transform: rotate(-3deg); }
@media (max-width: 860px) {
	.hero__inner { grid-template-columns: 1fr; padding: 44px 0 52px; }
	.hero__art { order: -1; }
	.hero__art svg { max-width: 260px; }
}

/* Sections -------------------------------------------------------------------- */
.section { padding: 64px 0; }
.section--alt { background: #fff; border-block: 5px solid var(--ink); background-image: radial-gradient(circle at 20px 20px, rgba(255,213,0,.35) 0 7px, transparent 8px); background-size: 40px 40px; }
.section__title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 28px; display: inline-block; background: var(--yellow); border: var(--bd); padding: 4px 18px; border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); transform: rotate(-1deg); }

/* Kategorie-Kacheln ---------------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.cat-tile {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; padding: 24px 18px 18px; margin-top: 12px;
	background: var(--c); color: var(--on); border: var(--bd); border-radius: 12px; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.cat-tile::before { content: ""; position: absolute; top: -15px; left: 0; right: 0; height: 12px; background: radial-gradient(circle at 22px 12px, var(--c) 0 10px, transparent 11px) 0 0 / 52px 12px repeat-x; filter: drop-shadow(0 -2px 0 var(--ink)); }
.cat-tile:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); color: var(--on); }
.cat-tile__emoji { font-size: 2.6rem; line-height: 1; margin-bottom: auto; }
.cat-tile__name { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; line-height: 1.15; }
.cat-tile__count { font-size: .9rem; font-weight: 700; opacity: .9; }
@media (max-width: 1060px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } .cat-tile { min-height: 150px; } }

/* Produktkarten ---------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .grid, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid, .grid--3 { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: #fff; border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 3; border-bottom: var(--bd); background: var(--c, var(--blue)); overflow: hidden; }
.card__media .brick-art, .card__media .media-img { width: 100%; height: 100%; object-fit: cover; }
.card__badge { position: absolute; top: 12px; right: 12px; background: var(--yellow); color: var(--ink); border: var(--bd); border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: .8rem; transform: rotate(3deg); }
.card__body { padding: 16px 18px 6px; flex: 1; }
.card__cats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.chip { display: inline-block; background: var(--c, var(--blue)); color: var(--on, #fff); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px; font-size: .78rem; font-weight: 800; text-decoration: none; }
.chip:hover { color: var(--on, #fff); filter: brightness(1.1); }
.card__title { font-size: 1.15rem; margin-bottom: 8px; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--red); }
.card__excerpt { font-size: .93rem; color: #3b3b55; margin-bottom: 10px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; padding: 0; font-size: .88rem; font-weight: 700; }
.card__foot { flex-wrap: wrap; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 18px 18px; }
.price { white-space: nowrap; font-family: var(--font-head); font-weight: 900; font-size: 1.4rem; color: var(--red); }

/* USP ------------------------------------------------------------------------------ */
.usp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.usp__item { background: var(--c); color: var(--on); border: var(--bd); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.usp__item span { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.usp__item h3 { font-size: 1.4rem; }
.usp__item p { margin: 0; }
@media (max-width: 800px) { .usp { grid-template-columns: 1fr; } }

/* Pinterest-Band ------------------------------------------------------------------ */
.pin-band { background: var(--red); color: #fff; border-block: 5px solid var(--ink); padding: 44px 0; background-image: radial-gradient(circle at 20px 20px, rgba(255,255,255,.14) 0 8px, transparent 9px); background-size: 40px 40px; }
.pin-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pin-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 6px; }
.pin-band p { margin: 0; font-size: 1.1rem; }

/* Archive-Kopf ---------------------------------------------------------------------- */
.archive-hero { background: var(--c, var(--blue)); color: var(--on, #fff); border-bottom: 5px solid var(--ink); padding: 52px 0 56px; background-image: radial-gradient(circle at 24px 24px, rgba(255,255,255,.16) 0 10px, transparent 11px); background-size: 48px 48px; }
.archive-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 10px; text-shadow: 3px 3px 0 rgba(20,20,43,.35); }
.archive-hero .lead { margin-bottom: 0; }
.archive-hero__emoji { font-size: 3rem; display: block; line-height: 1; margin-bottom: 8px; }
.archive-hero .search-form { display: flex; gap: 10px; max-width: 520px; margin-top: 16px; }
.archive-hero .search-form label { flex: 1; }
.search-field { width: 100%; padding: 12px 16px; border: var(--bd); border-radius: 999px; font: inherit; }
.search-submit { padding: 12px 22px; border: var(--bd); border-radius: 999px; background: var(--yellow); font: inherit; font-weight: 800; cursor: pointer; }

.pagination { margin-top: 40px; }
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.page-numbers { display: inline-block; min-width: 46px; text-align: center; padding: 8px 14px; background: #fff; border: var(--bd); border-radius: 12px; text-decoration: none; font-weight: 800; color: var(--ink); }
.page-numbers.current, .page-numbers:hover { background: var(--ink); color: #fff; }

/* Produktseite ---------------------------------------------------------------------- */
.product { padding: 28px 0 56px; }
.crumbs { font-size: .9rem; font-weight: 700; margin-bottom: 20px; }
.product__top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin-bottom: 40px; }
.product__media { position: relative; border: var(--bd); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: var(--c, var(--blue)); aspect-ratio: 4 / 3; }
.product__media .brick-art, .product__media .media-img { width: 100%; height: 100%; object-fit: cover; }
.product__title { font-size: clamp(1.6rem, 3.4vw, 2.5rem); margin-top: 8px; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0; }
.specs > div { background: #fff; border: var(--bd); border-radius: 14px; padding: 10px 14px; }
.specs dt { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c, var(--blue)); }
.specs dd { margin: 0; font-family: var(--font-head); font-size: 1.15rem; font-weight: 800; }
.c-ideas .specs dt { color: #b34400; }
.product__price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.product__price span { font-size: .9rem; font-weight: 700; }
.product__price strong { font-family: var(--font-head); font-size: 2.2rem; color: var(--red); line-height: 1; }
.product__cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0 12px; }
.small { font-size: .82rem; color: #4a4a63; }
.product__bottom { text-align: center; margin-top: 36px; }
@media (max-width: 860px) { .product__top { grid-template-columns: 1fr; gap: 24px; } }

.entry { max-width: 760px; margin-inline: auto; }
.entry h2 { font-size: 1.6rem; margin-top: 1.6em; padding-left: 14px; border-left: 8px solid var(--c, var(--blue)); }
.entry ul { padding-left: 0; list-style: none; }
.entry ul li { position: relative; padding: 6px 0 6px 36px; }
.entry ul li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--c, var(--blue)); border: 3px solid var(--ink); }
.entry .note { font-size: .85rem; color: #4a4a63; border-top: 2px dashed #bdb89a; padding-top: 14px; margin-top: 2em; }
.entry img { border: var(--bd); border-radius: var(--radius); }

/* Footer ------------------------------------------------------------------------------ */
.site-footer { background: var(--navy); color: #dfe6f7; margin-top: 0; }
.footer-bricks { height: 14px; background: linear-gradient(90deg, var(--red) 0 20%, var(--yellow) 20% 40%, var(--blue) 40% 60%, var(--green) 60% 80%, var(--orange) 80% 100%); border-bottom: 4px solid var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 44px 0 28px; }
.footer-brand { font-family: var(--font-head); font-size: 1.8rem; color: #fff; margin-bottom: 6px; }
.footer-brand strong { color: var(--yellow); }
.footer-title { font-size: 1.1rem; color: var(--yellow); }
.site-footer .menu { list-style: none; margin: 0; padding: 0; }
.site-footer .menu li { margin-bottom: 6px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .btn--pin { color: var(--red); }
.footer-legal { border-top: 1px solid rgba(255,255,255,.2); padding: 18px 0 32px; font-size: .82rem; color: #b8c3de; }
.footer-legal p { margin-bottom: .5em; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
