/*
 * WooCommerce im INS-Stil. Wird nur auf dem Shop (klenner.ins-bremen.de) geladen.
 * Farben, Rundungen und Abstände kommen aus main.css.
 */

.woocommerce {
	color: var(--c-text);
}

.woocommerce-breadcrumb {
	margin: 0 0 1rem;
	color: var(--c-muted);
	font-size: 0.9rem;
}

.woocommerce-products-header__title,
.product_title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.7rem, 4vw, 2.4rem);
	line-height: 1.15;
}

/* Das Standard-Layout von WooCommerce (Floats, Prozentbreiten) wird durch das Raster unten ersetzt. */
.woocommerce div.product div.images,
.woocommerce div.product div.summary,
.woocommerce #content div.product div.images,
.woocommerce #content div.product div.summary {
	float: none;
	width: auto;
	margin: 0;
}

.woocommerce div.product div.images.woocommerce-product-gallery {
	opacity: 1 !important;
}

/* Im Shop bekommt der Inhalt die volle Breite, nicht nur die schmale Lesespalte. */
.is-shop .layout:not(.layout--sidebar) .entry,
.is-shop .entry-content > *,
.is-shop .entry-content > .alignwide {
	max-width: none;
}

.is-shop .site-main {
	padding-block: clamp(2rem, 5vw, 4rem);
}

/* Menü im Header rechts, neben den Werkzeugen */
.is-shop .site-nav__list {
	justify-content: flex-end;
}

/* Startseite: Bild und Text mittig mit Luft darüber und darunter */
.is-shop .klenner-hero {
	align-items: center;
	margin-block: clamp(1.5rem, 7vh, 4.5rem);
	gap: clamp(1.5rem, 5vw, 4rem);
}

.is-shop .klenner-hero .wp-block-image {
	max-width: 26rem;
	margin: 0 auto;
}

.is-shop .klenner-hero h1 {
	margin-bottom: 1rem;
	font-size: clamp(2rem, 5vw, 3.2rem);
	line-height: 1.1;
}

.is-shop .klenner-hero p {
	max-width: 34rem;
	font-size: 1.1rem;
}

/* Produktseite */
.woocommerce div.product {
	display: grid;
	gap: 1.5rem 3rem;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
}

@media (min-width: 52rem) {
	.woocommerce div.product {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	}

	.woocommerce div.product .woocommerce-tabs,
	.woocommerce div.product .related,
	.woocommerce div.product .upsells {
		grid-column: 1 / -1;
	}
}

.woocommerce div.product div.images img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ins-radius);
	background: var(--c-surface);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--c-heading);
	font-size: 1.4rem;
	font-weight: 700;
}

.woocommerce div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin: 1.25rem 0;
}

.woocommerce .quantity .qty {
	width: 5rem;
}

/* Knöpfe */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .wc-block-components-button:not(.is-link) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.35rem 1.1rem;
	border: 1px solid var(--c-link);
	border-radius: var(--ins-pill);
	background: var(--c-link);
	color: var(--c-on-primary);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
	border-color: var(--c-link-hover);
	background: var(--c-link-hover);
	color: var(--c-on-primary);
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
#place_order {
	border-color: var(--c-accent);
	background: var(--c-accent);
	color: var(--c-on-accent);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
#place_order:hover {
	border-color: var(--c-alt-hover);
	background: var(--c-alt-hover);
	color: var(--c-on-accent);
}

.woocommerce button.button:disabled,
.woocommerce button.button.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Formularfelder */
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce input[type="password"],
.woocommerce select,
.woocommerce textarea,
.select2-container--default .select2-selection--single {
	width: 100%;
	min-height: var(--ins-target);
	padding: 0.5rem 0.85rem;
	border: 1px solid var(--c-ui-border);
	border-radius: var(--ins-radius-sm);
	background: var(--c-surface);
	color: var(--c-text);
	font: inherit;
}

.woocommerce form .form-row {
	margin: 0 0 1rem;
}

.woocommerce form .form-row label {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
}

.woocommerce form .form-row .required {
	color: var(--c-error);
	text-decoration: none;
}

.woocommerce .quantity .qty {
	width: 5rem;
}

/* Tabellen: Warenkorb, Kasse, Bestellung */
.woocommerce table.shop_table {
	width: 100%;
	border: 1px solid var(--c-border);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--ins-radius);
	background: var(--c-surface);
	overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 0.85rem 1rem;
	border-top: 1px solid var(--c-border);
	text-align: left;
	vertical-align: middle;
}

.woocommerce table.shop_table thead th,
.woocommerce table.shop_table > tbody:first-child > tr:first-child > * {
	border-top: 0;
}

.woocommerce table.shop_table img {
	width: 4rem;
	height: auto;
	border-radius: var(--ins-radius-sm);
}

.woocommerce-cart-form .actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: space-between;
}

