/**
 * We Merch You - Theme-Styles.
 *
 * Alle Farben laufen über Ollies Preset-Variablen (--wp--preset--color--*)
 * und die --wmy-*-Variablen. Das Plugin wemerchyou-core überschreibt beide
 * auf <body class="wmy-brand wmy-brand--{slug}"> - deshalb hier nie Hex-Werte
 * für Flächen, die eine Brand umfärben können soll.
 */

:root {
	--wmy-header-bg: var(--wp--preset--color--main);
	--wmy-header-text: var(--wp--preset--color--base);
	--wmy-header-accent: var(--wp--preset--color--primary);
	--wmy-header-muted: #b5b5b5;
	--wmy-topbar-bg: var(--wp--preset--color--primary);
	--wmy-topbar-text: var(--wp--preset--color--main);
	--wmy-footer-bg: var(--wp--preset--color--main);
	--wmy-footer-text: #d9d9d9;
	--wmy-nav-font: var(--wp--preset--font-family--primary);
	--wmy-nav-transform: none;
	--wmy-nav-size: 0.95rem;
	/* We-Merch-You-Orange für Plattform-Elemente (Wortmarke). Wird hier auf :root
	   aufgelöst und vererbt den fertigen Wert - eine Brand, die primary auf <body>
	   umfärbt, ändert ihn deshalb nicht. */
	--wmy-platform-accent: var(--wp--preset--color--primary);
}

/* ------------------------------------------------------------------ */
/* Header (We Merch You und Brand)                                     */
/* ------------------------------------------------------------------ */

.wmy-topbar,
.wmy-brand-header__platform {
	background: var(--wmy-topbar-bg);
	color: var(--wmy-topbar-text);
	padding: 0.45rem var(--wp--preset--spacing--small);
}

.wmy-topbar p,
.wmy-brand-header__platform p {
	margin: 0;
}

/* „Orange Key“ nie auseinanderreißen. */
.wmy-brand-header__platform a {
	white-space: nowrap;
}

/*
 * Plattform-Leiste mobil: Unter 400 px passt „Offizieller Fanshop · produziert
 * & versendet von Orange Key“ nicht in eine Zeile (bei 375 px stand „Key“ allein
 * in Zeile 2). Dort nur „Produziert & versendet von Orange Key“.
 */
.wmy-platform__short {
	display: none;
}

@media (max-width: 399px) {
	.wmy-platform__claim {
		display: none;
	}

	.wmy-platform__short {
		display: inline;
	}
}

.wmy-topbar a,
.wmy-brand-header__platform a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wmy-header__main,
.wmy-brand-header__main {
	background: var(--wmy-header-bg);
	color: var(--wmy-header-text);
	padding: var(--wp--preset--spacing--small);
}

.wmy-header__main a,
.wmy-brand-header__main a {
	color: var(--wmy-header-text);
}

.wmy-header__main a:hover,
.wmy-brand-header__main a:hover,
.wmy-header__main .current-menu-item > a {
	color: var(--wmy-header-accent);
}

.wmy-header__nav,
.wmy-brand-nav {
	font-family: var(--wmy-nav-font);
	text-transform: var(--wmy-nav-transform);
	font-size: var(--wmy-nav-size);
}

/*
 * Mobiles Menü (core/navigation): Ollie färbt Öffnen-/Schließen-Button fest
 * in --main (und den Schließen-Button mit hellem Hintergrund) - auf dem
 * dunklen Header und Overlay unsichtbar bzw. als weißes Kästchen.
 */
.wmy-header__nav .wp-block-navigation__responsive-container-open,
.wmy-header__nav .wp-block-navigation__responsive-container-close {
	background: transparent;
	color: var(--wmy-header-text);
}

/*
 * Burger-Menü schon unter 1024 px statt erst unter 600 px (core/navigation
 * schaltet fest bei 600 px um). Logo, Menü und Icons brauchen nebeneinander
 * rund 770 px - darunter wird es eng. Der Menü-Button steht dann ganz rechts
 * hinter Suche, Konto und Warenkorb: Die beiden Gruppen lösen sich auf
 * (display: contents), ihre Kinder werden direkte Flex-Elemente der Zeile.
 */
