/*
 * Cart and checkout (WooCommerce blocks), styled to match the Shop page design.
 * Colours and fonts reuse the Shop tokens; no Figma frame exists for these pages,
 * so the layout is inferred from the Shop frame: red pattern background, white panels, gold accents.
 */
.woocommerce-cart .site-main,
.woocommerce-checkout .site-main {
	/* Same wallpaper as the Shop page and the other pages' repeated parallax cover. */
	background-color: var(--red);
	background-image: url(../../img/gwalia-text.svg);
	background-repeat: repeat;
	background-size: auto;
	background-position: 50% 50%;
	background-attachment: fixed;
	padding: 4.8rem 2.4rem 8rem;
	min-height: 60vh;
}

/* page.php prints no title for these pages, so label them here to match the Shop heading. */
.woocommerce-cart .site-main::before,
.woocommerce-checkout .site-main::before {
	display: block;
	max-width: 120rem;
	margin: 0 auto 2.4rem;
	/* Paranomik is the site's heading face (the global h1), as on the other pages' titles. */
	font-family: Paranomik-Regular, sans-serif;
	font-weight: 400;
	font-size: clamp(4rem, 5vw, 5.6rem);
	line-height: 1;
	color: #fff;
}

.woocommerce-cart .site-main::before {
	content: "Cart";
}

.woocommerce-checkout .site-main::before {
	content: "Checkout";
}

.woocommerce-cart .site-main .entry-content,
.woocommerce-checkout .site-main .entry-content {
	/* The theme caps .entry-content at 750px elsewhere; these pages need the wider two-column layout. */
	max-width: 120rem;
	width: 100%;
	margin: 0 auto;
	padding: 3.2rem;
	background: #fff;
	border: 1px solid #fff;
	color: #2c2c2c;
}

.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-checkout .wp-block-woocommerce-checkout {
	font-size: 1.6rem;
}

/* Section headings use the same condensed display face as the Shop page. */
.woocommerce-cart .wc-block-components-title,
.woocommerce-cart .wc-block-cart__totals-title,
.woocommerce-checkout .wc-block-components-title,
.woocommerce-checkout .wc-block-components-checkout-step__title {
	font-family: BebasKai, sans-serif;
	font-size: 2.8rem;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--shop-red, #A72114);
	letter-spacing: 0.02em;
}

