/* Handgezeichnet – Ergänzungen zu theme.json */

/* ---------- Allgemein ---------- */

:where(.wp-site-blocks) > * {
	margin-block-start: 0;
}

a {
	text-underline-offset: 0.15em;
}

::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--foreground);
}

/* Gerahmtes Layout: weiße Seite auf hellgrauem Hintergrund */
@media (min-width: 1400px) {
	body {
		background-color: var(--wp--preset--color--grey-light);
	}

	.wp-site-blocks {
		max-width: var(--wp--custom--page-width);
		margin-inline: auto;
		background-color: var(--wp--preset--color--background);
		min-height: 100vh;
	}
}

.hg-title-line {
	border-top-width: 1px;
}

/* ---------- Header ---------- */

.hg-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

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

@media (max-width: 600px) {
	.admin-bar .hg-header {
		top: 0;
	}
}

.hg-topbar {
	gap: 1rem;
	min-height: 3.75rem;
	padding-inline: 1.75rem;
}

.hg-topbar .wp-block-social-links .wp-social-link {
	color: var(--wp--preset--color--foreground);
}

.hg-topbar .wp-block-social-links .wp-social-link:hover {
	color: var(--wp--preset--color--primary);
}

.hg-topbar__search {
	flex: 0 1 25rem;
}

.hg-topbar__search .wp-block-search__inside-wrapper {
	padding: 0;
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--grey-light);
}

.hg-topbar__search .wp-block-search__input {
	border: 0;
	padding: 0.5rem 0.75rem;
	background: transparent;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--foreground);
}

.hg-topbar__search .wp-block-search__button {
	margin: 0;
	padding: 0.375rem 0.625rem;
	background: transparent;
	color: var(--wp--preset--color--foreground);
}

.hg-topbar__search .wp-block-search__button:hover {
	background: transparent;
	color: var(--wp--preset--color--primary);
}

.hg-topbar__shop {
	gap: 1rem;
}

.hg-topbar__shop,
.hg-topbar__shop a,
.hg-topbar__shop button {
	color: var(--wp--preset--color--foreground);
}

.hg-topbar__shop .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
}

@media (max-width: 781px) {
	.hg-topbar {
		padding-inline: var(--wp--preset--spacing--30);
	}

	.hg-topbar__social {
		display: none !important;
	}

	.hg-topbar__search {
		flex: 1 1 auto;
	}
}

.hg-logo img {
	max-height: var(--wp--custom--header-height);
	width: auto;
	object-fit: contain;
}

@media (max-width: 781px) {
	.hg-logo img {
		max-height: calc(var(--wp--custom--header-height) * 0.7);
		max-width: 180px;
	}
}

.hg-navbar .wp-block-navigation-item__content {
	padding-block: 0.25rem;
	border-bottom: 2px solid transparent;
	text-decoration: none;
}

.hg-navbar .wp-block-navigation-item__content:hover,
.hg-navbar .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--foreground);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.5rem;
}

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

.hg-footer h4 {
	margin-bottom: 1.25rem;
}

.hg-footer a {
	text-decoration: none;
}

.hg-footer a:hover {
	text-decoration: underline;
}

.hg-footer__links {
	list-style: none;
	padding-left: 0;
}

.hg-footer__links li + li {
	margin-top: 0.5rem;
}

.hg-footer__sub p {
	margin: 0;
	opacity: 0.75;
}

/* ---------- Widerrufsbutton (§ 13a FAGG: gut lesbar, hervorgehoben) ---------- */

.hg-footer__withdrawal {
	margin-top: 1.25rem;
}

.hg-footer__withdrawal .eu-owb-order-withdraw-from-contract-button {
	margin: 0;
	text-align: left;
}

/* Navy statt Mint: Weiß auf Mint ist zu kontrastarm. */
.eu-owb-order-withdraw-from-contract-button a.button,
.woocommerce-form-return_request__submit.button {
	display: inline-block;
	background-color: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
	text-decoration: none;
}

.hg-footer .eu-owb-order-withdraw-from-contract-button a.button {
	color: var(--wp--preset--color--background);
}