@media (max-width: 1023px) {
	.wmy-header__nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.wmy-header__nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	/* Doppelte Klasse schlägt WordPress' "body .is-layout-flex { display: flex }". */
	.wmy-header__row > .wmy-header__start.wmy-header__start,
	.wmy-header__row > .wmy-header__end.wmy-header__end {
		display: contents;
	}

	.wmy-header__row {
		gap: var(--wp--preset--spacing--small);
	}

	.wmy-header__start > :first-child {
		margin-right: auto;
	}

	.wmy-header__nav {
		order: 1;
	}
}

/* Icons (Konto, Mini-Cart, Suche) erben die Header-Schriftfarbe. */
.wmy-header__main .wc-block-mini-cart__button,
.wmy-header__main .wc-block-customer-account a,
.wmy-brand-header__main .wc-block-mini-cart__button,
.wmy-brand-header__main .wc-block-customer-account a {
	color: var(--wmy-header-text);
}

.wmy-header__main .wc-block-mini-cart__badge,
.wmy-brand-header__main .wc-block-mini-cart__badge {
	background: var(--wmy-header-accent);
	color: var(--wmy-header-bg);
	border-color: var(--wmy-header-bg);
}

.wmy-header__search .wp-block-search__button {
	background: transparent;
	color: var(--wmy-header-text);
	border: 0;
	padding: 0.25rem;
}

/* Brand-Navigation (horizontal im Header, vertikal im Footer, Pills im Archiv) */
.wmy-brand-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem var(--wp--preset--spacing--medium);
	list-style: none;
	margin: 0;
	padding: 0;
}

.wmy-brand-nav a {
	text-decoration: none;
}

.wmy-brand-nav .is-current > a {
	color: var(--wmy-header-accent);
}

.wmy-brand-nav--vertical ul {
	flex-direction: column;
}

.wmy-brand-nav--pills ul {
	gap: 0.5rem;
}

.wmy-brand-nav--pills a {
	display: inline-block;
	padding: 0.4rem 1rem;
	border: 2px solid var(--wp--preset--color--main);
	color: var(--wp--preset--color--main);
	/* Schriften mit nur einem (schon kräftigen) Schnitt setzen --wmy-nav-weight. */
	font-weight: var(--wmy-nav-weight, 600);
}

.wmy-brand-nav--pills a:hover,
.wmy-brand-nav--pills .is-current > a {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wmy-button-text, var(--wp--preset--color--main));
}

/*
 * Rechte Gruppe der Brand-Navigation: „Über uns“ und „Zur Website“.
 * Sortiment-Pills: Kategorien links, Gruppe rechts; Website umrandet in der
 * Akzentfarbe (Schrift dunkel - Akzentfarben sind nicht immer auf Weiß lesbar).
 * Header (horizontal, mittig): nur größerer Abstand zu den Kategorien.
 */
.wmy-brand-nav--pills .wmy-brand-nav__meta--first {
	margin-left: auto;
}

.wmy-brand-nav--pills .wmy-brand-nav__website > a {
	background: transparent;
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--main);
}

.wmy-brand-nav--pills .wmy-brand-nav__website > a:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wmy-button-text, var(--wp--preset--color--main));
}

.wmy-brand-nav--horizontal.wmy-brand-nav--plain .wmy-brand-nav__meta--first {
	margin-left: var(--wp--preset--spacing--medium);
}

.wmy-brand-nav--vertical .wmy-brand-nav__meta--first {
	margin-top: 0.5rem;
}

.wmy-brand-nav__external {
	margin-left: 0.3em;
	font-size: 0.85em;
}

/*
 * Fixierte Menüzeile (WMY- und Brand-Header). Beim Scrollen (Klasse wmy-scrolled,
 * assets/js/header.js) klappt die Topbar ein, Zeile und Logo werden kleiner.
 */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

body.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* Unter 600 px scrollt die Admin-Leiste mit weg. */
@media (max-width: 600px) {
	body.admin-bar .site-header {
		top: 0;
	}
}

