/*
 * Zellseeds — visueller Layer über Astra + WooCommerce (Промт №11)
 * Quelle der Werte: Project_docs/design-spec.md — Abschnitte wie unten zitiert.
 * Reihenfolge im Enqueue: tokens.css -> fonts.css -> theme.css -> (filters.css, nur Shop-Kontext).
 */

/* =========================================================================
   0. Basis / Typografie global
   ========================================================================= */

body {
	background: var(--zs-bg);
	color: var(--zs-ink);
	font-family: var(--zs-font-text);
	font-size: var(--zs-fs-body);
	line-height: 1.5;
}

h1, h2, h3,
.entry-title,
.woocommerce-loop-product__title,
.product_title {
	font-family: var(--zs-font-display);
	color: var(--zs-ink);
	line-height: 1.15;
}

h1, .ast-woocommerce-container .page-title { font-size: var(--zs-fs-h1); font-weight: 600; }
h2 { font-size: var(--zs-fs-h2); font-weight: 600; }
h3 { font-size: var(--zs-fs-h3); font-weight: 500; }

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

.ast-container { max-width: var(--zs-container-max); }

/* Tabellarische Ziffern für Zahlen (Preise, Kenndaten) — §1.2 */
.price,
.zs-plaketten,
.woocommerce-Price-amount {
	font-variant-numeric: tabular-nums;
}

/* =========================================================================
   1. Header — §2
   ========================================================================= */

#masthead {
	background: var(--zs-surface);
	border-bottom: 1px solid var(--zs-border);
	position: sticky;
	top: 0;
	z-index: 500;
	transition: box-shadow 150ms ease;
}
#masthead.zs-is-scrolled {
	box-shadow: var(--zs-shadow-card);
}

.ast-primary-header-bar,
#masthead .main-header-bar {
	min-height: 72px;
}

/* Logo — Wortmarke bis SVG-Logo vorliegt (§13 Punkt 1) */
.site-title,
.site-title a {
	font-family: var(--zs-font-display);
	font-weight: 600;
	color: var(--zs-primary) !important;
	font-size: 1.5rem;
	letter-spacing: 0.01em;
}
.site-header-focus-item.ast-header-account,
.site-description { display: none; }

/* Primary-Menü (menu-1, zentriert) */
#masthead .main-header-menu > .menu-item > a,
#masthead .main-header-menu .menu-link {
	font-family: var(--zs-font-text);
	font-weight: 500;
	color: var(--zs-ink);
	text-transform: none;
}
#masthead .main-header-menu > .menu-item > a:hover,
#masthead .main-header-menu > .current-menu-item > a {
	color: var(--zs-primary);
}
#masthead .main-header-menu .sub-menu {
	background: var(--zs-surface);
	box-shadow: var(--zs-shadow-modal);
	border-radius: var(--zs-radius-md);
	border: 1px solid var(--zs-border);
}

/* Such-Icon + Warenkorb-Icon rechts */
.ast-header-woo-cart .count,
.ast-site-header-cart .count {
	background: var(--zs-accent);
	color: var(--zs-ink) !important;
	border-radius: var(--zs-radius-pill);
	font-family: var(--zs-font-text);
	font-weight: 600;
}

@media (max-width: 1023px) {
	.ast-primary-header-bar,
	#masthead .main-header-bar {
		min-height: 56px;
	}
	.site-title, .site-title a { font-size: 1.125rem; }
}

/* =========================================================================
   2. Footer — §3 (custom Markup über astra_footer_html_1, siehe functions.php)
   ========================================================================= */

#colophon,
.site-footer,
.footer-primary,
.footer-primary-content-in {
	background: var(--zs-primary);
	color: var(--zs-bg);
}
#colophon a { color: var(--zs-bg); }
#colophon a:hover { color: var(--zs-accent); }

