/**
 * Grundlegende Layout-Bausteine fuer das Ritter-PoC-Theme.
 *
 * Bewusst schlank, kein Anspruch auf Pixelgenauigkeit. Ziel ist eine
 * funktionale Grundstruktur fuer Header, Navigation, Footer, Shop-Archiv und
 * Produktdetail (siehe docs/poc-eigenes-theme.md).
 *
 * Seit Issue #115 strukturell an das Design-ZIP-Geruest angenaehert (siehe
 * docs/poc-design-zip-theme-integration.md). Farbwerte unten entsprechen dem
 * im ZIP dokumentierten "Briefing v0.2" (Ritter-Blau #0030A0) -- damit wird
 * der in Issue #107 offen gelassene Konflikt zu der aelteren, aus dem
 * Live-Logo abgeleiteten Farbe #235ba8 zugunsten der neueren, ausdruecklich
 * als verbindlich bezeichneten Quelle aufgeloest. Keine Bild-, Icon- oder
 * Font-Dateien aus dem ZIP uebernommen (Lizenzstatus ungeklaert) --
 * Font-Stacks unten sind bewusst nur benannte Fallbacks, keine eingebundenen
 * Webfonts. Kein Flatsome-Code, keine Flatsome-Klassen/-Werte.
 */

:root {
	--wr-color-primary: #0030A0;
	--wr-color-primary-hover: #032982;
	--wr-color-navy: #081430;
	--wr-color-navy-900: #0B1D47;
	--wr-color-success: #627D47;
	--wr-color-sale: #B20000;
	--wr-color-text: #1A1A1A;
	--wr-color-text-body: #676767;
	--wr-color-text-muted: #6F6F6F;
	--wr-color-border: #E7EAEE;
	--wr-color-base: #FFFFFF;
	--wr-radius-card: 16px;
	--wr-radius-pill: 999px;
	--wr-font-display: Georgia, 'Times New Roman', serif; /* Platzhalter fuer Old Standard TT, offen fuer #86 */
	--wr-font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif; /* Platzhalter fuer Quattrocento Sans, offen fuer #86 */
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var( --wr-font-sans );
	color: var( --wr-color-text-body );
}

a {
	color: var( --wr-color-text );
}

a:hover {
	color: var( --wr-color-primary );
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 1px, 1px, 1px, 1px );
}

/* Promo-Leiste */
.ritter-poc-promo-bar {
	background: var( --wr-color-navy );
	color: var( --wr-color-base );
	text-align: center;
	padding: 0.5rem 1rem;
	font-size: 0.8rem;
	font-weight: 700;
}

.ritter-poc-promo-bar p {
	margin: 0;
}

/* Header */
.ritter-poc-header {
	border-bottom: 1px solid var( --wr-color-border );
	background: var( --wr-color-base );
}

.ritter-poc-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 1rem 1.5rem;
	max-width: 1240px;
	margin: 0 auto;
}

.ritter-poc-logo,
.ritter-poc-logo-placeholder {
	font-weight: bold;
	font-size: 1.25rem;
	font-family: var( --wr-font-display );
	color: var( --wr-color-text );
	text-decoration: none;
}

.ritter-poc-nav-primary ul,
.ritter-poc-nav-fallback,
.ritter-poc-footer-legal-links,
.ritter-poc-footer-links {
	display: flex;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ritter-poc-nav-primary a,
.ritter-poc-nav-fallback a {
	font-weight: 700;
	font-size: 0.9rem;
}

.ritter-poc-header-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.ritter-poc-shop-link,
.ritter-poc-cart-link {
	font-weight: 700;
	font-size: 0.9rem;
	white-space: nowrap;
}

.ritter-poc-cart-count {
	color: var( --wr-color-text-muted );
}

/* Mobile-Nav-Toggle */
.ritter-poc-nav-toggle {
	display: none;
	background: none;
	border: 1px solid var( --wr-color-border );
	border-radius: var( --wr-radius-pill );
	padding: 0.5rem 0.75rem;
	cursor: pointer;
}

.ritter-poc-nav-toggle-bar,
.ritter-poc-nav-toggle-bar::before,
.ritter-poc-nav-toggle-bar::after {
	display: block;
	width: 20px;
	height: 2px;
	background: var( --wr-color-text );
	content: '';
}

.ritter-poc-nav-toggle-bar {
	position: relative;
}

.ritter-poc-nav-toggle-bar::before {
	position: absolute;
	top: -6px;
}

.ritter-poc-nav-toggle-bar::after {
	position: absolute;
	top: 6px;
}

.ritter-poc-nav-mobile {
	display: none;
}

.ritter-poc-nav-mobile.is-open {
	display: block;
	padding: 0.5rem 1.5rem 1rem;
}

.ritter-poc-nav-mobile ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

@media ( max-width: 767px ) {
	.ritter-poc-nav-toggle {
		display: inline-flex;
		align-items: center;
		order: -1;
	}

	.ritter-poc-nav-primary {
		display: none;
	}
}

/* Shop-Archiv / Produktkarten */
ul.products {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 240px, 1fr ) );
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 1.5rem;
	max-width: 1240px;
	margin-inline: auto;
}