.eu-owb-order-withdraw-from-contract-button a.button:hover,
.eu-owb-order-withdraw-from-contract-button a.button:focus-visible,
.woocommerce-form-return_request__submit.button:hover,
.woocommerce-form-return_request__submit.button:focus-visible {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}

.eu-owb-order-withdraw-from-contract-button a.button:focus-visible,
.woocommerce-form-return_request__submit.button:focus-visible {
	outline: 2px solid var(--wp--preset--color--foreground);
	outline-offset: 2px;
}

/* Social-Icons: Mint-Kreise */
.wp-block-social-links.is-style-hg-circles .wp-social-link {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	transition: opacity 0.2s;
}

.wp-block-social-links.is-style-hg-circles .wp-social-link:hover {
	opacity: 0.6;
	transform: none;
}

/* ---------- Text + Bild ---------- */

.hg-text-image .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--wp--custom--radius);
}

.hg-text-image .wp-block-column > :last-child {
	margin-bottom: 0;
}

/* ---------- Kontakt-Kacheln ---------- */

.hg-contact-cards {
	gap: 2.5rem;
}

.hg-contact-card {
	padding: 2.5rem;
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: var(--wp--custom--radius);
}

.hg-contact-card::before {
	content: "";
	display: block;
	width: 3.75rem;
	height: 3.75rem;
	margin-bottom: 2rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--grey-light);
	background-image: var(--hg-icon);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 1.5rem;
}

.hg-contact-card h4 {
	margin: 0 0 1.25rem;
}

.hg-contact-card p {
	margin: 0;
}

.hg-contact-card .hg-contact-label {
	margin-top: 1rem;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--grey-dark);
}

.hg-contact-card h4 + .hg-contact-label {
	margin-top: 0;
}

.hg-contact-card .hg-contact-value a {
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.hg-contact-card .hg-contact-value a:hover {
	color: var(--wp--preset--color--foreground);
}

.hg-icon-phone {
	--hg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23373c71' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 3h3l1.5 4.5-2 1.5a11 11 0 0 0 6 6l1.5-2 4.5 1.5v3a2 2 0 0 1-2 2A16 16 0 0 1 4.5 5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
}

.hg-icon-mail {
	--hg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23373c71' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3.5 6.5 8.5 6.5 8.5-6.5'/%3E%3C/svg%3E");
}

.hg-icon-pin {
	--hg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23373c71' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-6-6.5-11a6.5 6.5 0 0 1 13 0c0 5-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

.hg-icon-share {
	--hg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23373c71' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='2.5'/%3E%3Ccircle cx='6' cy='12' r='2.5'/%3E%3Ccircle cx='18' cy='19' r='2.5'/%3E%3Cpath d='m8.2 10.8 7.6-4.6M8.2 13.2l7.6 4.6'/%3E%3C/svg%3E");
}

/* ---------- WooCommerce: Produktlisten ---------- */

.hg-shop-banner img {
	width: 100%;
	height: auto;
}

.wc-block-grid__product,
.hg-products .wc-block-product {
	text-align: left;
}

.wc-block-grid__product-title,
.hg-products .wp-block-post-title,
.wc-block-components-product-name {
	font-family: var(--wp--preset--font-family--headings);
	font-size: 1.125rem !important;
	font-weight: 600;
	color: var(--wp--preset--color--foreground);
}

.wc-block-grid__product-link,
.hg-products .wp-block-post-title a {
	text-decoration: none;
}

.wc-block-grid__product-title {
	margin: 1.25rem 0 0.5rem;
}

.wc-block-grid__product-image img,
.wc-block-components-product-image img,
.wp-block-woocommerce-product-image img {
	border-radius: var(--wp--custom--radius);
}

.wc-block-grid__product-price,
.wp-block-woocommerce-product-price {
	color: var(--wp--preset--color--foreground);
	font-size: 1rem;
	text-align: left;
}

/* Festes 4er-Raster (WooCommerce rechnet sonst mit kleinerem Abstand und bricht auf 3 Spalten um) */
.hg-products .wc-block-product-template__responsive.columns-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 1.875rem;
	row-gap: 1rem;
}

@media (max-width: 1023px) {
	.hg-products .wc-block-product-template__responsive.columns-4 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.hg-products .wc-block-product-template__responsive.columns-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 1rem;
	}
}