/*
 * Admin-Leiste (nur eingeloggt): Mit den Einträgen von WooCommerce, Backup und
 * Redis passt sie zwischen 783 und 1279 px nicht in eine Zeile - der rechte
 * Teil (Konto, Suche) bricht in eine zweite Zeile über Plattform-Leiste und
 * Header. Dort nur Icons zeigen (Text bleibt für Screenreader), das Konto als
 * Avatar und die Suche weglassen (der Header hat eine eigene). Redis
 * („Objekt-Cache“) bringt kein Icon mit und bekommt das Dashicon „database“. Unter 783 px
 * greift die mobile Admin-Leiste von WordPress.
 */
@media (min-width: 783px) and (max-width: 1279px) {
	#wpadminbar #wp-admin-bar-site-name > .ab-item,
	#wpadminbar #wp-admin-bar-site-editor > .ab-item,
	#wpadminbar #wp-admin-bar-customize > .ab-item,
	#wpadminbar #wp-admin-bar-edit > .ab-item,
	#wpadminbar #wp-admin-bar-redis-cache > .ab-item,
	#wpadminbar #wp-admin-bar-my-account > .ab-item {
		font-size: 0;
	}

	#wpadminbar #wp-admin-bar-site-name > .ab-item::before,
	#wpadminbar #wp-admin-bar-site-editor > .ab-item::before,
	#wpadminbar #wp-admin-bar-customize > .ab-item::before,
	#wpadminbar #wp-admin-bar-edit > .ab-item::before,
	#wpadminbar #wp-admin-bar-redis-cache > .ab-item::before {
		margin-right: 0;
	}

	#wpadminbar #wp-admin-bar-redis-cache > .ab-item::before {
		content: "\f17e";
		top: 2px;
	}

	#wpadminbar #wp-admin-bar-new-content .ab-label,
	#wpadminbar #wp-admin-bar-lswpm-backup .ab-label,
	#wpadminbar #wp-admin-bar-my-account > .ab-item .display-name,
	#wpadminbar #wp-admin-bar-search {
		display: none;
	}
}

/* Sprungziele (z. B. #shops) nicht unter dem Header verstecken. */
html {
	scroll-padding-top: 6rem;
}

.wmy-topbar,
.wmy-brand-header__platform {
	max-height: 6rem;
	overflow: hidden;
	transition: max-height 0.2s ease, padding 0.2s ease;
}

.wmy-scrolled .wmy-topbar,
.wmy-scrolled .wmy-brand-header__platform {
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.wmy-header__main,
.wmy-brand-header__main {
	transition: padding 0.2s ease;
}

.wmy-scrolled .wmy-header__main,
.wmy-scrolled .wmy-brand-header__main {
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
}

.wmy-scrolled .site-header .wmy-logo--header {
	--wmy-logo-height: 44px;
}

.wmy-scrolled .site-header .wmy-wordmark {
	font-size: 1.15rem;
}

.site-header .wmy-logo img,
.site-header .wmy-wordmark {
	transition: max-height 0.2s ease, font-size 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
	.wmy-topbar,
	.wmy-brand-header__platform,
	.wmy-header__main,
	.wmy-brand-header__main,
	.site-header .wmy-logo img,
	.site-header .wmy-wordmark {
		transition: none;
	}
}

/* Such-Icon im Header: im 44-px-Button mittig (sonst 6 px zu hoch). */
.wmy-header__search .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Logo */
.wmy-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	line-height: 1;
}

.wmy-logo img {
	display: block;
	width: auto;
	height: 100%;
	max-height: var(--wmy-logo-height, 56px);
}

.wmy-logo--header {
	--wmy-logo-height: 56px;
}

.wmy-logo--hero {
	--wmy-logo-height: 160px;
}

.wmy-logo--footer {
	--wmy-logo-height: 72px;
}

/* Wortmarke "We Merch You", wenn keine Brand aktiv ist */
.wmy-wordmark {
	font-weight: 900;
	font-size: 1.4rem;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: var(--wmy-header-text);
}

/* „Merch“ immer in Orange - auch im Footer einer Brand (Unicorns: sonst Grün auf Grün). */
.wmy-wordmark span {
	color: var(--wmy-platform-accent);
}