.woocommerce .cart-collaterals,
.woocommerce #order_review {
	margin-top: 1.5rem;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
	max-width: 44rem;
}

.woocommerce-checkout #payment {
	margin-top: 1rem;
	padding: 1rem 1.25rem;
	border-radius: var(--ins-radius);
	background: var(--c-surface-2);
}

.woocommerce-checkout #payment ul.payment_methods,
.woocommerce ul.order_details,
.woocommerce-shipping-methods {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-shipping-methods li {
	margin: 0 0 0.5rem;
}

/* Hinweise */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 1.25rem;
	padding: 0.9rem 1.15rem;
	border: 1px solid var(--c-border);
	border-radius: var(--ins-radius-sm);
	background: var(--c-accent-soft);
	color: var(--c-text);
	list-style: none;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}

.woocommerce-error {
	border-color: var(--c-error);
	background: var(--c-surface);
	color: var(--c-error);
}

.woocommerce-message .button,
.woocommerce-info .button {
	order: 2;
}

.klenner-pickup-info {
	display: block;
	margin-top: 0.5rem;
	color: var(--c-muted);
	font-size: 0.9rem;
}

/* Produktliste (Shop-Seite) */
.woocommerce ul.products {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce ul.products li.product {
	display: grid;
	gap: 0.5rem;
	align-content: start;
	padding: 1rem;
	border: 1px solid var(--c-border);
	border-radius: var(--ins-radius);
	background: var(--c-surface);
}

.woocommerce ul.products li.product img {
	width: 100%;
	height: auto;
	border-radius: var(--ins-radius-sm);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	font-size: 1.1rem;
}

/* Eingabefelder: WooCommerce setzt sie mit höherer Gewichtung auf Weiß */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .quantity .qty {
	border: 1px solid var(--c-ui-border);
	border-radius: var(--ins-radius-sm);
	background: var(--c-surface);
	color: var(--c-text);
	box-shadow: none;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
	outline: 2px solid var(--c-focus);
	outline-offset: 1px;
}

.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
	width: calc(50% - 0.5rem);
}

/* Kasse: links Adresse, rechts Bestellung */
.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2,
.woocommerce-page .col2-set .col-1,
.woocommerce-page .col2-set .col-2 {
	float: none;
	width: auto;
}

.woocommerce-checkout h3 {
	margin: 0 0 1rem;
	font-size: 1.15rem;
}

.woocommerce-checkout #ship-to-different-address {
	font-size: 1rem;
}

.woocommerce-checkout #ship-to-different-address label {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	font-weight: 600;
}

@media (min-width: 62rem) {
	.woocommerce-checkout form.checkout {
		display: grid;
		gap: 0 3rem;
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		align-items: start;
	}

	.woocommerce-checkout #customer_details {
		grid-column: 1;
		grid-row: 1;
		max-width: none;
	}

	/* Die rechte Spalte läuft beim Scrollen mit. */
	.woocommerce-checkout #order_review {
		position: sticky;
		top: 6.5rem; /* unter dem mitlaufenden Header */
		max-height: calc(100vh - 7.5rem);
		overflow-y: auto;
		grid-column: 2;
		grid-row: 1;
		margin-top: 0;
		max-width: none;
	}

	.woocommerce-checkout #order_review_heading {
		display: none;
	}

	.woocommerce-checkout .woocommerce-NoticeGroup,
	.woocommerce-checkout .woocommerce-form-login-toggle,
	.woocommerce-checkout .checkout_coupon {
		grid-column: 1 / -1;
	}
}

.woocommerce-checkout #payment {
	background: var(--c-surface-2);
}

.woocommerce-checkout #place_order {
	width: 100%;
	margin-top: 0.75rem;
	float: none;
}

.woocommerce table.shop_table {
	background: var(--c-surface);
	color: var(--c-text);
}

.woocommerce table.shop_table th {
	font-weight: 600;
}

.woocommerce-checkout .woocommerce-shipping-methods label,
.woocommerce-checkout #payment label {
	font-weight: 400;
}

.woocommerce-privacy-policy-text {
	color: var(--c-muted);
	font-size: 0.9rem;
}

/* Warenkorb */
.woocommerce-cart .cart-collaterals .cart_totals {
	float: none;
	width: auto;
	max-width: 28rem;
	margin-left: auto;
}

.woocommerce-cart .cart-collaterals .cart_totals h2 {
	font-size: 1.15rem;
}

.woocommerce-cart table.cart .product-remove a {
	color: var(--c-error);
	font-size: 1.4rem;
	text-decoration: none;
}

.woocommerce-cart table.cart td.actions .coupon {
	display: flex;
	gap: 0.5rem;
}

