/**
 * Aquaform — WooCommerce Cart, Checkout and Order-confirmation blocks.
 *
 * The classic templates in /woocommerce cover stores using the
 * [woocommerce_cart] / [woocommerce_checkout] shortcodes. This file gives the
 * block-based Cart and Checkout the same design: two-column layout, the order
 * summary card, − / + quantity steppers, and Aquaform buttons and fields.
 */

/* -------------------------------------------------------------------------
   Shared block chrome
   ---------------------------------------------------------------------- */
.aq-blocks-page .aq-container > .wp-block-woocommerce-cart,
.aq-blocks-page .aq-container > .wp-block-woocommerce-checkout {
	max-width: none;
	margin: 0;
}

.wc-block-components-button:not(.is-link) {
	display: inline-flex; align-items: center; justify-content: center;
	height: 52px; padding: 0 26px; border-radius: var(--aq-radius);
	background: var(--aq-ink); border: 1px solid var(--aq-ink); color: #fff;
	font-family: var(--aq-sans); font-size: 15px; font-weight: 800; line-height: 1;
	transition: background-color .15s ease, border-color .15s ease;
}
.wc-block-components-button:not(.is-link):hover {
	background: #0f1a2c; border-color: #0f1a2c; color: #fff;
}
.wc-block-components-button.outlined {
	background: transparent; border-color: var(--aq-ink); color: var(--aq-ink);
}
.wc-block-components-button.outlined:hover { background: var(--aq-ink); color: #fff; }
.wc-block-components-button.is-link { color: var(--aq-accent); font-weight: 700; }

.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-textarea,
.wc-block-components-combobox input {
	height: 52px; border: 1.5px solid var(--aq-line); border-radius: var(--aq-radius);
	background: #fff; font-family: var(--aq-sans); font-size: 14px; color: var(--aq-ink);
	padding: 0 14px;
}
.wc-block-components-textarea { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.6; }
.wc-block-components-text-input input:focus,
.wc-block-components-combobox input:focus { border-color: var(--aq-accent); box-shadow: none; outline: none; }
.wc-block-components-text-input label,
.wc-block-components-combobox label { color: var(--aq-muted); font-family: var(--aq-sans); }

.wc-block-components-title,
.wc-block-components-checkout-step__title {
	font-family: var(--aq-sans); font-weight: 800; color: var(--aq-ink); letter-spacing: -.01em;
}
.wc-block-components-checkout-step__description { color: var(--aq-muted); font-size: 13.5px; }

.wc-block-components-notice-banner {
	border-radius: var(--aq-radius); border-width: 1px; font-family: var(--aq-sans);
}

/* -------------------------------------------------------------------------
   Cart block
   ---------------------------------------------------------------------- */
/* Flex rather than grid: the block emits a full-width notices container as a
   sibling of the two columns. */
.wp-block-woocommerce-cart .wc-block-cart {
	display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px;
	margin: 0; padding-block: 8px 24px;
}
.wc-block-cart > .wc-block-components-notices { flex: 1 0 100%; }
.wc-block-cart .wc-block-cart__main {
	flex: 1 1 460px; min-width: 0; width: auto; max-width: none; padding: 0;
}
.wc-block-cart .wc-block-cart__sidebar {
	flex: 0 0 380px; width: auto; max-width: none; padding: 0;
}

.wc-block-cart-items {
	border: 1px solid var(--aq-line); border-radius: var(--aq-radius-lg);
	overflow: hidden; border-collapse: separate; border-spacing: 0; width: 100%;
}
.wc-block-cart-items__header {
	background: var(--aq-surface); font-size: 12px; font-weight: 800; letter-spacing: .08em;
	text-transform: uppercase; color: var(--aq-muted); border: 0;
}
.wc-block-cart-items__header th { padding: 14px 20px; border: 0; }
.wc-block-cart-items__row td { border-top: 1px solid var(--aq-line); padding: 20px; }
.wc-block-cart-items__row:first-child td { border-top: 1px solid var(--aq-line); }
.wc-block-components-product-name {
	font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--aq-ink);
}
.wc-block-components-product-name:hover { color: var(--aq-accent); }
.wc-block-components-product-metadata,
.wc-block-components-product-metadata__description {
	font-size: 12.5px; color: var(--aq-muted); font-weight: 600;
}
.wc-block-components-product-price__value { font-weight: 800; }
.wc-block-components-product-price del { color: var(--aq-muted-2); font-weight: 600; }

/* Quantity stepper.
   Woo styles the buttons with `.wc-block-components-quantity-selector
   .wc-block-components-quantity-selector__button` (two classes) and dims them
   to opacity .6, which reads as "disabled". Beat it with the body class. */
.aq-blocks-page .wc-block-components-quantity-selector {
	border: 1.5px solid var(--aq-line);
	border-radius: var(--aq-radius);
	height: 42px;
	max-width: 124px;
	overflow: hidden;
	background: #fff;
}
.aq-blocks-page .wc-block-components-quantity-selector::after { display: none; }

