/* ── Riedel Cart block ────────────────────────────────────────────────────── */

/* Editor preview */
.riedel-cart--preview {
	padding: 24px;
	background: var(--wp--preset--color--surface-tertiary, #F1F5F9);
	border-radius: var(--wp--custom--radius--md);
	text-align: center;
}

.riedel-cart__editor-notice {
	color: var(--wp--preset--color--text-secondary, #475669);
	font-size: var(--wp--preset--font-size--base);
}

/* ── SKU entry spacing inside items column ─────────────────────────────── */

.riedel-cart__items-col .riedel-sku-entry {
	margin-bottom: 16px;
}

/* ── Save-cart-template button on cart page: plain text link style ──────── */

.riedel-cart-page .riedel-save-cart-template .riedel-save-cart-template__btn {
	padding: 0;
	border: none;
	height: unset;
	border-radius: unset;
	color: #2d3435;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 500;
}

/* ── Empty state ───────────────────────────────────────────────────────── */

.riedel-cart__empty {
	padding: 48px 24px;
	text-align: center;
	background: var(--wp--preset--color--surface-default);
	border: 1px solid rgba(211, 209, 199, 1);
	border-radius: var(--wp--custom--radius--md);
}

.riedel-cart__empty p {
	font-size: var(--wp--preset--font-size--md);
	color: var(--wp--preset--color--text-secondary, #475669);
	margin: 0 0 16px;
}

.riedel-cart__empty-link {
	display: inline-block;
	padding: 10px 24px;
	background: var(--wp--preset--color--text-primary, #1A1A1A);
	color: var(--wp--preset--color--text-inverse);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 500;
	border-radius: 2px;
	text-decoration: none;
}

.riedel-cart__empty-link:hover {
	background: #3a3836;
	color: var(--wp--preset--color--text-inverse);
}

/* ── Two-column layout ─────────────────────────────────────────────────── */

.riedel-cart__layout {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.riedel-cart__items-col {
	flex: 1 1 0;
	min-width: 0;
}

.riedel-cart__summary-col {
	flex: 0 0 35%;
	width: 35%;
	max-width: 410px;
	position: sticky;
	top: 24px;
}

@media (max-width: 1023px) {
	.riedel-cart__items-col,
	.riedel-cart__summary-col {
		width: 100%;
	}
}

/* ── Items card ────────────────────────────────────────────────────────── */

.riedel-cart__items-card {
	background: var(--wp--preset--color--surface-default);
	border: 1px solid rgba(211, 209, 199, 1);
	border-radius: var(--wp--custom--radius--md);
	overflow: hidden;
}

/* ── Single item row ───────────────────────────────────────────────────── */

.riedel-cart__item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	border-bottom: 1px solid rgba(211, 209, 199, 1);
}

.riedel-cart__item:last-child {
	border-bottom: none;
}

/* Image */
.riedel-cart__item-image {
	flex: 0 0 64px;
}

.riedel-cart__item-image a {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: var(--wp--custom--radius--sm);
	overflow: hidden;
	background: var(--wp--preset--color--surface-tertiary, #F1F5F9);
}

.riedel-cart__item-image img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	display: block;
}

/* Product info */
.riedel-cart__item-info {
	flex: 1 1 0;
	min-width: 0;
}

.riedel-cart__item-name {
	display: block;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	color: var(--wp--preset--color--text-primary, #1A1A1A);
	text-decoration: none;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.riedel-cart__item-name:hover {
	color: var(--wp--preset--color--action-primary, #007D7D);
}

.riedel-cart__item-meta {
	margin-top: 4px;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-secondary, #475669);
}

.riedel-cart__item-grundpreis,
.riedel-cart__item-delivery-time {
	margin-top: 2px;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-secondary, #475669);
	line-height: 1.4;
}

.riedel-cart__item-grundpreis .price,
.riedel-cart__item-grundpreis .unit-price,
.riedel-cart__item-grundpreis .wc-gzd-additional-info {
	color: inherit;
	font-size: inherit;
}

.riedel-cart__item-delivery-time .delivery-time {
	color: inherit;
}

/* Quantity stepper */
.riedel-cart__item-qty {
	flex: 0 0 auto;
}

.riedel-cart .riedel-cart__stepper {
	display: inline-flex;
	align-items: center;
	background: rgba(228, 233, 234, 1);
	border-radius: var(--wp--custom--radius--sm);
	overflow: hidden;
}

.riedel-cart .riedel-cart__stepper-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: var(--wp--custom--radius--none);
	background: transparent;
	color: var(--wp--preset--color--text-primary, #1A1A1A);
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transition: background 0.1s;
}

.riedel-cart .riedel-cart__stepper-btn:hover {
	background: rgba(173, 179, 180, 0.2);
}

.riedel-cart .riedel-cart__stepper-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.riedel-cart .riedel-cart__stepper-input {
	width: 36px;
	height: 36px;
	min-width: 36px;
	padding: 0;
	border: none;
	border-radius: var(--wp--custom--radius--none);
	background: transparent;
	text-align: center;
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--preset--color--text-primary, #1A1A1A);
	outline: none;
	box-shadow: none;
	-moz-appearance: textfield;
}

.riedel-cart .riedel-cart__stepper-input::-webkit-outer-spin-button,
.riedel-cart .riedel-cart__stepper-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

.riedel-cart .riedel-cart__stepper-input:focus {
	outline: none;
	box-shadow: none;
}

/* Line total */
.riedel-cart__item-total {
	flex: 0 0 auto;
	min-width: 72px;
	text-align: right;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 500;
	color: var(--wp--preset--color--text-primary, #1A1A1A);
	white-space: nowrap;
}

/* ── Info bar (delivery + address) ────────────────────────────────────── */

.riedel-cart__info-bar {
	margin-top: 12px;
	padding: 16px;
	background: var(--wp--preset--color--surface-default);
	border: 1px solid rgba(211, 209, 199, 1);
	border-radius: var(--wp--custom--radius--md);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.riedel-cart__delivery,
.riedel-cart__address {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--preset--color--text-primary, #1A1A1A);
}

.riedel-cart__delivery svg,
.riedel-cart__address svg {
	flex-shrink: 0;
	color: var(--wp--preset--color--text-secondary, #475669);
}

.riedel-cart__delivery-date {
	color: #2a7d3a;
	font-weight: 600;
}

.riedel-cart__address {
	color: var(--wp--preset--color--text-secondary, #475669);
}

.riedel-cart__address-change {
	margin-left: auto;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-secondary, #475669);
	text-decoration: underline;
	white-space: nowrap;
}

.riedel-cart__address-change:hover {
	color: var(--wp--preset--color--text-primary, #1A1A1A);
}

/* ── Summary card ──────────────────────────────────────────────────────── */

.riedel-cart__summary {
	background: var(--wp--preset--color--surface-default);
	border: 1px solid rgba(211, 209, 199, 1);
	border-radius: var(--wp--custom--radius--md);
	padding: 24px;
}

.riedel-cart__summary-title {
	text-transform: none;
}

/* ── Totals rows ───────────────────────────────────────────────────────── */

.riedel-cart__totals {
	margin-bottom: 4px;
}

.riedel-cart__totals-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 8px 0;
	border-bottom: 1px solid rgba(173, 179, 180, 0.15);
	font-size: var(--wp--preset--font-size--base);
}

.riedel-cart__totals-row:last-child {
	border-bottom: none;
}

.riedel-cart__totals-label {
	color: var(--wp--preset--color--text-secondary, #475669);
	font-weight: 400;
}

.riedel-cart__totals-value {
	font-weight: 600;
	color: var(--wp--preset--color--text-primary, #1A1A1A);
}

.riedel-cart__totals-value.is-free {
	color: #2a7d3a;
}

/* ── Grand total ───────────────────────────────────────────────────────── */

.riedel-cart__grand-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 16px 0 0;
	margin-top: 8px;
	border-top: 2px solid var(--wp--preset--color--text-primary, #1A1A1A);
}

.riedel-cart__grand-label {
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	color: var(--wp--preset--color--text-primary, #1A1A1A);
}

.riedel-cart__grand-value {
	font-size: var(--wp--preset--font-size--3-xl);
	font-weight: 500;
	color: var(--wp--preset--color--text-primary, #1A1A1A);
	white-space: nowrap;
}

.riedel-cart__shipping-notice {
	margin: 12px 0 0;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.5;
	color: var(--wp--preset--color--text-secondary, #475669);
}

.riedel-cart__shipping-notice a {
	color: inherit;
	text-decoration: underline;
}

/* ── Checkout button ───────────────────────────────────────────────────── */

.riedel-cart .riedel-cart__checkout-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px;
	margin-top: 20px;
	padding: 0 24px;
	border: none;
	border-radius: 2px;
	background: var(--wp--preset--color--text-primary, #1A1A1A);
	color: var(--wp--preset--color--action-primary, #007D7D);
	font-size: var(--wp--preset--font-size--md);
	font-weight: 500;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background 0.15s;
	box-sizing: border-box;
}

.riedel-cart .riedel-cart__checkout-btn:hover {
	background: #3a3836;
	color: var(--wp--preset--color--action-primary, #007D7D);
	text-decoration: none;
}

/* ── Trust badges ──────────────────────────────────────────────────────── */

.riedel-cart__trust {
	margin-top: 16px;
	display: flex;
	justify-content: center;
	gap: 20px;
}

.riedel-cart__trust-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-secondary, #475669);
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1023px) {
	.riedel-cart__layout {
		flex-direction: column;
	}

	.riedel-cart__summary-col {
		flex: none;
		width: 100%;
		max-width: none;
		position: static;
	}
}

@media (max-width: 767px) {
	.riedel-cart__item-image {
		display: none;
	}

	.riedel-cart__item-total {
		min-width: 64px;
	}

	.riedel-cart__grand-value {
		font-size: var(--wp--preset--font-size--2-xl);
	}
}
