/*
Theme Name:   Astra Child
Template:     astra
Description:  Child-Theme für Astra – eigene Anpassungen hier, bleiben bei Astra-Updates erhalten.
Version:      1.0.0
Text Domain:  astra-child
*/

/* Eigenes CSS hier einfügen */

/* ---------- Schrift: Clarity City (lokal, SIL OFL 1.1 – siehe fonts/LICENSE.txt) ---------- */
@font-face {
	font-family: 'Clarity City';
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	src: url('fonts/ClarityCity-Regular.woff2') format('woff2');
}
@font-face {
	font-family: 'Clarity City';
	font-weight: 500;
	font-style: normal;
	font-display: swap;
	src: url('fonts/ClarityCity-Medium.woff2') format('woff2');
}
@font-face {
	font-family: 'Clarity City';
	font-weight: 600;
	font-style: normal;
	font-display: swap;
	src: url('fonts/ClarityCity-SemiBold.woff2') format('woff2');
}
@font-face {
	font-family: 'Clarity City';
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	src: url('fonts/ClarityCity-Bold.woff2') format('woff2');
}

body,
button,
input,
select,
textarea,
.button,
.elementor-widget-heading .elementor-heading-title,
.elementor-button,
.site-title,
h1, h2, h3, h4, h5, h6 {
	font-family: 'Clarity City', sans-serif;
}

/* ---------- Sticky Navigation ---------- */
#masthead.site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: #fff;
	transition: box-shadow .2s;
}

.admin-bar #masthead.site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar #masthead.site-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	/* WP-Adminleiste scrollt auf kleinen Handys mit – dann oben andocken */
	.admin-bar #masthead.site-header {
		top: 0;
	}
}

/* ---------- Produktseite: Mengenzähler + Warenkorb-Button ---------- */
.woocommerce div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
}

.woocommerce .quantity {
	display: inline-flex !important;
	align-items: stretch;
	height: 52px;
	margin: 0 !important;
	border: 1px solid #e2ddd5;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}

.woocommerce .quantity .ast-qty-placeholder,
.woocommerce .quantity .minus,
.woocommerce .quantity .plus {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--ast-global-color-2) !important;
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}

.woocommerce .quantity .ast-qty-placeholder:hover {
	background: #f7f1ea !important;
	color: var(--ast-global-color-0) !important;
}

.woocommerce .quantity input.qty {
	width: 48px !important;
	height: auto !important;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-left: 1px solid #e2ddd5 !important;
	border-right: 1px solid #e2ddd5 !important;
	border-radius: 0 !important;
	background: #fff;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.woocommerce div.product form.cart .single_add_to_cart_button {
	flex: 1 1 220px;
	max-width: 340px;
	height: 52px;
	margin: 0 !important;
	padding: 0 28px !important;
	border-radius: 8px !important;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: none !important;
	box-shadow: none !important;
	transition: background-color .2s;
}

.woocommerce div.product form.cart .single_add_to_cart_button::before {
	content: "";
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-right: 10px;
	vertical-align: -3px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Keine Trennlinie unter Zähler und Button */
.woocommerce div.product form.cart,
.woocommerce div.product .product_meta {
	border-top: 0 !important;
	border-bottom: 0 !important;
}

@media (max-width: 544px) {
	.woocommerce div.product form.cart .single_add_to_cart_button {
		max-width: none;
	}
}

/* Warenkorb: gleicher Zähler, etwas kompakter */
.woocommerce-cart .quantity {
	height: 44px;
}

/* ---------- Mobil-Header: Warenkorb rechts in der Ecke, Zähler nicht abschneiden ---------- */
@media (max-width: 921px) {
	.ast-mobile-header-wrap .site-header-primary-section-right .ast-header-woo-cart {
		margin-right: 8px;
	}
}

/* ---------- Newsletter-Anmeldung (Startseite) ---------- */
#wf-newsletter .tnp-subscription {
	max-width: 520px;
	margin: 0 auto;
}
#wf-newsletter .tnp-subscription form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
#wf-newsletter .tnp-field-email {
	flex: 1 1 260px;
	margin: 0;
}
#wf-newsletter .tnp-field-email label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
#wf-newsletter .tnp-subscription input.tnp-email {
	height: 52px;
	padding: 0 16px;
	border: 1px solid #e2ddd5;
	border-radius: 8px;
	background: #fff;
	font-size: 16px;
}
#wf-newsletter .tnp-field-button {
	flex: 0 0 auto;
	margin: 0;
}
#wf-newsletter .tnp-subscription input.tnp-submit {
	height: 52px;
	padding: 0 28px;
	border-radius: 8px;
	background: var(--ast-global-color-0);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: none;
	transition: opacity .2s;
}
#wf-newsletter .tnp-subscription input.tnp-submit:hover {
	opacity: .9;
}
#wf-newsletter .tnp-privacy-field {
	order: 3;
	flex-basis: 100%;
	margin: 4px 0 0;
	color: #6b6259;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}
#wf-newsletter .tnp-privacy-field a {
	color: inherit;
	text-decoration: none;
}
#wf-newsletter .tnp-privacy-field a:hover {
	text-decoration: underline;
}
@media (max-width: 544px) {
	#wf-newsletter .tnp-field-button,
	#wf-newsletter .tnp-subscription input.tnp-submit {
		width: 100%;
	}
}