.zs-footer {
	max-width: var(--zs-container-max);
	margin: 0 auto;
	padding: var(--zs-space-8) var(--zs-space-5) var(--zs-space-5);
}
.zs-footer-cols {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--zs-space-6);
}
.zs-footer-col h3 {
	font-family: var(--zs-font-text);
	font-size: var(--zs-fs-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--zs-bg);
	margin: 0 0 var(--zs-space-3);
}
.zs-footer-col ul { list-style: none; margin: 0; padding: 0; }
.zs-footer-col li { margin-bottom: var(--zs-space-2); }
.zs-footer-logo {
	font-family: var(--zs-font-display);
	font-weight: 600;
	color: var(--zs-bg);
	font-size: 1.25rem;
	margin-bottom: var(--zs-space-5);
	display: block;
}

.zs-footer-legal {
	margin-top: var(--zs-space-7);
	padding-top: var(--zs-space-5);
	border-top: 1px solid rgba(247, 245, 240, 0.2);
	font-size: var(--zs-fs-small);
	color: var(--zs-bg);
	display: flex;
	flex-direction: column;
	gap: var(--zs-space-1);
}
.zs-footer-copyright {
	margin-top: var(--zs-space-4);
	font-size: var(--zs-fs-micro);
	opacity: 0.8;
}

@media (max-width: 767px) {
	.zs-footer-cols {
		grid-template-columns: 1fr;
		gap: var(--zs-space-5);
	}
}

/* =========================================================================
   3. Home — §4
   ========================================================================= */

.zs-hero {
	background: var(--zs-bg);
	padding: var(--zs-space-9) var(--zs-space-5);
	text-align: center;
	max-height: 70vh;
}
.zs-hero-inner { max-width: 760px; margin: 0 auto; }
.zs-hero h1 {
	font-size: var(--zs-fs-display);
	font-weight: 600;
	margin: 0 0 var(--zs-space-4);
}
.zs-hero p {
	font-size: 1.125rem;
	color: var(--zs-text-secondary);
	margin: 0 0 var(--zs-space-6);
}

.zs-btn {
	display: inline-block;
	background: var(--zs-primary);
	color: #fff;
	font-weight: 600;
	padding: var(--zs-space-3) var(--zs-space-6);
	border-radius: var(--zs-radius-sm);
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background-color 150ms ease, box-shadow 150ms ease;
	min-height: 44px;
}
.zs-btn:hover { background: #163b2c; color: #fff; }
.zs-btn-secondary {
	background: var(--zs-surface);
	color: var(--zs-ink);
	border: 1px solid var(--zs-border);
}
.zs-btn-secondary:hover { background: var(--zs-neutral-tint); color: var(--zs-ink); }
.zs-btn-text {
	background: none;
	border: none;
	color: var(--zs-ink);
	text-decoration: underline;
	padding: var(--zs-space-2) 0;
	cursor: pointer;
}

.zs-section { max-width: var(--zs-container-max); margin: 0 auto; padding: var(--zs-space-8) var(--zs-space-5); }
.zs-section h2 { text-align: center; margin: 0 0 var(--zs-space-6); }

.zs-cat-grid,
.zs-warum-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--zs-space-5);
}
.zs-cat-card,
.zs-ratgeber-card {
	background: var(--zs-surface);
	border-radius: var(--zs-radius-md);
	box-shadow: var(--zs-shadow-card);
	padding: var(--zs-space-5);
	transition: box-shadow 150ms ease;
	display: block;
	text-decoration: none;
	color: var(--zs-ink);
}
.zs-cat-card:hover,
.zs-ratgeber-card:hover { box-shadow: var(--zs-shadow-card-hover); color: var(--zs-ink); }
.zs-cat-card-media {
	background: var(--zs-primary-tint);
	border-radius: var(--zs-radius-sm);
	aspect-ratio: 4 / 3;
	margin-bottom: var(--zs-space-4);
}
.zs-cat-card h3 { margin: 0 0 var(--zs-space-2); }
.zs-cat-card p { color: var(--zs-text-secondary); font-size: var(--zs-fs-small); margin: 0 0 var(--zs-space-3); }
.zs-cat-card-arrow { color: var(--zs-primary); font-weight: 600; }