/* Brand-Logo ragt im Header über die Leiste (Ice-Tigers-Muster) */
.wmy-brand-header__main .wmy-logo--header {
	--wmy-logo-height: 72px;
}

/* ------------------------------------------------------------------ */
/* Brand-Archiv                                                         */
/* ------------------------------------------------------------------ */

.wmy-brand-hero {
	background: var(--wmy-hero-bg, var(--wmy-header-bg));
	color: var(--wmy-header-text);
	padding: var(--wp--preset--spacing--large) var(--wp--preset--spacing--medium);
	border-bottom: 6px solid var(--wp--preset--color--primary);
}

.wmy-brand-hero__inner {
	gap: var(--wp--preset--spacing--large);
}

.wmy-brand-hero a,
.wmy-brand-hero .wc-block-breadcrumbs {
	color: var(--wmy-header-muted);
}

.wmy-brand-hero__title {
	color: var(--wmy-header-text);
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	margin: 0;
}

.wmy-brand-hero__description {
	max-width: 46rem;
	color: var(--wmy-header-text);
	opacity: 0.85;
}

/*
 * Kopfbereich aus dem Shop-Konfigurator (Block wemerchyou/brand-hero-aside):
 * Partnerlogo oben, Claim darunter, rechtsbündig neben dem Titel. Das
 * Hintergrundbild kommt als --wmy-hero-bg aus dem Plugin.
 */
.wmy-brand-hero__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--wp--preset--spacing--medium);
	margin-left: auto;
	text-align: right;
}

.wmy-brand-hero__partner-logo {
	display: block;
	width: auto;
	max-width: 12rem;
	max-height: 4rem;
}

.wmy-brand-hero__claim {
	margin: 0;
	color: var(--wmy-header-text);
	font-family: var(--wmy-heading-font, var(--wp--preset--font-family--secondary));
	font-weight: var(--wmy-heading-weight, 800);
	text-transform: var(--wmy-heading-transform, none);
	letter-spacing: var(--wmy-heading-spacing, -0.01em);
	line-height: 1;
	font-size: clamp(1.5rem, 3.5vw, 3rem);
}

@media (max-width: 781px) {
	.wmy-brand-hero__aside {
		align-items: flex-start;
		margin-left: 0;
		text-align: left;
	}
}

.wmy-brand-subnav {
	padding: var(--wp--preset--spacing--medium);
	border-bottom: 1px solid var(--wp--preset--color--border-light);
}

/* Produktkarten: schmale Display-Schriften brauchen mehr Groesse */
.wmy-brand .wp-block-woocommerce-product-template .wp-block-post-title {
	font-size: calc(var(--wp--preset--font-size--small) * var(--wmy-card-title-scale, 1));
}

