/* Track-Ink Claude Anpassungen: Warenkorb und Kasse
   Farben aus dem bestehenden Auftritt: Lila #963A8F, Tuerkis #2D9FB5 */

:root {
	--ti-purple: #963a8f;
	--ti-purple-dark: #7c2f76;
	--ti-teal: #2d9fb5;
	--ti-text: #2b2f33;
	--ti-muted: #6b7076;
	--ti-line: #e4e4e7;
	--ti-card: #ffffff;
	--ti-radius: 16px;
	--ti-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
}

/* ---------- Gemeinsam ---------- */

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
	color: var(--ti-text);
	font-size: 16px;
}

.woocommerce-cart .woocommerce a:not(.button):not(.checkout-button),
.woocommerce-checkout .woocommerce a:not(.button) {
	color: var(--ti-teal);
}

.woocommerce-cart .woocommerce .button,
.woocommerce-checkout .woocommerce .button {
	border-radius: 999px;
}

.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message {
	background: var(--ti-card);
	border: 1px solid var(--ti-line);
	border-left: 4px solid var(--ti-teal);
	border-radius: 12px;
	box-shadow: none;
	padding: 14px 18px 14px 48px;
	font-size: 15px;
}

/* Vertrauens-Box */
.ti-trust {
	background: #f3fafb;
	border: 1px solid #d4ecf1;
	border-radius: 12px;
	padding: 16px 18px;
	margin: 0 0 18px;
}
.ti-trust__title {
	font-weight: 700;
	margin: 0 0 10px;
	font-size: 15px;
}
.ti-trust ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ti-trust li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14px;
	line-height: 1.45;
	margin: 0 0 6px;
}
.ti-trust li:last-child {
	margin-bottom: 0;
}
.ti-trust svg {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	fill: var(--ti-teal);
}

/* ---------- Warenkorb ---------- */

.woocommerce-cart .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 1000px) {
	.woocommerce-cart .woocommerce {
		grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
		align-items: start;
	}
	.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper {
		grid-column: 1 / -1;
	}
	.woocommerce-cart .cart-collaterals {
		position: sticky;
		top: 24px;
	}
}

.woocommerce-cart .woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-cart form.woocommerce-cart-form {
	background: var(--ti-card);
	border-radius: var(--ti-radius);
	box-shadow: var(--ti-shadow);
	padding: 8px 24px;
	margin: 0;
}

.woocommerce-cart table.shop_table.cart {
	border: 0;
	margin: 0;
	border-collapse: collapse;
}
.woocommerce-cart table.shop_table.cart thead {
	display: none;
}
.woocommerce-cart table.shop_table.cart td {
	border: 0;
	border-bottom: 1px solid var(--ti-line);
	padding: 20px 8px;
	vertical-align: top;
	background: transparent;
}
.woocommerce-cart table.shop_table.cart tr:nth-child(2n) td {
	background: transparent;
}
.woocommerce-cart table.shop_table.cart tr.cart_item:last-of-type td {
	border-bottom: 1px solid var(--ti-line);
}