.woocommerce-cart table.cart td.actions .coupon .input-text {
	width: 12rem;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button {
	display: inline-flex;
	width: auto;
	min-height: 2.75rem;
	padding: 0.4rem 1.4rem;
	font-size: 0.95rem;
}

.wc-proceed-to-checkout {
	padding: 0;
}

.woocommerce table.shop_table.cart {
	width: 100%;
}

/* Das Produktbild liegt nur in 600 Pixeln vor, größer gezogen wird es unscharf. */
.woocommerce div.product div.images {
	max-width: 30rem;
}

.woocommerce-cart-form table.shop_table {
	width: 100% !important;
	display: table;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button {
	margin: 0;
	line-height: 1.2;
}

/* Rechte Spalte der Kasse: Überschrift sitzt im mitlaufenden Block */
.woocommerce-checkout #order_review::before {
	content: "Ihre Bestellung";
	display: block;
	margin-bottom: 1rem;
	font-size: 1.15rem;
	font-weight: 700;
}

@media (max-width: 61.99rem) {
	.woocommerce-checkout #order_review_heading {
		display: block;
	}

	.woocommerce-checkout #order_review::before {
		display: none;
	}
}

/* Anmerkungsfeld wie die anderen Felder */
.woocommerce form .form-row textarea.input-text,
.woocommerce-checkout #order_comments {
	display: block;
	width: 100%;
	min-height: 7rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--c-ui-border);
	border-radius: var(--ins-radius-sm);
	background: var(--c-surface);
	color: var(--c-text);
	font: inherit;
	resize: vertical;
}

.woocommerce form .form-row ::placeholder {
	color: var(--c-muted);
	opacity: 1;
}

/* Warenkorb: jede Zeile als Karte mit Bild, Titel, Menge und Entfernen */
.woocommerce-cart-form table.shop_table {
	border: 0;
	background: transparent;
	overflow: visible;
}

.woocommerce-cart-form table.shop_table thead {
	display: none;
}

.woocommerce-cart-form table.shop_table,
.woocommerce-cart-form table.shop_table tbody {
	display: block;
}

.woocommerce-cart-form table.shop_table tr.cart_item {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr) auto 2.5rem;
	gap: 0 1.25rem;
	align-items: center;
	margin-bottom: 0.75rem;
	padding: 0.85rem 1rem;
	border: 1px solid var(--c-border);
	border-radius: var(--ins-radius);
	background: var(--c-surface);
}

.woocommerce-cart-form table.shop_table tr.cart_item td {
	display: block;
	padding: 0;
	border: 0;
}

.woocommerce-cart-form table.shop_table td.product-thumbnail {
	grid-column: 1;
	grid-row: 1;
}

.woocommerce-cart-form table.shop_table td.product-thumbnail img {
	display: block;
	width: 5.5rem;
	height: auto;
	border-radius: var(--ins-radius-sm);
}

.woocommerce-cart-form table.shop_table td.product-name {
	grid-column: 2;
	grid-row: 1;
	font-size: 1.05rem;
	font-weight: 600;
}

.woocommerce-cart-form table.shop_table td.product-name a {
	color: var(--c-text);
	text-decoration: none;
}

.woocommerce-cart-form table.shop_table td.product-name a:hover {
	text-decoration: underline;
}

.woocommerce-cart-form table.shop_table td.product-quantity {
	grid-column: 3;
	grid-row: 1;
}

.woocommerce-cart-form table.shop_table td.product-remove {
	grid-column: 4;
	grid-row: 1;
	text-align: right;
}

.woocommerce-cart-form table.shop_table td.product-remove a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: transparent;
	color: var(--c-muted) !important;
	font-size: 1.3rem;
	line-height: 1;
	text-decoration: none;
}

.woocommerce-cart-form table.shop_table td.product-remove a.remove:hover {
	background: var(--c-error);
	color: #fff !important;
}

.woocommerce-cart-form table.shop_table tr:not(.cart_item) {
	display: block;
}

.woocommerce-cart-form table.shop_table td.actions {
	display: flex;
	justify-content: flex-end;
	padding: 0.25rem 0 0;
	border: 0;
}

/* Weiter zur Kasse: rechtsbündig unter der Liste */
.woocommerce-cart .cart-collaterals {
	display: flex;
	justify-content: flex-end;
	margin-top: 1rem;
}

.woocommerce-cart .cart-collaterals .cart_totals {
	width: auto;
	max-width: none;
	margin: 0;
}

.woocommerce-cart .wc-proceed-to-checkout {
	display: flex;
	justify-content: flex-end;
	padding: 0;
}

@media (max-width: 36rem) {
	.woocommerce-cart-form table.shop_table tr.cart_item {
		grid-template-columns: 4.5rem minmax(0, 1fr) 2.5rem;
		gap: 0.5rem 1rem;
	}

	.woocommerce-cart-form table.shop_table td.product-thumbnail img {
		width: 4.5rem;
	}

	.woocommerce-cart-form table.shop_table td.product-quantity {
		grid-column: 2;
		grid-row: 2;
	}
}