body.wmy-brand {
	--wmy-card-title-scale: 1;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.wmy-footer,
.wmy-brand-footer {
	background: var(--wmy-footer-bg);
	color: var(--wmy-footer-text);
	padding: var(--wp--preset--spacing--x-large) var(--wp--preset--spacing--medium) var(--wp--preset--spacing--medium);
	margin-top: 0;
}

.wmy-footer a,
.wmy-brand-footer a {
	color: var(--wmy-footer-text);
}

.wmy-footer a:hover,
.wmy-brand-footer a:hover {
	color: var(--wmy-header-accent);
}

.wmy-footer__heading {
	color: var(--wmy-header-text);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.wmy-legal-links,
.wmy-brand-grid--list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 2;
}

/*
 * EU-Gewährleistungshinweis auf der Produktseite (Germanized-Block
 * product-legal-guarantee, Variante "preview"): offizielle Mitteilung als
 * Vorschaubild unter den Badges, groß im Popover. Germanized zentriert das
 * Bild - hier linksbündig wie die Badges. Größe bleibt die von Germanized.
 */
.wmy-legal-guarantee {
	margin-top: var(--wp--preset--spacing--small);
}

.wmy-legal-guarantee .wc-gzd-legal-guarantee {
	margin: 0;
	text-align: left;
}

/*
 * Widerrufsbutton + Gewährleistungshinweis (Block wemerchyou/legal-notices,
 * Inhalte aus Germanized). Gewährleistungshinweis als Link im Stil der
 * Rechtslinks, darunter der Button in Brand-Farben. Die volle EU-Mitteilung
 * öffnet Germanized im Popover. Bei Variante "preview" gibt Germanized die
 * Bildgröße vor (min. 250 px) - bewusst nicht verkleinert.
 */
/* Germanized zentriert den Hinweis und setzt 10px Rand - hier wie ein
   weiterer Eintrag der Rechtslinks darüber. */
.wmy-legal-notices .wc-gzd-legal-guarantee {
	margin: 0;
	text-align: left;
	line-height: 2;
}

.wmy-legal-notices .wc-gzd-legal-guarantee-label-link > a {
	color: inherit;
	font-size: var(--wp--preset--font-size--small);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wmy-legal-notices {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--small);
	margin-top: 0;
}

.wmy-legal-notices .eu-owb-order-withdraw-from-contract-button {
	margin: 0;
	text-align: left;
}

.wmy-legal-notices .eu-owb-order-withdraw-from-contract-button .button {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: var(--wmy-button-bg, var(--wp--preset--color--primary));
	color: var(--wmy-button-text, var(--wp--preset--color--main));
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	text-decoration: none;
}

/* Plattform-Hinweis: steht in jedem Footer, damit man sieht, wo man ist */
.wmy-platform-badge {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--small);
	margin-top: var(--wp--preset--spacing--large);
	padding-top: var(--wp--preset--spacing--medium);
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: var(--wp--preset--font-size--x-small);
}