.woocommerce-cart table.cart td.product-thumbnail {
	width: 110px;
}
.woocommerce-cart table.cart td.product-thumbnail img {
	width: 96px;
	max-width: 96px;
	height: auto;
	border-radius: 10px;
	background: #f4f4f5;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.woocommerce-cart table.cart td.product-name > a:first-child {
	color: var(--ti-text) !important;
	font-weight: 700;
	font-size: 17px;
	text-decoration: none;
	display: inline-block;
	margin-bottom: 4px;
}
.woocommerce-cart table.cart td.product-name .tm-cart-edit-options {
	display: flex;
	width: max-content;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	font-style: normal;
	margin: 2px 0 8px;
	text-decoration: none;
}
.woocommerce-cart table.cart td.product-name .tm-cart-edit-options::before {
	content: "";
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M13.6 2.6a2 2 0 0 1 2.8 0l1 1a2 2 0 0 1 0 2.8L7.6 16.2 3 17l.8-4.6z'/%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 20 20'%3E%3Cpath d='M13.6 2.6a2 2 0 0 1 2.8 0l1 1a2 2 0 0 1 0 2.8L7.6 16.2 3 17l.8-4.6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woocommerce-cart table.cart dl.variation,
.woocommerce-checkout table.shop_table dl.variation {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 6px;
	margin: 6px 0 0;
	font-size: 14px;
	color: var(--ti-muted);
}
.woocommerce-cart table.cart dl.variation dt,
.woocommerce-checkout table.shop_table dl.variation dt {
	float: none;
	margin: 0;
	font-weight: 400;
}
.woocommerce-cart table.cart dl.variation dd,
.woocommerce-checkout table.shop_table dl.variation dd {
	float: none;
	margin: 0;
	padding: 0;
	font-weight: 600;
	color: var(--ti-text);
}
.woocommerce-cart table.cart dl.variation dd p,
.woocommerce-checkout table.shop_table dl.variation dd p {
	margin: 0;
}

.woocommerce-cart table.cart td.product-price,
.woocommerce-cart table.cart td.product-subtotal {
	white-space: nowrap;
	font-weight: 600;
}
.woocommerce-cart table.cart td.product-price {
	color: var(--ti-muted);
	font-weight: 400;
}

.woocommerce-cart table.cart td.product-quantity .quantity input.qty {
	width: 64px;
	height: 40px;
	border: 1px solid var(--ti-line);
	border-radius: 10px;
	text-align: center;
	font-size: 15px;
}

.woocommerce-cart table.cart td.product-remove {
	width: 36px;
}
.woocommerce-cart table.cart td.product-remove a.remove {
	width: 28px;
	height: 28px;
	line-height: 26px;
	font-size: 18px;
	border-radius: 50%;
	border: 1px solid var(--ti-line);
	color: var(--ti-muted) !important;
	background: #fff;
	text-align: center;
}
.woocommerce-cart table.cart td.product-remove a.remove:hover {
	background: #fbeef9;
	border-color: var(--ti-purple);
	color: var(--ti-purple) !important;
}

/* Gutschein-Zeile */
.woocommerce-cart table.cart td.actions {
	border-bottom: 0;
	padding: 18px 8px 14px;
}
.woocommerce-cart table.cart td.actions .coupon {
	display: flex;
	gap: 8px;
	align-items: center;
}
.woocommerce-cart table.cart td.actions .coupon input.input-text {
	width: 220px !important;
	min-width: 0;
	height: 42px;
	border: 1px solid var(--ti-line);
	border-radius: 10px;
	padding: 0 12px;
	font-size: 14px;
}
.woocommerce-cart table.cart td.actions .button {
	height: 42px;
	padding: 0 18px;
	font-size: 14px;
	font-weight: 600;
	background: #fff;
	color: var(--ti-text);
	border: 1px solid var(--ti-line);
}
.woocommerce-cart table.cart td.actions .button[name="update_cart"]:disabled {
	opacity: .45;
}

/* Summen-Box */
.woocommerce-cart .cart-collaterals {
	width: auto;
}
.woocommerce-cart .cart-collaterals .cart_totals {
	float: none;
	width: 100%;
	background: var(--ti-card);
	border-radius: var(--ti-radius);
	box-shadow: var(--ti-shadow);
	padding: 24px;
}
.woocommerce-cart .cart_totals h2 {
	font-size: 22px;
	margin: 0 0 12px;
	color: var(--ti-text);
}
.woocommerce-cart .cart_totals table.shop_table {
	border: 0;
	margin: 0 0 16px;
}
.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
	border: 0;
	border-top: 1px solid var(--ti-line);
	padding: 12px 0;
	background: transparent !important;
	font-weight: 400;
	vertical-align: top;
}
.woocommerce-cart .cart_totals table.shop_table td {
	text-align: right;
}
.woocommerce-cart .cart_totals tr.order-total th,
.woocommerce-cart .cart_totals tr.order-total td {
	font-size: 20px;
	font-weight: 700;
	padding-top: 16px;
}
.woocommerce-cart .cart_totals .woocommerce-shipping-destination,
.woocommerce-cart .cart_totals .woocommerce-shipping-calculator {
	display: none;
}
.woocommerce-cart .wc-proceed-to-checkout {
	padding: 0 0 16px;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	display: block;
	width: 100%;
	background: var(--ti-purple);
	color: #fff;
	border-radius: 999px;
	padding: 18px 24px;
	font-size: 17px;
	font-weight: 700;
	text-align: center;
	margin: 0;
	transition: background .15s ease;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
	background: var(--ti-purple-dark);
}