.woocommerce-cart table.wc-block-cart-items th {
	font-family: BebasKai, sans-serif;
	font-size: 1.8rem;
	text-transform: uppercase;
	color: var(--shop-red, #A72114);
}

.woocommerce-cart .wc-block-components-product-name {
	font-family: BebasKai, sans-serif;
	font-size: 2rem;
	text-transform: uppercase;
	color: var(--shop-red, #A72114);
	text-decoration: none;
}

/* Primary actions: red with a gold hover, square corners like the Shop cards. */
.woocommerce-cart .wc-block-components-button:not(.is-link),
.woocommerce-checkout .wc-block-components-button:not(.is-link) {
	background: var(--shop-red, #A72114);
	color: #fff;
	border: 1px solid var(--shop-red, #A72114);
	border-radius: 0;
	font-family: BebasKai, sans-serif;
	font-size: 2rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 1.44rem 2.4rem;
}

.woocommerce-cart .wc-block-components-button:not(.is-link):hover,
.woocommerce-cart .wc-block-components-button:not(.is-link):focus-visible,
.woocommerce-checkout .wc-block-components-button:not(.is-link):hover,
.woocommerce-checkout .wc-block-components-button:not(.is-link):focus-visible {
	background: var(--shop-gold, #F8B053);
	border-color: var(--shop-gold, #F8B053);
	color: #2c2c2c;
}

.woocommerce-checkout .wc-block-components-text-input input,
.woocommerce-checkout .wc-block-components-select .wc-block-components-select__select,
.woocommerce-checkout .wc-blocks-components-select__select {
	border-radius: 0;
}

.woocommerce-checkout .wc-block-components-sidebar-layout .wc-block-components-main {
	padding-right: 3.2rem;
}

.woocommerce-checkout .wc-block-components-order-summary,
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
	border-color: var(--shop-red, #A72114);
}

@media (max-width: 48rem) {
	.woocommerce-cart .site-main,
	.woocommerce-checkout .site-main {
		padding: 2.4rem 1.2rem 4.8rem;
	}

	.woocommerce-cart .site-main .entry-content,
	.woocommerce-checkout .site-main .entry-content {
		padding: 1.6rem;
	}
}

/* Express payment buttons (Google Pay etc.) belong on checkout only; the cart must lead on to checkout for the visitor's details. */
.woocommerce-cart .wp-block-woocommerce-cart-express-payment-block,
.woocommerce-cart .wc-block-cart__payment-options {
	display: none;
}

/* Header cart icon. */
.gwalia-header-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: #fff;
	padding: 0.8rem;
}

.gwalia-header-cart:hover,
.gwalia-header-cart:focus-visible {
	color: var(--shop-gold, #F8B053);
}

/* The count sits on the icon's top-right corner like a badge; the gold matches the shop accent. */
.gwalia-header-cart__count {
	position: absolute;
	top: 0;
	right: 0;
	min-width: 1.8rem;
	height: 1.8rem;
	padding: 0 0.4rem;
	border-radius: 0.9rem;
	background: var(--shop-gold, #F8B053);
	color: #2c2c2c;
	font-family: BebasKai, sans-serif;
	font-size: 1.3rem;
	line-height: 1.8rem;
	text-align: center;
}

.gwalia-header-cart__count.is-empty {
	display: none;
}

/* "Added to your cart" message on the product page: gold box so it stands out. */
.single-product .woocommerce-message {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem;
	max-width: 120rem;
	margin: 0 auto 2.4rem;
	padding: 1.8rem 2.4rem;
	background: var(--shop-gold, #F8B053);
	border: 0;
	color: #2c2c2c;
	font-family: BebasKai, sans-serif;
	font-size: 2.2rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* WooCommerce draws its own tick icon here; the gold box doesn't need it. */
.single-product .woocommerce-message::before {
	display: none;
}

.single-product .woocommerce-message .button {
	/* WooCommerce prints the button before the text; push it to the right of the message. */
	order: 2;
	background: var(--shop-red, #A72114);
	color: #fff;
	border: 1px solid var(--shop-red, #A72114);
	border-radius: 0;
	padding: 0.9rem 2.4rem;
	font-family: BebasKai, sans-serif;
	font-size: 1.8rem;
	text-transform: uppercase;
	text-decoration: none;
}

.single-product .woocommerce-message .button:hover {
	background: #2c2c2c;
	border-color: #2c2c2c;
}

/* Mobile: cart icon and hamburger sit side by side inside the existing menu column. */
.gwalia-mob-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.4rem;
}

/*
 * Order received (thank you) page. This is WooCommerce's classic shortcode markup, not blocks, so it needs its own
 * styling: a success banner, a row of order facts, then a standard bordered order table and two address cards.
 */
.woocommerce-order-received .site-main .entry-content .wp-block-gbold-container,
.woocommerce-order-received .site-main .entry-content .wp-block-gbold-container .row {
	/* The grid column padding made the order narrow and off-centre inside the white panel. */
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.woocommerce-order-received .woocommerce-order {
	font-size: 1.6rem;
	line-height: 1.5;
}

.woocommerce-order-received .woocommerce-thankyou-order-received {
	margin: 0 0 2.4rem;
	padding: 1.8rem 2.4rem;
	background: var(--shop-gold, #F8B053);
	color: #2c2c2c;
	font-family: BebasKai, sans-serif;
	font-size: 2.4rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Order facts as a row of cells that wrap on small screens. */
.woocommerce-order-received ul.woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 3.2rem;
	padding: 0;
	list-style: none;
	border: 1px solid #ddd;
}

.woocommerce-order-received ul.woocommerce-order-overview li {
	flex: 1 1 16rem;
	margin: 0;
	padding: 1.6rem 2rem;
	border-right: 1px dashed #ddd;
	font-size: 1.3rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #666;
}

.woocommerce-order-received ul.woocommerce-order-overview li:last-child {
	border-right: 0;
}

.woocommerce-order-received ul.woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.4rem;
	font-size: 1.6rem;
	letter-spacing: 0;
	text-transform: none;
	color: #2c2c2c;
	overflow-wrap: anywhere;
}

/* Section headings: the theme's h2 face is far too large for a receipt. */
.woocommerce-order-received .woocommerce-order h2,
.woocommerce-order-received .woocommerce-order .woocommerce-column__title {
	margin: 0 0 1.6rem;
	font-family: BebasKai, sans-serif;
	font-size: 2.8rem;
	line-height: 1.1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--shop-red, #A72114);
}

.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details {
	margin-bottom: 3.2rem;
}

.woocommerce-order-received table.woocommerce-table--order-details {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	border: 1px solid #ddd;
	table-layout: auto;
}

.woocommerce-order-received table.woocommerce-table--order-details th,
.woocommerce-order-received table.woocommerce-table--order-details td {
	padding: 1.2rem 1.6rem;
	border: 0;
	border-bottom: 1px solid #ddd;
	text-align: left;
	vertical-align: top;
}

.woocommerce-order-received table.woocommerce-table--order-details thead th {
	background: #f5f5f5;
	font-family: BebasKai, sans-serif;
	font-size: 1.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--shop-red, #A72114);
}

/* Totals column stays right-aligned so prices line up. */
.woocommerce-order-received table.woocommerce-table--order-details .product-total,
.woocommerce-order-received table.woocommerce-table--order-details tfoot td,
.woocommerce-order-received table.woocommerce-table--order-details thead th.product-total {
	text-align: right;
	white-space: nowrap;
}

.woocommerce-order-received table.woocommerce-table--order-details tfoot th {
	font-weight: 700;
	color: #2c2c2c;
}

.woocommerce-order-received table.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-order-received table.woocommerce-table--order-details tfoot tr:last-child td {
	border-bottom: 0;
}

.woocommerce-order-received table.woocommerce-table--order-details .product-name a {
	color: var(--shop-red, #A72114);
	text-decoration: none;
	font-weight: 700;
}

.woocommerce-order-received table.woocommerce-table--order-details .product-name a:hover {
	text-decoration: underline;
}

.woocommerce-order-received table.woocommerce-table--order-details .product-quantity {
	font-weight: 400;
	color: #666;
}

/* Variation lines (colour, size) as small "Label: value" pairs rather than bulleted blocks. */
.woocommerce-order-received table.woocommerce-table--order-details ul.wc-item-meta {
	margin: 0.6rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 1.4rem;
}

.woocommerce-order-received table.woocommerce-table--order-details ul.wc-item-meta li {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.5rem;
	margin: 0;
}

.woocommerce-order-received table.woocommerce-table--order-details ul.wc-item-meta li p {
	margin: 0;
}

.woocommerce-order-received table.woocommerce-table--order-details .wc-item-meta-label {
	float: none;
	margin: 0;
	font-weight: 700;
}

/* Billing and shipping addresses side by side. */
.woocommerce-order-received .woocommerce-columns--addresses {
	display: flex;
	flex-wrap: wrap;
	gap: 2.4rem;
}

.woocommerce-order-received .woocommerce-columns--addresses::before,
.woocommerce-order-received .woocommerce-columns--addresses::after {
	display: none;
}

.woocommerce-order-received .woocommerce-columns--addresses .woocommerce-column {
	flex: 1 1 28rem;
	float: none;
	width: auto;
	max-width: none;
}

.woocommerce-order-received .woocommerce-customer-details address {
	margin: 0;
	padding: 1.6rem 2rem;
	border: 1px solid #ddd;
	font-style: normal;
	line-height: 1.6;
}

@media (max-width: 48rem) {
	.woocommerce-order-received .woocommerce-thankyou-order-received {
		font-size: 2rem;
		padding: 1.4rem 1.6rem;
	}

	.woocommerce-order-received ul.woocommerce-order-overview li {
		flex-basis: 100%;
		border-right: 0;
		border-bottom: 1px dashed #ddd;
	}

	.woocommerce-order-received ul.woocommerce-order-overview li:last-child {
		border-bottom: 0;
	}

	.woocommerce-order-received table.woocommerce-table--order-details th,
	.woocommerce-order-received table.woocommerce-table--order-details td {
		padding: 1rem 1.2rem;
	}
}