.zs-warum-item { text-align: center; padding: var(--zs-space-4); }
.zs-warum-icon { font-size: 1.75rem; margin-bottom: var(--zs-space-3); }
.zs-warum-item h3 { font-family: var(--zs-font-text); font-size: var(--zs-fs-small); font-weight: 600; margin: 0 0 var(--zs-space-2); }
.zs-warum-item p { font-size: var(--zs-fs-small); color: var(--zs-text-secondary); margin: 0; }

.zs-seedbanks-block {
	background: var(--zs-primary-tint);
	border-radius: var(--zs-radius-md);
	padding: var(--zs-space-7);
	text-align: center;
	max-width: 760px;
	margin: 0 auto;
}

.zs-ratgeber-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--zs-space-5); }
.zs-ratgeber-placeholder {
	background: var(--zs-surface);
	border: 1px dashed var(--zs-border);
	border-radius: var(--zs-radius-md);
	padding: var(--zs-space-6);
	text-align: center;
	color: var(--zs-text-secondary);
	grid-column: 1 / -1;
}

.zs-trust-block {
	background: var(--zs-primary-tint);
	padding: var(--zs-space-6) var(--zs-space-5);
}
.zs-trust-grid {
	max-width: var(--zs-container-max);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--zs-space-5);
	text-align: center;
}
.zs-trust-item { font-size: var(--zs-fs-small); }
.zs-trust-icon { font-size: 1.25rem; margin-bottom: var(--zs-space-2); }

.zs-seo-text {
	max-width: 720px;
	margin: 0 auto;
	padding: var(--zs-space-8) var(--zs-space-5);
	font-size: var(--zs-fs-body);
}
.zs-seo-text h2 { text-align: left; font-size: var(--zs-fs-h2); }

@media (max-width: 767px) {
	.zs-cat-grid, .zs-warum-grid, .zs-ratgeber-grid { grid-template-columns: 1fr; }
	.zs-trust-grid { grid-template-columns: repeat(2, 1fr); }
	.zs-hero { padding: var(--zs-space-7) var(--zs-space-4); }
}

/* =========================================================================
   4. Shop / Kategorie / Marke — §5, §6
   ========================================================================= */

.zs-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--zs-space-4);
	margin-bottom: var(--zs-space-5);
	flex-wrap: wrap;
}
.woocommerce-result-count { order: 1; margin: 0; color: var(--zs-text-secondary); font-size: var(--zs-fs-small); }
.woocommerce-ordering { order: 3; margin-left: auto; }
.zs-filter-toggle { order: 2; }