.aq-blocks-page .wc-block-components-quantity-selector .wc-block-components-quantity-selector__input {
	font-size: 15px;
	font-weight: 800;
	color: var(--aq-ink);
	height: 40px;
	padding: 0;
	min-width: 40px;
}
.aq-blocks-page .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	opacity: 1;
	color: var(--aq-muted);
	font-size: 19px;
	font-weight: 700;
	line-height: 1;
	min-width: 38px;
	height: 40px;
	transition: color .15s ease, background-color .15s ease;
}
.aq-blocks-page .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover,
.aq-blocks-page .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus {
	opacity: 1;
	color: var(--aq-ink);
	background: var(--aq-surface);
}
/* A genuinely unavailable step should still read as unavailable. */
.aq-blocks-page .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled,
.aq-blocks-page .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled:hover {
	opacity: 1;
	color: var(--aq-line-3);
	background: transparent;
}

/* Order summary card (cart sidebar) */
.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,
.wc-block-components-totals-wrapper {
	font-family: var(--aq-sans);
}
.wc-block-cart .wc-block-components-sidebar > .wc-block-cart__sidebar-inner,
.wc-block-cart .wc-block-components-sidebar {
	border: 1px solid var(--aq-line); border-radius: var(--aq-radius-lg);
	padding: 24px; background: #fff; position: sticky; top: 24px;
}
.wc-block-cart__totals-title {
	font-size: 17px !important; font-weight: 800 !important; letter-spacing: 0 !important;
	text-transform: none !important; color: var(--aq-ink) !important; padding: 0 0 8px !important;
}
.wc-block-components-totals-item {
	font-size: 14px; font-weight: 600; color: var(--aq-body); padding: 0 0 12px;
}
.wc-block-components-totals-item__value { font-weight: 700; color: var(--aq-ink); }
.wc-block-components-totals-wrapper { border-top-color: var(--aq-line); padding-block: 12px; }
.wc-block-components-totals-footer-item { font-size: 16px; font-weight: 800; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 26px; font-weight: 800;
}
.wc-block-cart__submit-button,
.wc-block-cart__submit-container .wc-block-components-button { width: 100%; }
.wc-block-components-panel__button {
	font-size: 14px; font-weight: 700; color: var(--aq-accent); padding-inline: 0;
}
.wc-block-components-totals-coupon__form .wc-block-components-text-input input { height: 48px; }

.wc-block-cart__empty-cart__title { font-family: var(--aq-serif); font-weight: 700; }

/* -------------------------------------------------------------------------
   Checkout block
   ---------------------------------------------------------------------- */
.wp-block-woocommerce-checkout .wc-block-checkout {
	display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px;
	margin: 0; padding-block: 8px 24px;
}
.wc-block-checkout > .wc-block-components-notices { flex: 1 0 100%; }
.wc-block-checkout .wc-block-checkout__main {
	flex: 1 1 480px; min-width: 0; width: auto; max-width: none; padding: 0;
}
.wc-block-checkout .wc-block-checkout__sidebar {
	flex: 0 0 400px; width: auto; max-width: none;
}

.wc-block-components-checkout-step {
	border: 0; padding-bottom: 28px;
}
.wc-block-components-checkout-step__heading { margin-block: 0 14px; }
.wc-block-components-checkout-step__title { font-size: 22px; }
.wc-block-components-checkout-step__container::after { border-color: var(--aq-line); }

.wc-block-components-radio-control__option {
	border: 1.5px solid var(--aq-line); border-radius: 8px;
	/* The radio input is absolutely positioned, so the label needs room for it. */
	padding: 15px 18px 15px 48px;
	margin-bottom: 12px; font-size: 14.5px; font-weight: 700; color: var(--aq-ink);
}
.wc-block-components-radio-control__input { left: 18px; }
.wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	border: 2px solid var(--aq-accent);
}
.wc-block-components-radio-control__option-layout { gap: 12px; }
.wc-block-components-radio-control__label { font-weight: 700; }
.wc-block-components-radio-control__secondary-label,
.wc-block-components-radio-control__description { font-size: 12.5px; font-weight: 600; color: var(--aq-muted); }
.wc-block-components-radio-control .wc-block-components-radio-control__input:checked::before { background: var(--aq-accent); }