ul.products li.product {
	border: 1px solid var( --wr-color-border );
	border-radius: var( --wr-radius-card );
	padding: 0;
	overflow: hidden;
	background: var( --wr-color-base );
	position: relative;
}

ul.products li.product.outofstock {
	opacity: 0.6;
}

ul.products li.product.outofstock::after {
	content: 'Ausverkauft';
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: var( --wr-color-text );
	color: var( --wr-color-base );
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 0.2rem 0.6rem;
	border-radius: var( --wr-radius-pill );
}

ul.products li.product .onsale {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	background: var( --wr-color-sale );
	color: var( --wr-color-base );
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 0.2rem 0.6rem;
	border-radius: var( --wr-radius-pill );
	z-index: 1;
}

ul.products li.product > a {
	display: block;
	color: inherit;
	text-decoration: none;
	padding: 0 1.25rem 1rem;
}

ul.products li.product > a img {
	display: block;
	width: 100%;
	min-height: 200px;
	object-fit: contain;
	background: linear-gradient( 180deg, #FCFCFD 0%, #E7EBF0 100% );
	border-radius: 0 0 var( --wr-radius-card ) var( --wr-radius-card );
	margin: 0 -1.25rem 1rem;
	padding: 1.25rem;
	width: calc( 100% + 2.5rem );
	max-width: none;
}

.woocommerce-loop-product__title {
	font-family: var( --wr-font-display );
	font-size: 1.1rem;
	color: var( --wr-color-text );
	margin: 0 0 0.25rem;
}

ul.products li.product .price {
	font-weight: 700;
	color: var( --wr-color-text );
}

ul.products li.product .button {
	display: block;
	text-align: center;
	margin: 0 1.25rem 1.25rem;
	background: var( --wr-color-primary );
	color: var( --wr-color-base );
	border-radius: var( --wr-radius-pill );
	padding: 0.6rem 1rem;
	font-weight: 700;
	text-decoration: none;
}

ul.products li.product .button:hover {
	background: var( --wr-color-primary-hover );
}

/* Produktdetail */
.wc-gzd-additional-info,
.price-unit,
.delivery-time-inner,
.woocommerce-grouped-product-list {
	display: block;
	font-size: 0.9rem;
	color: var( --wr-color-text-muted );
	margin: 0.25rem 0;
}

/* Footer */
.ritter-poc-footer {
	background: var( --wr-color-navy );
	color: var( --wr-color-base );
	padding: 2rem 1.5rem 1rem;
}

.ritter-poc-footer h2 {
	font-family: var( --wr-font-display );
	font-size: 1rem;
	color: var( --wr-color-base );
	margin: 0 0 0.75rem;
}

.ritter-poc-footer-columns {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 1.5rem;
	max-width: 1240px;
	margin: 0 auto 1.5rem;
}

.ritter-poc-footer a {
	color: rgba( 255, 255, 255, 0.85 );
}

.ritter-poc-footer a:hover {
	color: var( --wr-color-base );
}

.ritter-poc-footer-links,
.ritter-poc-footer-legal-links {
	flex-direction: column;
	gap: 0.5rem;
}

.ritter-poc-footer-contact-placeholder,
.ritter-poc-footer-placeholder-note {
	font-size: 0.85rem;
	color: rgba( 255, 255, 255, 0.6 );
}

.ritter-poc-footer-shipping-link {
	display: inline-block;
	margin-top: 0.5rem;
}

.ritter-poc-footer-newsletter {
	max-width: 1240px;
	margin: 0 auto;
	padding-top: 1rem;
	border-top: 1px solid rgba( 255, 255, 255, 0.14 );
	font-size: 0.85rem;
}

.ritter-poc-footer-copyright {
	max-width: 1240px;
	margin: 1rem auto 0;
	text-align: left;
	font-size: 0.75rem;
	color: rgba( 255, 255, 255, 0.6 );
}

@media ( max-width: 1024px ) {
	.ritter-poc-footer-columns {
		grid-template-columns: 1fr 1fr;
	}
}

@media ( max-width: 767px ) {
	.ritter-poc-footer-columns {
		grid-template-columns: 1fr;
	}

	ul.products {
		grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
		gap: 1rem;
		padding: 1rem;
	}
}