.woocommerce-ordering select,
.zs-filter-toggle,
#zs-filter-toggle {
	border: 1px solid var(--zs-border);
	border-radius: var(--zs-radius-sm);
	background: var(--zs-surface);
	color: var(--zs-ink);
	padding: var(--zs-space-2) var(--zs-space-3);
	font-family: var(--zs-font-text);
	font-size: var(--zs-fs-small);
	min-height: 44px;
}

ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: var(--zs-space-5) !important;
}
@media (min-width: 768px) { ul.products { grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 1024px) { ul.products { grid-template-columns: repeat(4, 1fr) !important; } }

ul.products li.product {
	background: var(--zs-surface);
	border-radius: var(--zs-radius-md);
	box-shadow: var(--zs-shadow-card);
	padding: var(--zs-space-4);
	margin: 0 !important;
	transition: box-shadow 150ms ease;
	width: 100% !important;
	display: flex;
	flex-direction: column;
}
ul.products li.product:hover,
ul.products li.product:focus-within { box-shadow: var(--zs-shadow-card-hover); }
ul.products li.product .woocommerce-loop-product__title { font-size: var(--zs-fs-h3); margin: var(--zs-space-2) 0; }
ul.products li.product .price { font-family: var(--zs-font-display); font-weight: 600; color: var(--zs-ink); }
ul.products li.product .button {
	width: 100%;
	background: var(--zs-primary);
	color: #fff;
	border-radius: var(--zs-radius-sm);
	min-height: 44px;
	margin-top: auto;
}
ul.products li.product .button:hover { background: #163b2c; }

/* Typ-Plakette (Pille) — brand-identity.md §5, direkt auf der Karte */
.zs-plaketten { display: flex; flex-wrap: wrap; gap: var(--zs-space-2); }

/* Sidebar / Filter-Panel — §5.2 */
#secondary.widget-area,
.astra-woo-shop-sidebar {
	background: var(--zs-surface);
	border-radius: var(--zs-radius-md);
	border: 1px solid var(--zs-border);
	padding: var(--zs-space-5);
}
#secondary .widget-title {
	font-family: var(--zs-font-text);
	font-size: var(--zs-fs-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--zs-ink);
}
#secondary input[type="checkbox"] { accent-color: var(--zs-primary); width: 18px; height: 18px; }

/* Paginierung */
.woocommerce-pagination { text-align: center; margin-top: var(--zs-space-6); }
.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
	border-radius: var(--zs-radius-sm);
	color: var(--zs-ink);
}
.woocommerce-pagination .page-numbers li .current { background: var(--zs-primary); color: #fff; }

/* Leerer Zustand — woocommerce/loop/no-products-found.php */
.zs-empty-state {
	text-align: center;
	padding: var(--zs-space-8) var(--zs-space-5);
	max-width: 480px;
	margin: 0 auto;
	grid-column: 1 / -1;
}
.zs-empty-state-icon { font-size: 2.5rem; margin-bottom: var(--zs-space-4); opacity: 0.6; }
.zs-empty-state p { color: var(--zs-text-secondary); margin-bottom: var(--zs-space-5); }

/* Kategorie-Anonce/Haupttext (§5.5) */
.zs-cat-anonce { color: var(--zs-text-secondary); margin-bottom: var(--zs-space-6); }
.zs-cat-maintext {
	max-width: 720px;
	margin: var(--zs-space-8) auto 0;
}

@media (max-width: 767px) {
	.zs-shop-toolbar { gap: var(--zs-space-2); }
	.woocommerce-result-count { order: 3; width: 100%; text-align: center; margin-top: var(--zs-space-2); }
}

/* =========================================================================
   5. Produktkarte — §7 (nur visueller Layer, Struktur unverändert)
   ========================================================================= */

.single-product .zs-plaketten li {
	background: var(--zs-neutral-tint);
	border-radius: var(--zs-radius-sm);
	color: var(--zs-ink);
	font-size: var(--zs-fs-small);
	padding: var(--zs-space-2) var(--zs-space-3);
}

.single-product .woocommerce-tabs ul.tabs {
	display: flex;
	gap: var(--zs-space-5);
	border-bottom: 1px solid var(--zs-border);
	overflow-x: auto;
	list-style: none;
	padding: 0;
}
.single-product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; white-space: nowrap; }
.single-product .woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: var(--zs-space-3) 0;
	font-weight: 500;
	color: var(--zs-text-secondary);
	border-bottom: 2px solid transparent;
}
.single-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--zs-ink);
	border-bottom-color: var(--zs-primary);
}

.single-product .zs-warum-block h3 { font-size: var(--zs-fs-h3); }
.single-product .zs-vorteile li::marker { color: var(--zs-primary); }

/* Packungsgrößen-Pillen (Variationen) */
.single-product .variations select,
.single-product ul.zs-packung-pillen {
	display: flex;
	gap: var(--zs-space-2);
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
}
.single-product .zs-altershinweis {
	font-size: var(--zs-fs-small);
	color: var(--zs-text-secondary);
	margin-top: var(--zs-space-2);
}