.wc-block-checkout__actions { padding-top: 8px; }
.wc-block-components-checkout-place-order-button {
	width: 100%; height: 56px; background: var(--aq-ink); border-color: var(--aq-ink);
	font-size: 16px; font-weight: 800;
}
.wc-block-components-checkout-place-order-button:hover { background: #0f1a2c; border-color: #0f1a2c; }
.wc-block-checkout__terms { font-size: 12.5px; color: var(--aq-muted); }

.wc-block-checkout .wc-block-components-sidebar {
	background: var(--aq-surface); border-radius: var(--aq-radius-lg); padding: 24px;
	position: sticky; top: 24px;
}
.wc-block-components-order-summary__button-text,
.wc-block-components-order-summary .wc-block-components-panel__button {
	font-size: 16px; font-weight: 800; color: var(--aq-ink);
}
.wc-block-components-order-summary-item__image img {
	width: 60px; height: 60px; object-fit: cover; border-radius: 6px; background: var(--aq-slot);
}
.wc-block-components-order-summary-item__description { font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.wc-block-components-order-summary-item__quantity {
	background: var(--aq-ink); border-color: var(--aq-ink); color: #fff; font-weight: 800;
}

/* -------------------------------------------------------------------------
   Order confirmation blocks
   ---------------------------------------------------------------------- */
.wp-block-woocommerce-order-confirmation-status,
.woocommerce-order-confirmation-status {
	font-family: var(--aq-serif); font-size: 28px; font-weight: 700; color: var(--aq-ink);
}
.wc-block-order-confirmation-summary,
.wp-block-woocommerce-order-confirmation-summary {
	border: 1px solid var(--aq-line); border-radius: var(--aq-radius-lg); padding: 20px;
	background: #fff;
}
.wc-block-order-confirmation-summary-list-item__key { color: var(--aq-muted); font-weight: 600; font-size: 13.5px; }
.wc-block-order-confirmation-summary-list-item__value { color: var(--aq-ink); font-weight: 700; font-size: 13.5px; }
.woocommerce-order-confirmation-totals__table,
.wc-block-order-confirmation-totals table {
	width: 100%; border-collapse: collapse; border: 1px solid var(--aq-line);
	border-radius: var(--aq-radius-lg); overflow: hidden;
}
.wc-block-order-confirmation-totals th,
.wc-block-order-confirmation-totals td { padding: 14px 18px; border-bottom: 1px solid var(--aq-line); font-size: 14px; }

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */
@media (max-width: 1200px) {
	.wc-block-cart .wc-block-cart__sidebar,
	.wc-block-checkout .wc-block-checkout__sidebar { flex-basis: 340px; }
	.wp-block-woocommerce-cart .wc-block-cart { gap: 28px; }
	.wp-block-woocommerce-checkout .wc-block-checkout { gap: 32px; }
}

@media (max-width: 1024px) {
	.wc-block-cart .wc-block-cart__main,
	.wc-block-cart .wc-block-cart__sidebar,
	.wc-block-checkout .wc-block-checkout__main,
	.wc-block-checkout .wc-block-checkout__sidebar { flex: 1 0 100%; }
	.wc-block-cart .wc-block-components-sidebar,
	.wc-block-checkout .wc-block-components-sidebar { position: static; }
}

/* -------------------------------------------------------------------------
   Cart line items
   -------------------------------------------------------------------------
   WooCommerce's block stylesheet targets these with
   `table.wc-block-cart-items .wc-block-cart-items__row .<class>` — three
   classes *plus* an element, so a plain three-class chain loses. Every rule
   below repeats that structure and adds the body class to win outright.
   ---------------------------------------------------------------------- */
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata__description {
	display: none;
}

/* Square 84px thumbnail with a gutter before the copy. */
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
	width: 100px;
	padding-right: 16px;
	vertical-align: top;
}
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image a,
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img {
	display: block;
	width: 84px;
	height: 84px;
}
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img {
	object-fit: cover;
	border-radius: 8px;
	background: var(--aq-tint);
}

.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__wrap {
	gap: 6px;
}

.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--aq-ink);
	display: block;
}
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name:hover {
	color: var(--aq-accent);
}

.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices,
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices .wc-block-components-product-price__value {
	font-size: 14px;
	font-weight: 700;
	color: var(--aq-ink);
}
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices del,
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices del .wc-block-components-product-price__value {
	color: var(--aq-muted-2);
	font-weight: 600;
}

.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
	margin-top: 8px;
}

/* Remove control. Woo's own selector adds `.wc-block-cart-item__quantity`, so
   the theme has to include it too or the colours tie and lose on load order. */
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link,
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link svg {
	color: var(--aq-muted-2);
	fill: currentColor;
}
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover,
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover svg {
	color: #b3423a;
}

/* Line total column. */
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-product-price__value {
	font-size: 16px;
	font-weight: 800;
	color: var(--aq-ink);
}
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total-price-and-sale-badge-wrapper {
	align-items: flex-end;
	gap: 6px;
}
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-sale-badge {
	/* Same ink plate / gold type as the loop and buy-box badges. */
	background: var(--aq-ink);
	color: var(--aq-gold-light);
	border-radius: 0;
	padding: 5px 9px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Column header. */
.aq-blocks-page table.wc-block-cart-items .wc-block-cart-items__header th {
	padding-bottom: 14px;
}

/* Sale badge, everywhere the blocks render one.
   The rule above is scoped to the cart table, so the checkout order summary
   kept the old gold plate. Same ink/gold treatment as every other badge. */
.aq-blocks-page .wc-block-components-sale-badge {
	background: var(--aq-ink);
	color: var(--aq-gold-light);
	border-radius: 0;
	padding: 5px 9px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	white-space: nowrap;
}