.wmy-platform-badge__logos {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.wmy-platform-badge__logos img {
	height: 34px;
	width: auto;
}

.wmy-platform-badge p {
	margin: 0;
}

/* ------------------------------------------------------------------ */
/* Startseite We Merch You                                              */
/* ------------------------------------------------------------------ */

.wmy-hero {
	background: var(--wp--preset--color--main);
	color: var(--wp--preset--color--base);
	padding: var(--wp--preset--spacing--xx-large) var(--wp--preset--spacing--medium);
}

.wmy-hero__title {
	color: var(--wp--preset--color--base);
	font-size: clamp(2.5rem, 7vw, 5.5rem);
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: -0.03em;
}

.wmy-hero__lead {
	font-size: var(--wp--preset--font-size--medium);
	max-width: 38rem;
	color: #d9d9d9;
}

.wmy-eyebrow {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: var(--wp--preset--font-size--small);
}

.wmy-section__title {
	margin-bottom: var(--wp--preset--spacing--medium);
}

.wmy-section {
	padding: var(--wp--preset--spacing--x-large) var(--wp--preset--spacing--medium);
}

.wmy-section--tertiary {
	background: var(--wp--preset--color--tertiary);
}

.wmy-brand-grid--tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	/* Alle Zeilen so hoch wie die höchste - gleich hohe Kacheln auch über Zeilen hinweg. */
	grid-auto-rows: 1fr;
	gap: var(--wp--preset--spacing--medium);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Grid streckt das <li> auf Zeilenhöhe; der Link füllt es aus, damit alle
   Kacheln gleich hoch sind - auch mit unterschiedlich hohen Logos. */
.wmy-brand-tile {
	display: flex;
}

.wmy-brand-tile a {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	min-height: 240px;
	padding: var(--wp--preset--spacing--medium);
	background: var(--wmy-tile-bg, var(--wp--preset--color--main));
	color: var(--wmy-tile-text, var(--wp--preset--color--base));
	border-bottom: 6px solid var(--wmy-tile-accent, var(--wp--preset--color--primary));
	text-decoration: none;
	transition: transform 0.15s ease;
}

.wmy-brand-tile a:hover {
	transform: translateY(-4px);
}

.wmy-brand-tile img {
	max-height: 120px;
	width: auto;
}

.wmy-brand-tile__name {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Externer Shop (eigenständig, nur verlinkt): Pfeil hinter dem Namen. */
.wmy-brand-tile__external {
	margin-left: 0.3em;
	font-size: 0.85em;
}

/* Footer-Liste: Pfeil in der Akzentfarbe (kontrastgesichert auf dunklem Grund). */
.wmy-brand-grid--list .wmy-brand-tile__external {
	color: var(--wmy-header-accent);
}

/* Kurztext unter dem Shop-Namen (Seite „Alle Shops“). */
.wmy-brand-tile__about {
	max-width: 30ch;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.4;
	text-align: center;
	opacity: 0.85;
}

/* Footer-Liste: „Alle Shops →“ als letzter Eintrag. */
.wmy-brand-grid__more-link a {
	font-weight: 700;
}

/* Langtext auf /{brand}/about/ und Rücksprung „Zum Shop“ links. */
.wmy-brand-about > :first-child {
	margin-top: 0;
}

.wmy-brand-about + .wmy-brand-shop-link {
	justify-content: flex-start;
}

/* Live-Suche blendet Kacheln per hidden aus - display:flex oben würde das überstimmen. */
.wmy-brand-tile[hidden] {
	display: none;
}

/* Shop-Übersicht mit Suche und/oder Button „Alle Shops“ (Block-Wrapper). */
.wmy-brand-overview {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--medium);
}

.wmy-brand-search {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	max-width: 28rem;
}

.wmy-brand-search label {
	font-weight: 700;
}

.wmy-brand-search input[type="search"] {
	padding: 0.7rem 0.9rem;
	border: 2px solid var(--wp--preset--color--main);
	border-radius: 0;
	font: inherit;
}

.wmy-brand-search input[type="search"]:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.wmy-brand-search__status {
	margin: 0;
	min-height: 1.5em;
	font-size: var(--wp--preset--font-size--small);
}

.wmy-brand-grid__more {
	display: flex;
	justify-content: center;
}

/* Fallback, falls das Theme die WP-Klasse nicht mitbringt (Hinweis „öffnet in neuem Tab“). */
.screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Kachel „We Merch You“ (alle Produkte): Wortmarke statt Logo, WMY-Farben. */
.wmy-brand-tile--platform .wmy-wordmark {
	font-size: 1.4rem;
	line-height: 1;
	white-space: nowrap;
	color: var(--wp--preset--color--base);
}

/*
 * Icons (früher Plugin Icon Block): SVG in core/html-Blöcken.
 * badge: Vertrauens-Hinweise auf der Brand-Produktseite.
 * empty: Lupe im leeren Brand-Archiv, in den (Brand-)Preset-Farben.
 */
.wmy-icon {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
}

.wmy-icon svg {
	display: block;
	width: 100%;
	height: auto;
}

.wmy-icon--badge {
	width: 20px;
	color: #30b241;
}

.wmy-icon--empty {
	box-sizing: border-box;
	width: 42px;
	padding: 10px;
	border-radius: 10px;
	background: var(--wp--preset--color--main);
	color: var(--wp--preset--color--base);
}

/*
 * Rücksprung-Button im Seitenkopf (Warenkorb, Bestellbestätigung) sitzt rechts.
 * display:flex selbst setzen: Das Flex-CSS von core/buttons lädt WP nur, wenn
 * der echte Core-Block auf der Seite steht, nicht für unseren dynamischen Block.
 */
.wmy-brand-shop-link {
	display: flex;
	justify-content: flex-end;
}

/*
 * Konto (templates/page-my-account.html): aktiver Menüpunkt mit Akzentstreifen;
 * Login- und Passwort-Formulare nicht über die volle Inhaltsbreite ziehen.
 */
.wmy-account .woocommerce-MyAccount-navigation .is-active > a {
	box-shadow: inset 3px 0 0 var(--wp--preset--color--primary);
	font-weight: 700;
}

.wmy-account .woocommerce > .woocommerce-form-login,
.wmy-account .woocommerce > .woocommerce-ResetPassword {
	max-width: 28rem;
}

/*
 * Ergebniszeile über Produktlisten (Zähler + Sortierung): Ollies Templates
 * setzen nowrap, das Sortier-Dropdown ist breiter als ein Phone-Viewport.
 * Gilt auch für Ollies eigenes Shop-Archiv, das wir nicht überschreiben.
 */
.wp-block-group:has(> .wc-block-catalog-sorting) {
	flex-wrap: wrap;
	row-gap: 0.75rem;
}

/* Bei 320 px war der Sortier-Block samt Formular 7 px breiter als der
   Viewport - als Flex-Element schrumpft er sonst nicht unter seinen Inhalt. */
.wc-block-catalog-sorting,
.wc-block-catalog-sorting .woocommerce-ordering,
.wc-block-catalog-sorting select {
	min-width: 0;
	max-width: 100%;
}

/* ------------------------------------------------------------------ */
/* Brand-Navigation als Off-Canvas (mobile:"drawer")                   */
/* ------------------------------------------------------------------ */

/*
 * Desktop: Inline-Liste, Button und Drawer aus. Der Drawer ist ein Popover
 * (Top-Layer), erbt die Brand-Variablen aber weiter über den DOM-Baum.
 */
.wmy-brand-nav__toggle,
.wmy-brand-nav__close {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.wmy-brand-nav__toggle:focus-visible,
.wmy-brand-nav__close:focus-visible {
	outline: 2px solid var(--wmy-header-accent);
	outline-offset: 2px;
}

.wmy-brand-nav__drawer {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(85vw, 22rem);
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium) var(--wp--preset--spacing--large);
	border: 0;
	overflow-y: auto;
	background: var(--wmy-header-bg);
	color: var(--wmy-header-text);
	font-family: var(--wmy-nav-font);
	text-transform: var(--wmy-nav-transform);
}

.wmy-brand-nav__drawer::backdrop {
	background: rgb(0 0 0 / 0.5);
}

/* Hintergrund nicht mitscrollen, solange der Drawer offen ist. */
html:has(.wmy-brand-nav__drawer:popover-open) {
	overflow: hidden;
}

.wmy-brand-nav__drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: var(--wp--preset--spacing--medium);
}

