/**
 * Checkout layout — classic + WooCommerce Blocks (body.theme-checkout).
 */

body.theme-checkout {
	overflow-x: clip;
}

html.theme-checkout-no-smooth {
	scroll-behavior: auto;
}

body.theme-checkout main.theme-checkout-main {
	padding-top: 4rem;
	min-height: 100vh;
}

@media (min-width: 1024px) {
	body.theme-checkout main.theme-checkout-main {
		padding-top: 4.5rem;
	}
}

body.theme-checkout .theme-checkout-main .container-wide {
	padding-top: 0.75rem;
	padding-bottom: 3rem;
}

body.theme-checkout .entry-content {
	max-width: 100%;
}

/* Vertical rhythm between intro, coupon, and checkout grid */
body.theme-checkout-classic .theme-checkout-back-link {
	margin-bottom: 1.25rem;
}

body.theme-checkout-classic .theme-checkout-intro {
	margin: 0 0 1.5rem;
}

body.theme-checkout-classic .theme-checkout-main .page-title,
body.theme-checkout-classic .theme-checkout-main h1.font-display {
	margin-bottom: 0.75rem;
}

body.theme-checkout-classic .entry-content > .woocommerce {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

body.theme-checkout-classic .entry-content > .woocommerce > .woocommerce-form-coupon-toggle {
	margin: 0;
}

body.theme-checkout-classic .entry-content > .woocommerce > .woocommerce-form-coupon-toggle .woocommerce-info {
	margin: 0;
	padding: 0.875rem 1.25rem;
	border-radius: 1rem;
	border: 1px solid hsl(var(--nude));
	background-color: hsl(var(--cream));
}

body.theme-checkout-classic .entry-content > .woocommerce > #woocommerce-checkout-form-coupon {
	margin: 0;
}

body.theme-checkout-classic .entry-content > .woocommerce > form.checkout.theme-checkout-form {
	margin: 0;
}

/* —— Classic grid —— */
body.theme-checkout-classic .theme-checkout-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
	align-items: start;
}

body.theme-checkout-classic .theme-checkout-form-col {
	order: 1;
}

body.theme-checkout-classic .theme-checkout-summary-col {
	order: 2;
}

@media (min-width: 1024px) {
	body.theme-checkout-classic .theme-checkout-grid {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: 4rem;
	}

	body.theme-checkout-classic .theme-checkout-form-col {
		order: 2;
	}

	body.theme-checkout-classic .theme-checkout-summary-col {
		order: 1;
	}
}

body.theme-checkout-classic .theme-checkout-summary-col {
	min-width: 0;
}

@media (min-width: 1024px) {
	body.theme-checkout-classic .theme-checkout-summary-col {
		position: sticky;
		top: 7rem;
		align-self: start;
	}
}

body.theme-checkout-classic .theme-checkout-summary-panel {
	background: linear-gradient(135deg, hsl(var(--dusk)), hsl(var(--ink)));
	color: hsl(var(--cream));
	border-radius: 1.75rem;
	padding: 1.5rem;
	box-shadow: 0 14px 36px hsl(var(--ink) / 0.16);
}

@media (min-width: 768px) {
	body.theme-checkout-classic .theme-checkout-summary-panel {
		padding: 2rem;
	}
}

body.theme-checkout-classic .theme-checkout-summary-card {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
}