/* Breadcrumb (§8) — woocommerce_breadcrumb() Standard-HTML */
.woocommerce-breadcrumb {
	font-size: var(--zs-fs-small);
	color: var(--zs-text-secondary);
	margin-bottom: var(--zs-space-5);
}
.woocommerce-breadcrumb a { color: var(--zs-text-secondary); }
@media (max-width: 767px) {
	.woocommerce-breadcrumb .zs-crumb-hide { display: none; }
}

/* =========================================================================
   6. Warenkorb / Checkout / 404 / Age-Gate / Cookie — §9
   ========================================================================= */

.woocommerce-cart table.cart,
.woocommerce-checkout table.shop_table { border-radius: var(--zs-radius-md); overflow: hidden; }

.zs-empty-cart { text-align: center; padding: var(--zs-space-8) var(--zs-space-5); }
.zs-empty-cart-icon { font-size: 2.5rem; margin-bottom: var(--zs-space-4); opacity: 0.6; }

.woocommerce-checkout .col2-set { display: flex; gap: var(--zs-space-7); flex-wrap: wrap; }
.woocommerce-checkout .col-1 { flex: 1 1 55%; }
.woocommerce-checkout #order_review { flex: 1 1 35%; min-width: 280px; }
@media (min-width: 1024px) {
	.woocommerce-checkout #order_review { position: sticky; top: calc(72px + var(--zs-space-5)); align-self: flex-start; }
}
.woocommerce-checkout #place_order {
	background: var(--zs-primary);
	width: 100%;
	min-height: 48px;
	font-weight: 600;
}
@media (max-width: 767px) {
	.woocommerce-checkout #place_order {
		position: sticky;
		bottom: 0;
		z-index: 10;
	}
}

.zs-404 {
	text-align: center;
	padding: var(--zs-space-9) var(--zs-space-5);
	max-width: 480px;
	margin: 0 auto;
}
.zs-404-icon { font-size: 3rem; margin-bottom: var(--zs-space-4); opacity: 0.6; }

/* Age-Gate — Farben werden im WPCode-Snippet direkt mit Token-Hexwerten gepflegt (kein externer CSS-Hook auf Inline-Styles) */
#zs-age-gate .zs-age-card {
	background: var(--zs-surface);
	border-radius: var(--zs-radius-md);
	box-shadow: var(--zs-shadow-modal);
}

/* Cookie-Banner (Complianz) — dokumentierte CSS-Variablen der Plugin-eigenen API */
.cmplz-cookiebanner {
	--cmplz_banner_background_color: var(--zs-surface) !important;
	--cmplz_text_color: var(--zs-ink) !important;
	--cmplz_banner_border_color: var(--zs-border) !important;
	--cmplz_banner_border_radius: 0px !important;
	--cmplz_button_accept_background_color: var(--zs-primary) !important;
	--cmplz_button_accept_text_color: #ffffff !important;
	--cmplz_button_deny_background_color: var(--zs-surface) !important;
	--cmplz_button_deny_text_color: var(--zs-ink) !important;
	font-family: var(--zs-font-text) !important;
}
.cmplz-cookiebanner .cmplz-btn.cmplz-deny {
	border: 1px solid var(--zs-border) !important;
}
.cmplz-cookiebanner .cmplz-btn {
	border-radius: var(--zs-radius-sm) !important;
	min-height: 44px;
}

/* =========================================================================
   7. Zustände / Barrierefreiheit — §10 (global)
   ========================================================================= */

a, button, input, select, textarea,
.zs-btn, .zs-cat-card, .woocommerce-loop-product__link {
	transition: box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
}

*:focus-visible {
	outline: 2px solid var(--zs-primary);
	outline-offset: 2px;
}

button:disabled,
input:disabled,
.button.disabled,
.zs-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.button.loading,
.added_to_cart.zs-loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}
.button.loading::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: zs-spin 600ms linear infinite;
}
@keyframes zs-spin { to { transform: rotate(360deg); } }