.wc-block-components-product-badge,
.wc-block-grid__product-onsale {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--foreground);
	border: 0;
	border-radius: var(--wp--custom--radius);
}

/* Sortierung */
.wc-block-catalog-sorting select,
.woocommerce-ordering select {
	min-width: 16rem;
	padding: 0.625rem 2.5rem 0.625rem 1rem;
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--background) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23373c71' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.875rem center / 1rem;
	color: var(--wp--preset--color--foreground);
	font-family: inherit;
	font-size: 1rem;
	appearance: none;
}

/* ---------- WooCommerce: Produktseite ---------- */

.hg-add-to-cart form.cart {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.25rem;
	max-width: 18rem;
}

.hg-add-to-cart .quantity {
	width: 100%;
}

.hg-add-to-cart .single_add_to_cart_button {
	width: 100%;
	margin: 0 !important;
}

/* ---------- WooCommerce: Mein Konto ---------- */

.hg-account {
	--wc-form-border-color: var(--wp--preset--color--grey);
	--wc-form-border-radius: var(--wp--custom--radius);
	--wc-form-color-text: var(--wp--preset--color--foreground);
}

/* WooCommerce begrenzt die Konto-Seite sonst auf 1000px */
.woocommerce-account main .hg-account > .woocommerce {
	max-width: var(--wp--style--global--content-size);
	margin-top: var(--wp--preset--spacing--40);
}

.hg-account .u-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 3.75rem;
}

.hg-account .u-columns::before,
.hg-account .u-columns::after {
	display: none;
}

.hg-account .u-columns > .col-1,
.hg-account .u-columns > .col-2 {
	float: none;
	width: auto;
	max-width: none;
}

@media (max-width: 781px) {
	.hg-account .u-columns {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}
}

.hg-account #customer_login h2,
.hg-account .woocommerce-form-login h2 {
	margin: 0 0 0.75rem;
	font-size: var(--wp--preset--font-size--large);
}

.hg-account form.login,
.hg-account form.register,
.hg-account form.lost_reset_password {
	margin: 0;
	padding: 1.875rem;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--grey-light);
}

.hg-account .form-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
	padding: 0;
}

.hg-account label {
	font-weight: 600;
	line-height: 1.5 !important;
}

/* Pflichtfeld-Sternchen ausblenden – bleibt für Screenreader über „Erforderlich“ erhalten */
.hg-account .required {
	display: none;
}

.hg-account form .form-row .input-text {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--grey);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--background);
	font-family: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--foreground);
}

.hg-account form .form-row .input-text:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 0;
}

.hg-account .password-input {
	width: 100%;
}

/* „Angemeldet bleiben“ über dem Button */
.hg-account .woocommerce-form-login__rememberme {
	order: -1;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
}

.hg-account .woocommerce-form__input-checkbox {
	width: 1.125rem;
	height: 1.125rem;
	margin: 0;
	accent-color: var(--wp--preset--color--foreground);
}

.hg-account .woocommerce-button,
.hg-account .woocommerce-Button {
	background-color: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
}

.hg-account .woocommerce-button:hover,
.hg-account .woocommerce-Button:hover {
	background-color: var(--wp--preset--color--primary);
}

.hg-account .lost_password {
	margin: 0;
}

.hg-account .lost_password a,
.hg-account .woocommerce-privacy-policy-link {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.hg-account .lost_password a:hover,
.hg-account .woocommerce-privacy-policy-link:hover {
	color: var(--wp--preset--color--foreground);
}

.hg-account form.register > p:not(.form-row),
.hg-account .woocommerce-privacy-policy-text p {
	margin: 0 0 1.5rem;
}

/* Angemeldet: Navigation links, Inhalt rechts */
.hg-account .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hg-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--grey);
	text-decoration: none;
}

.hg-account .woocommerce-MyAccount-navigation li.is-active a,
.hg-account .woocommerce-MyAccount-navigation li a:hover {
	background: var(--wp--preset--color--grey-light);
	color: var(--wp--preset--color--foreground);
}

.woocommerce-store-notice,
p.demo_store {
	background: var(--wp--preset--color--foreground);
}