body.theme-checkout-classic .theme-checkout-summary-heading {
	margin: 0 0 1.25rem;
	color: hsl(33 85% 85%);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

body.theme-checkout-classic .theme-checkout-customer-details {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

body.theme-checkout-classic .theme-checkout-payment-wrap {
	margin-top: 0;
}

body.theme-checkout-classic .theme-checkout-policy-note {
	margin-top: 1rem;
	font-size: 0.875rem;
	text-align: center;
	color: hsl(var(--muted-foreground));
}

/* Summary line items (classic table) */
body.theme-checkout-classic .woocommerce-checkout-review-order-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}

body.theme-checkout-classic .woocommerce-checkout-review-order-table thead {
	display: none;
}

body.theme-checkout-classic .theme-checkout-summary-panel .woocommerce-checkout-review-order-table,
body.theme-checkout-classic .theme-checkout-summary-panel .woocommerce-checkout-review-order-table th,
body.theme-checkout-classic .theme-checkout-summary-panel .woocommerce-checkout-review-order-table td {
	color: hsl(var(--cream));
	border-color: hsla(33, 85%, 95%, 0.15);
}

body.theme-checkout-classic .woocommerce-checkout-review-order-table .product-name {
	width: auto;
	padding: 0.75rem 0.5rem 0.75rem 0;
	vertical-align: top;
}

body.theme-checkout-classic .woocommerce-checkout-review-order-table tbody tr {
	border-bottom: 0;
}

body.theme-checkout-classic .woocommerce-checkout-review-order-table .product-total {
	width: 22%;
	min-width: 5.5rem;
	text-align: right;
	vertical-align: top;
	padding: 0.75rem 0;
}

body.theme-checkout-classic .woocommerce-checkout-review-order-table tfoot th {
	text-align: left;
	font-weight: 500;
	padding: 0.35rem 0.5rem 0.35rem 0;
	color: hsla(33, 85%, 95%, 0.7);
}

body.theme-checkout-classic .woocommerce-checkout-review-order-table tfoot td {
	text-align: right;
	width: 22%;
	min-width: 5.5rem;
	padding: 0.35rem 0;
	color: hsl(var(--cream));
}

body.theme-checkout-classic .woocommerce-checkout-review-order-table tfoot tr.order-total th,
body.theme-checkout-classic .woocommerce-checkout-review-order-table tfoot tr.order-total td {
	border-top: 1px solid hsla(33, 85%, 95%, 0.2);
	padding-top: 1.25rem;
	margin-top: 0.5rem;
	color: hsl(var(--cream));
}

body.theme-checkout-classic .woocommerce-checkout-review-order-table tfoot tr.order-total td {
	font-family: var(--font-display);
	font-size: 1.875rem;
	line-height: 1.1;
	color: hsl(33 85% 85%);
}

body.theme-checkout-classic .theme-checkout-summary-line {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

body.theme-checkout-classic .theme-checkout-summary-line__media {
	flex-shrink: 0;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 0.75rem;
	overflow: hidden;
	background-color: hsla(0, 0%, 100%, 0.1);
}

body.theme-checkout-classic .theme-checkout-summary-line__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

body.theme-checkout-classic .theme-checkout-summary-line__body {
	flex: 1;
	min-width: 0;
}

body.theme-checkout-classic .theme-checkout-summary-line__name {
	display: block;
	font-family: var(--font-body);
	font-size: 0.875rem;
	line-height: 1.35;
	color: hsl(var(--cream));
}

body.theme-checkout-classic .theme-checkout-summary-qty {
	display: block;
	font-size: 0.875rem;
	color: hsla(33, 85%, 95%, 0.7);
	margin-top: 0.15rem;
}

body.theme-checkout-classic .theme-checkout-summary-meta {
	list-style: none;
	margin: 0.35rem 0 0;
	padding: 0;
	font-size: 0.8125rem;
	color: hsla(33, 85%, 95%, 0.7);
}

body.theme-checkout-classic .theme-checkout-summary-panel .woocommerce-Price-amount,
body.theme-checkout-classic .theme-checkout-summary-panel .woocommerce-Price-amount bdi {
	color: inherit;
}

/* —— WooCommerce Blocks —— */
body.theme-checkout-blocks .wc-block-checkout {
	display: block;
	max-width: none;
}

body.theme-checkout-blocks .wc-block-components-sidebar-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
	align-items: start;
}

@media (min-width: 1024px) {
	body.theme-checkout-blocks .wc-block-components-sidebar-layout {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: 4rem;
	}
}

body.theme-checkout-blocks .wc-block-checkout__main {
	order: 1;
	min-width: 0;
}

body.theme-checkout-blocks .wc-block-checkout__sidebar {
	order: 2;
	min-width: 0;
}

@media (min-width: 1024px) {
	body.theme-checkout-blocks .wc-block-checkout__main {
		order: 2;
	}
	body.theme-checkout-blocks .wc-block-checkout__sidebar {
		order: 1;
		position: sticky;
		top: 7rem;
		align-self: start;
	}
}

body.theme-checkout-blocks .wc-block-checkout__sidebar {
	background-color: hsl(var(--secondary) / 0.35);
	border: 1px solid hsl(var(--nude));
	border-radius: 1rem;
	padding: 1.5rem;
}

body.theme-checkout-blocks .wc-block-components-order-summary-item {
	display: grid;
	grid-template-columns: 5rem 1fr auto;
	gap: 0.75rem;
	align-items: start;
}

body.theme-checkout-blocks .wc-block-components-order-summary-item__image {
	width: 5rem;
	height: 6rem;
	border-radius: 0.75rem;
	overflow: hidden;
}

body.theme-checkout-blocks .wc-block-components-order-summary-item__total-price {
	text-align: right;
}

body.theme-checkout-blocks .wc-block-components-totals-item,
body.theme-checkout-blocks .wc-block-components-totals-footer-item {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

body.theme-checkout-blocks .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	text-align: right;
}

body.theme-checkout-blocks .theme-checkout-policy-note--blocks {
	margin-top: 0.75rem;
	text-align: center;
}

body.theme-checkout .wc-block-components-text-input input,
body.theme-checkout .wc-block-components-select select,
body.theme-checkout .wc-block-components-textarea textarea,
body.theme-checkout .wc-blocks-components-select__select {
	min-height: 3rem;
	font-size: 15px;
}

body.theme-checkout .wc-block-components-checkout-place-order-button {
	border-radius: 6px;
	min-height: 2.75rem;
	font-weight: 600;
}
