/**
 * Shop – gemeinsame Bausteine: Preise, Lagerstatus, Menge, Tabellen,
 * Formularzeilen, Pflichtfeld-Markierung.
 *
 * WooCommerce-Standard-CSS ist abgeschaltet; hier steht alles, was
 * WooCommerce-Markup braucht – ohne !important und ohne Klassen-Ketten.
 */
.woocommerce-Price-amount bdi {
	white-space: nowrap;
}

.price del {
	color: var(--theme-text-muted);
	font-size: 0.7em;
	margin-inline-end: var(--space-2);
}

.price ins {
	text-decoration: none;
}

.woocommerce-price-suffix {
	color: var(--theme-text-muted);
	font-family: var(--font-family-body);
	font-size: var(--font-size-small);
}

.woocommerce-price-suffix a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

/* Lagerstatus */
.stock {
	font-size: var(--font-size-small);
	font-weight: var(--font-weight-medium);
	margin-block: var(--space-3);
}

.stock.out-of-stock {
	color: var(--theme-notice-error);
}

.stock.in-stock,
.stock.available-on-backorder {
	color: var(--theme-notice-success);
}

/* Menge */
.quantity {
	display: inline-flex;
}

.quantity .qty {
	inline-size: 5rem;
	text-align: center;
}

/* Pflichtfeld-Stern und „optional“ */
.required {
	color: var(--theme-input-error);
	font-weight: var(--font-weight-bold);
	text-decoration: none;
}

abbr.required[title] {
	border: 0;
	cursor: help;
	text-decoration: none;
}

.optional {
	color: var(--theme-text-muted);
	font-weight: var(--font-weight-regular);
}

/* Formularzeilen (Kasse, Konto) */
.woocommerce form .form-row {
	margin: 0 0 var(--space-5);
}

.woocommerce form .form-row .woocommerce-input-wrapper {
	display: block;
}

.woocommerce form .form-row.form-row-first,
.woocommerce form .form-row.form-row-last {
	inline-size: calc(50% - var(--space-3));
}

.woocommerce form .form-row.form-row-first {
	float: inline-start;
}

.woocommerce form .form-row.form-row-last {
	float: inline-end;
}

.woocommerce form .form-row-wide,
.woocommerce form .clear {
	clear: both;
}

.woocommerce form .form-row .description {
	color: var(--theme-text-muted);
	display: block;
	font-size: var(--font-size-small);
	margin-block-start: var(--space-2);
}

/* Inline-Fehler (WooCommerce ≥ 8.x) */
.woocommerce form .form-row .checkout-inline-error-message,
.woocommerce form .form-row [id$="-description"].woocommerce-error-message {
	color: var(--theme-input-error);
	font-size: var(--font-size-small);
	font-weight: var(--font-weight-medium);
	margin-block-start: var(--space-2);
}

.woocommerce form .form-row.woocommerce-invalid label {
	color: var(--theme-input-error);
}

/* Checkbox-Zeilen: Control links, Text (inkl. Pflichtstern) fließt daneben */
.woocommerce-form__label-for-checkbox,
.woocommerce form .form-row label.checkbox {
	cursor: pointer;
	display: block;
	font-size: var(--font-size-body);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-body);
	padding-inline-start: 2rem;
	position: relative;
}

.woocommerce-form__label-for-checkbox input,
.woocommerce form .form-row label.checkbox input {
	inset-block-start: 0.15em;
	inset-inline-start: 0;
	position: absolute;
}

/* Tabellen */
.shop_table {
	border-collapse: collapse;
	font-size: var(--font-size-body);
	inline-size: 100%;
}

.shop_table :is(th, td) {
	border-block-end: var(--border-width-thin) solid var(--theme-border);
	padding: var(--space-4) var(--space-3);
	text-align: start;
	vertical-align: middle;
}

.shop_table thead th {
	color: var(--theme-text-muted);
	font-size: var(--font-size-small);
	font-weight: var(--font-weight-medium);
	letter-spacing: var(--letter-spacing-wide);
	text-transform: uppercase;
}

.shop_table :is(th, td):first-child {
	padding-inline-start: 0;
}

.shop_table :is(th, td):last-child {
	padding-inline-end: 0;
}

/* Responsive Tabellen: Zeilen werden mobil zu Karten mit Feldnamen */
@media (max-width: 48.75em) {
	.shop_table_responsive thead {
		display: none;
	}

	.shop_table_responsive :is(tbody, tr, td, th) {
		display: block;
	}

	.shop_table_responsive tbody tr {
		border-block-end: var(--border-width-thin) solid var(--theme-border);
		padding-block: var(--space-3);
	}

	.shop_table_responsive tbody :is(td, th) {
		align-items: center;
		border: 0;
		display: flex;
		gap: var(--space-4);
		justify-content: space-between;
		padding: var(--space-2) 0;
		text-align: end;
	}

	.shop_table_responsive tbody td[data-title]::before {
		color: var(--theme-text-muted);
		content: attr(data-title);
		font-size: var(--font-size-small);
		font-weight: var(--font-weight-medium);
		text-align: start;
	}

	.shop_table_responsive tbody td.actions::before,
	.shop_table_responsive tbody td.product-remove::before,
	.shop_table_responsive tbody td.product-thumbnail::before {
		content: none;
	}
}

/* Systemseiten (Warenkorb, Kasse, Konto) */
.store-page {
	padding-block-start: var(--section-gap-tight);
}

.store-page__title {
	font-size: var(--font-size-title-lg);
	line-height: var(--line-height-title-lg);
	margin-block-end: var(--space-10);
	text-transform: uppercase;
}

/* Produktbereich unter der Produktseite */
.product-area {
	margin-block-start: var(--section-gap);
}

/* Paginierung */
.pagination {
	margin-block-start: var(--space-12);
}

.pagination__list {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	justify-content: center;
	margin: 0;
	padding: 0;
}

.pagination__link {
	align-items: center;
	border: var(--border-width-medium) solid transparent;
	border-radius: var(--radius-md);
	color: var(--theme-text);
	display: inline-flex;
	font-family: var(--font-family-display);
	font-size: var(--font-size-lg);
	justify-content: center;
	min-block-size: var(--size-tap);
	min-inline-size: var(--size-tap);
	padding-inline: var(--space-2);
	text-decoration: none;
	transition: border-color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard);
}

.pagination__link .icon {
	block-size: 1.25rem;
	inline-size: 1.25rem;
}

@media (hover: hover) {
	a.pagination__link:hover {
		border-color: var(--theme-accent);
	}
}

.pagination__link.current {
	background: var(--theme-btn-primary-bg);
	border-color: var(--theme-btn-primary-bg);
	color: var(--theme-btn-primary-text);
}

/* Hinweise oberhalb der Produktseite – leerer Container nimmt keinen Platz ein */
.store-notices:not(:has(.woocommerce-message, .woocommerce-info, .woocommerce-error)) {
	display: none;
}

.store-notices .woocommerce-message,
.store-notices .woocommerce-info,
.store-notices .woocommerce-error {
	margin-block-end: 0;
}