/* Mobil: Tabelle als Karten */
@media (max-width: 768px) {
	.woocommerce-cart form.woocommerce-cart-form {
		padding: 4px 14px;
	}
	.woocommerce-cart table.shop_table_responsive tr.cart_item {
		display: grid;
		grid-template-columns: 84px 1fr 32px;
		grid-template-areas:
			"thumb name remove"
			"thumb qty  qty"
			"thumb sub  sub";
		gap: 4px 12px;
		padding: 16px 0;
		border-bottom: 1px solid var(--ti-line);
	}
	.woocommerce-cart table.shop_table_responsive tr.cart_item td {
		display: block;
		border: 0 !important;
		padding: 0 !important;
		text-align: left !important;
	}
	.woocommerce-cart table.shop_table_responsive tr.cart_item td::before {
		display: none;
	}
	.woocommerce-cart table.shop_table_responsive tr.cart_item td.product-thumbnail {
		display: block !important;
		grid-area: thumb;
		width: auto;
	}
	.woocommerce-cart table.shop_table_responsive tr.cart_item td.product-thumbnail img {
		width: 84px;
		max-width: 84px;
	}
	.woocommerce-cart table.shop_table_responsive tr.cart_item td.product-name { grid-area: name; }
	.woocommerce-cart table.shop_table_responsive tr.cart_item td.product-remove { grid-area: remove; }
	.woocommerce-cart table.shop_table_responsive tr.cart_item td.product-price { display: none; }
	.woocommerce-cart table.shop_table_responsive tr.cart_item td.product-quantity { grid-area: qty; }
	.woocommerce-cart table.shop_table_responsive tr.cart_item td.product-subtotal { grid-area: sub; }
	.woocommerce-cart table.cart td.actions .coupon {
		flex-wrap: wrap;
	}
	.woocommerce-cart table.cart td.actions .coupon input.input-text {
		width: 100% !important;
		flex: 1 1 100%;
	}
	.woocommerce-cart table.cart td.actions .button[name="update_cart"] {
		width: 100%;
		margin-top: 8px;
	}
}

/* ---------- Kasse ---------- */

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
	font-size: 14px;
	padding-top: 10px;
	padding-bottom: 10px;
}

.woocommerce-checkout form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

@media (min-width: 1000px) {
	.woocommerce-checkout form.checkout {
		grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr);
	}
	.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup,
	.woocommerce-checkout form.checkout > .wc-gzd-checkout-notices {
		grid-column: 1 / -1;
	}
	.woocommerce-checkout #customer_details {
		grid-column: 1;
		grid-row: 1;
	}
	.woocommerce-checkout #order_review_heading {
		display: none;
	}
	.woocommerce-checkout #order_review {
		grid-column: 2;
		grid-row: 1;
	}
}

.woocommerce-checkout #customer_details {
	background: var(--ti-card);
	border-radius: var(--ti-radius);
	box-shadow: var(--ti-shadow);
	padding: 28px;
}
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
	float: none;
	width: 100%;
	max-width: none;
}
.woocommerce-checkout #customer_details .col-2 {
	margin-top: 12px;
	padding-top: 20px;
	border-top: 1px solid var(--ti-line);
}