.wmy-brand-nav__drawer-head .wmy-brand-nav__close {
	display: inline-flex;
}

.wmy-brand-nav__drawer-title {
	font-weight: var(--wmy-nav-weight, 700);
	font-size: 1.25rem;
}

.wmy-brand-nav .wmy-brand-nav__drawer-list {
	flex-direction: column;
	gap: 0;
	font-size: 1.25rem;
}

.wmy-brand-nav__drawer-list a {
	display: block;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--wmy-header-muted);
	color: var(--wmy-header-text);
}

.wmy-brand-nav__drawer-list .is-current > a {
	color: var(--wmy-header-accent);
}

.wmy-brand-nav__drawer-platform {
	margin: var(--wp--preset--spacing--large) 0 0;
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: none;
}

.wmy-brand-nav__drawer-platform a {
	color: var(--wmy-header-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
	.wmy-brand-nav__drawer:popover-open {
		animation: wmy-drawer-in 0.2s ease-out;
	}

	@keyframes wmy-drawer-in {
		from {
			transform: translateX(100%);
		}
	}
}

/* ------------------------------------------------------------------ */
/* Responsiv                                                           */
/* ------------------------------------------------------------------ */

/* Brand-Menü: Umschaltpunkt wie im We-Merch-You-Header (unter 1024 px). */
@media (max-width: 1023px) {
	/* Ohne Drawer-Option bleibt es beim Ausblenden (Platz im Header). */
	.wmy-brand-header__main .wmy-brand-nav:not(.wmy-brand-nav--drawer) {
		display: none;
	}

	.wmy-brand-nav--drawer .wmy-brand-nav__inline {
		display: none;
	}

	.wmy-brand-nav--drawer .wmy-brand-nav__toggle {
		display: inline-flex;
	}

	/* Menü-Button ganz rechts, hinter Suche/Konto/Warenkorb. */
	.wmy-brand-header__main .wmy-brand-nav--drawer {
		order: 3;
	}

	/* Suche/Konto/Warenkorb rechts neben den Menü-Button statt in die Mitte
	   (die Zeile verteilt sonst per space-between). */
	.wmy-brand-header__main .wmy-brand-header__tools {
		margin-left: auto;
	}
}

@media (max-width: 781px) {
	.wmy-logo--hero {
		--wmy-logo-height: 96px;
	}
}