.woocommerce-checkout h3,
.woocommerce-checkout #order_review h3 {
	font-size: 21px;
	line-height: 1.3;
	margin: 0 0 16px;
	color: var(--ti-text);
}
.woocommerce-checkout #ship-to-different-address {
	font-size: 16px;
	margin: 0 0 8px;
}
.woocommerce-checkout #ship-to-different-address label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 600;
}

/* Formularfelder */
.woocommerce-checkout .form-row {
	margin: 0 0 14px;
	padding: 0;
}
.woocommerce-checkout .form-row label {
	font-size: 14px;
	font-weight: 600;
	color: var(--ti-text);
	margin-bottom: 6px;
	line-height: 1.3;
}
.woocommerce-checkout .form-row label .optional {
	font-weight: 400;
	color: var(--ti-muted);
}
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .select2-container .select2-selection--single {
	width: 100%;
	min-height: 48px;
	border: 1px solid #d6d6db;
	border-radius: 10px;
	background: #fff;
	padding: 10px 14px;
	font-size: 16px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.woocommerce-checkout .form-row textarea {
	min-height: 96px;
}
.woocommerce-checkout .form-row select {
	border: 1px solid #d6d6db !important;
	border-radius: 10px !important;
}
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 26px;
	padding: 0;
}
.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
	height: 46px;
	right: 8px;
}
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus,
.woocommerce-checkout .form-row select:focus {
	outline: none;
	border-color: var(--ti-teal);
	box-shadow: 0 0 0 3px rgba(45, 159, 181, .18);
}
.woocommerce-checkout .form-row.woocommerce-invalid input.input-text {
	border-color: #d63638;
}

@media (min-width: 600px) {
	.woocommerce-checkout .form-row-first,
	.woocommerce-checkout .form-row-last {
		width: calc(50% - 8px);
	}
}

/* Bestellübersicht und Zahlung als Karte */
.woocommerce-checkout #order_review {
	background: var(--ti-card);
	border-radius: var(--ti-radius);
	box-shadow: var(--ti-shadow);
	padding: 24px;
}
/* Reihenfolge bleibt wie von Germanized vorgegeben (Button-Lösung):
   Zahlung, rechtliche Hinweise, Bestellübersicht direkt über dem Button. */

.woocommerce-checkout table.woocommerce-checkout-review-order-table {
	border: 0;
	margin: 0 0 20px;
	border-collapse: collapse;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table td {
	border: 0;
	border-top: 1px solid var(--ti-line);
	padding: 12px 0;
	background: transparent !important;
	font-weight: 400;
	vertical-align: top;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th {
	border-top: 0;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--ti-muted);
	padding-top: 0;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table {
	width: 100%;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table td:last-child,
.woocommerce-checkout table.woocommerce-checkout-review-order-table th:last-child {
	text-align: right;
	white-space: normal;
	padding-left: 12px;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-total,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart-subtotal td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td {
	white-space: nowrap;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.shipping td {
	font-size: 14px;
	line-height: 1.4;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals ul,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.shipping ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.woocommerce-checkout .wc-gzd-cart-item-name-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 4px 10px;
}
.woocommerce-checkout .wc-gzd-cart-item-name-wrapper .wc-gzd-cart-item-thumbnail {
	flex: 0 0 56px;
}
.woocommerce-checkout .wc-gzd-cart-item-name-wrapper .tm-cart-edit-options {
	flex-basis: 100%;
	font-style: normal;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-name {
	font-weight: 600;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-name .tm-cart-edit-options {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin: 2px 0 0;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-name img {
	width: 56px;
	height: auto;
	border-radius: 8px;
	margin-right: 10px;
	vertical-align: top;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td {
	font-size: 20px;
	font-weight: 700;
	padding-top: 16px;
}
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr:last-child th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr:last-child td {
	font-size: 13px;
	font-weight: 400;
	color: var(--ti-muted);
}

/* Zahlungsarten als auswählbare Kacheln */
.woocommerce-checkout #payment {
	background: transparent;
	border-radius: 0;
	margin: 0 0 16px;
}
.woocommerce-checkout #payment ul.payment_methods {
	border: 0;
	padding: 0;
	margin: 0;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {
	border: 1px solid var(--ti-line);
	border-radius: 12px;
	padding: 14px 16px;
	margin: 0 0 10px;
	background: #fff;
	list-style: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:has(input:checked) {
	border-color: var(--ti-teal);
	box-shadow: 0 0 0 3px rgba(45, 159, 181, .15);
}
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	cursor: pointer;
	margin: 0;
}
.woocommerce-checkout #payment ul.payment_methods li img {
	max-height: 22px;
	width: auto;
	margin: 0 0 0 4px;
}
.woocommerce-checkout #payment div.payment_box {
	background: #f6f7f8;
	border-radius: 10px;
	margin: 12px 0 0;
	padding: 12px 14px;
	font-size: 14px;
	color: var(--ti-muted);
}
.woocommerce-checkout #payment div.payment_box::before {
	display: none;
}
.woocommerce-checkout #payment div.form-row.place-order {
	padding: 0;
	margin: 0;
	background: transparent;
}

/* Kaufen-Button */
.woocommerce-checkout #place_order,
.woocommerce-checkout .wc-gzd-order-submit #place_order {
	display: block;
	width: 100%;
	float: none;
	background: var(--ti-purple);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 18px 24px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 12px;
	transition: background .15s ease;
}
.woocommerce-checkout #place_order:hover {
	background: var(--ti-purple-dark);
}
.woocommerce-checkout .wc-gzd-order-submit {
	margin: 0;
}

/* Rechtliche Checkboxen und Hinweise ruhiger */
.woocommerce-checkout .wc-gzd-checkbox-placeholder,
.woocommerce-checkout .legal,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
	font-size: 13px;
	line-height: 1.5;
	color: var(--ti-muted);
}
.woocommerce-checkout .wc-gzd-checkbox-placeholder:empty {
	display: none;
}
.woocommerce-checkout .wc-gzd-checkbox-placeholder p,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper p {
	margin: 0 0 10px;
}

/* PayPal-Buttons */
.woocommerce-checkout .ppc-button-wrapper {
	max-width: none;
	width: 100%;
}

@media (max-width: 768px) {
	.woocommerce-checkout #customer_details,
	.woocommerce-checkout #order_review {
		padding: 18px;
		border-radius: 14px;
	}
}

/* 6) Gewährleistungslabel in der Kasse kompakt: kleines Label plus Text, Klick öffnet das volle Label. */
.woocommerce-checkout .wc-gzd-legal-guarantee-checkout {
	margin: 16px 0 0;
}
.woocommerce-checkout .wc-gzd-legal-guarantee-checkout .wc-gzd-legal-guarantee-label {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	background: #f7f7f8;
	border: 1px solid var(--ti-line, #e4e4e7);
	border-radius: 12px;
}
.woocommerce-checkout .wc-gzd-legal-guarantee-checkout .wc-gzd-popover-trigger {
	flex: 0 0 auto;
	line-height: 0;
}
.woocommerce-checkout .wc-gzd-legal-guarantee-checkout img.wc-gzd-legal-guarantee-image-preview {
	width: 64px !important;
	height: auto !important;
	max-width: 64px !important;
	min-width: 0 !important;
	border-radius: 4px;
}
.woocommerce-checkout .wc-gzd-legal-guarantee-checkout .wc-gzd-legal-guarantee-label::after {
	content: "Deine gesetzlichen Gewährleistungsrechte: mindestens 2 Jahre gesetzliche Gewährleistung für Waren, die in der EU verkauft werden. Tipp auf das Label, um es groß zu öffnen.";
	font-size: 13px;
	line-height: 1.45;
	color: var(--ti-muted, #6b7076);
}
