/* CRESTIAL — cart, checkout, order received, My Account.
 *
 * ⚑ HAND-WRITTEN, like shop.css and product.css. The other ten files in this directory are
 * GENERATED from the mockups by _source/_docs/build_page_css.py and must not be edited; there
 * is no mockup for any of these four, because the design was drawn in September for a site
 * with no shop.
 *
 * ⚑ THEY WERE UNREACHABLE UNTIL 21 OCTOBER AND SO NOBODY HAD SEEN THEM. With no purchasable
 * product there is no cart to get to; the spares were priced on 21 Oct and these four screens
 * became live the same hour. Walked through with a real order on 23 Oct, they were: full
 * bleed at x=0 while every other screen on the site keeps a gutter, a raw browser quantity
 * box and an unstyled "Add to cart" link, and account forms in default grey buttons with red
 * asterisks. The order itself was correct throughout — it was only ever the clothes.
 *
 * ⚑ TWO DIFFERENT KINDS OF MARKUP LIVE HERE, and the rules are grouped that way below:
 *   * CART and CHECKOUT are WooCommerce BLOCKS. They ship their own stylesheet and it is
 *     decent — the job is the page frame and the brand's type and buttons, not a rebuild.
 *   * MY ACCOUNT and ORDER RECEIVED are classic WooCommerce templates whose stylesheet this
 *     theme dequeues, so everything they need is here.
 *
 * It borrows the pill, the card ground, the field treatment and the type scale from the rest
 * of the site. It has NOT had a client design review — cr-shop-design on the board.
 */

/* ============================================================================
 * The page frame
 *
 * ⚑ THE ONE FAULT ALL FOUR SHARED. Nothing gave these pages a width or a gutter, so they ran
 * edge to edge against a header and footer that do not. `.wrap` is the design's own measure
 * (max-width var(--wrap), padding 0 var(--gut)) and this applies it to whatever WooCommerce
 * puts on the page, without needing a template override per screen.
 * ========================================================================== */

.woocommerce-page #main > .woocommerce,
.woocommerce-page #main > .entry-content,
.woocommerce-page #main > .wp-block-woocommerce-cart,
.woocommerce-page #main > .wp-block-woocommerce-checkout,
.woocommerce-page #main > article,
body:not(.has-band) #main > .woocommerce {
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gut);
}

/* The page title, in the design's section voice rather than the browser's h1. */
.woocommerce-page .entry-title,
.woocommerce-page .woocommerce-products-header__title {
	max-width: var(--wrap);
	margin: 0 auto clamp(26px, 3vw, 44px);
	padding: 0 var(--gut);
	font-size: clamp(30px, 3.4vw, 46px);
	font-weight: 200;
	letter-spacing: -.01em;
	line-height: 1.12;
	color: var(--ink);
}

/* ============================================================================
 * Cart and checkout — WooCommerce blocks
 *
 * Light touch on purpose. The block checkout is a well-tested piece of UI and most of what it
 * does is right; replacing its layout would be rebuilding a checkout, which is the single
 * worst place on a site to be inventive. What it does not know is the brand's type, its pill
 * and its field treatment, so that is all this sets.
 * ========================================================================== */

.wc-block-components-title,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-title {
	font-family: inherit;
	font-weight: 300;
	letter-spacing: -.005em;
	color: var(--ink);
}

.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-combobox input,
.wc-block-components-textarea {
	font: inherit;
	font-size: 15px;
	color: var(--ink);
	background: var(--cream);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.wc-block-components-text-input.is-active input:focus,
.wc-block-components-textarea:focus {
	outline: none;
	border-color: var(--orange);
	box-shadow: none;
}

/* The design's solid pill, on the two buttons that matter. */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	font: inherit;
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cream);
	background: var(--ink);
	border: 1px solid var(--ink);
	border-radius: 999px;
	padding: 16px 32px;
	transition: background .4s var(--ease), border-color .4s var(--ease);
}

.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
	background: var(--orange);
	border-color: var(--orange);
}

/* The order summary panel is the design's card. */
.wp-block-woocommerce-cart-order-summary-block,
.wp-block-woocommerce-checkout-order-summary-block {
	background: var(--card);
	border-radius: var(--rad);
	padding: clamp(20px, 2.4vw, 32px);
}

.wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--ink);
}

/* ============================================================================
 * My Account and Order received — classic templates, no WooCommerce CSS
 * ========================================================================== */

.woocommerce-account .woocommerce h2,
.woocommerce-order-received .woocommerce h2 {
	font-size: clamp(20px, 2vw, 26px);
	font-weight: 300;
	color: var(--ink);
	margin: 0 0 18px;
}

.woocommerce form.woocommerce-form-login,
.woocommerce form.woocommerce-form-register,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-order-received .woocommerce-order {
	background: var(--card);
	border-radius: var(--rad);
	padding: clamp(24px, 3vw, 40px);
}

/* Two columns at desk width: the design never stacks two short forms down a 1400px page.
 *
 * ⚑ `.u-columns`, NOT `.woocommerce`. The first version gridded the wrapper, whose children
 * are a notices div and `.u-columns` — so it made two columns out of the notices and
 * everything else, and the two forms stayed stacked inside the second one. It LOOKED like the
 * rule had not applied; it had, perfectly, to the wrong element. WooCommerce's own
 * `.u-columns > .col-1 / .col-2` is the pair that wants splitting. */
@media (min-width: 900px) {
	.woocommerce-account:not(.logged-in) .u-columns {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: clamp(24px, 3vw, 44px);
		align-items: start;
	}
}

.woocommerce form .form-row label {
	display: block;
	margin-bottom: 8px;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--taupe);
}

/* ⚑ --taupe, not the browser's red. WooCommerce marks required fields with a red asterisk and
   nothing else on this site is red; three of them down a login form read as three errors. */
.woocommerce form .form-row .required,
.woocommerce form .form-row abbr.required {
	color: var(--taupe);
	border: 0;
	text-decoration: none;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row input[type="password"],
.woocommerce form .form-row input[type="email"],
.woocommerce form .form-row input[type="text"],
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
	font: inherit;
	font-size: 15px;
	width: 100%;
	color: var(--ink);
	background: var(--cream);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 13px 15px;
	transition: border-color .4s var(--ease);
}

.woocommerce form .form-row input:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
	outline: none;
	border-color: var(--orange);
}

.woocommerce form .form-row {
	margin: 0 0 20px;
}

.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button {
	display: inline-flex;
	align-items: center;
	font: inherit;
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cream);
	background: var(--ink);
	border: 1px solid var(--ink);
	border-radius: 999px;
	padding: 15px 32px;
	cursor: pointer;
	transition: background .4s var(--ease), border-color .4s var(--ease);
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover {
	background: var(--orange);
	border-color: var(--orange);
	color: var(--cream);
}

/* The account navigation, as a quiet list rather than WooCommerce's bulleted one. */
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-MyAccount-navigation li {
	border-bottom: 1px solid var(--line);
}

.woocommerce-MyAccount-navigation a {
	display: block;
	padding: 13px 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--taupe);
	transition: color .3s var(--ease);
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation a:hover {
	color: var(--ink);
}

@media (min-width: 900px) {
	.woocommerce-account.logged-in .woocommerce {
		display: grid;
		grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
		gap: clamp(28px, 4vw, 64px);
		align-items: start;
	}

	/*
	 * ⚑ WooCommerce's OWN CLEARFIX PSEUDO-ELEMENTS ARE GRID ITEMS, and they were taking two of
	 * the four cells. woocommerce.css declares
	 *
	 *     .woocommerce-account .woocommerce::after,
	 *     .woocommerce-account .woocommerce::before { content: " "; display: table; }
	 *
	 * to clear the floats in its own layout sheet. A pseudo-element with `content` is a box,
	 * and a box that is a child of a grid container is a GRID ITEM — so this two-column grid
	 * had four items and auto-placed them ::before→(1,1), nav→(1,2), content→(2,1),
	 * ::after→(2,2). Measured on the real page: the navigation sat in the wide right column
	 * and "Hello pixadmin" underneath it in a 220px box, three words to a line.
	 *
	 * ⚑ AND IT ONLY HAPPENS HERE, which is why nothing caught it. inc/woocommerce.php drops
	 * woocommerce-general on the BROWSE screens and keeps it on cart, checkout and account —
	 * deliberately, because those screens are made of the form rows and notices it styles. So
	 * the one stylesheet that supplies this clearfix is loaded on exactly the one page we grid.
	 *
	 * The clearfix has nothing to clear: woocommerce-layout.css, which does the floating, is
	 * dequeued on every shop screen. `content: none` removes the pseudo-element outright
	 * rather than hiding it — `display: none` would still generate the box.
	 */
	.woocommerce-account.logged-in .woocommerce::before,
	.woocommerce-account.logged-in .woocommerce::after {
		content: none;
	}

	/*
	 * Placed, not auto-placed. With the pseudo-elements gone, auto-placement gets this right on
	 * its own — but it got it wrong for a fortnight because of two boxes nobody could see, and
	 * the next thing WooCommerce adds to this wrapper would do it again. Naming the cells costs
	 * two lines and makes the layout independent of what else turns up inside it.
	 */
	.woocommerce-account.logged-in .woocommerce-MyAccount-navigation {
		grid-column: 1;
		grid-row: 1;
	}

	.woocommerce-account.logged-in .woocommerce-MyAccount-content {
		grid-column: 2;
		grid-row: 1;
	}
}

/* ----------------------------------------------------------------------------
 * Addresses
 *
 * Two more things woocommerce-layout.css used to do with floats, which this theme dequeues on
 * every shop screen. Without them the heading and its "Add billing address" link stacked, with
 * the link alone on the next line pushed to the right, and Billing sat above Shipping down a
 * 1400px page. Found 23 Oct 2026 while fixing the dashboard, on the screen next door.
 * -------------------------------------------------------------------------- */

/*
 * ⚑ THE SAME CLEARFIX TRAP AS THE DASHBOARD GRID, AND IT WOULD HAVE BEEN WORSE HERE.
 * woocommerce.css declares `.woocommerce-account .addresses .title::before/::after` with
 * `content: " "`, and a pseudo-element with content is a FLEX item just as surely as it is a
 * grid item. With `justify-content: space-between` below and four items instead of two,
 * ::before would have been pinned to the left edge and ::after to the right, leaving the
 * heading and the link bunched together in the middle — a stranger result than the bug being
 * fixed. Neutralise first, then lay out.
 *
 * ⚑ AND IT HAS TO OUT-SPECIFY WooCommerce, which the first attempt did not. Theirs is
 * `.woocommerce-account .addresses .title::before` — three classes. Mine was
 * `.woocommerce-account .woocommerce-Address-title::before`, two, so it lost and the
 * pseudo-elements stayed. The page still LOOKED fixed, because the phantom boxes are
 * zero-width and `space-between` parks them on the two edges — the only tell was "Billing
 * address" wrapping to two lines, because four flex items means three 16px gaps and two of
 * them were being spent on nothing. Measuring the computed `content` is what found it; the
 * screenshot would not have.
 */
.woocommerce-account .woocommerce-Addresses .woocommerce-Address-title.title::before,
.woocommerce-account .woocommerce-Addresses .woocommerce-Address-title.title::after {
	content: none;
}

.woocommerce-account .woocommerce-Address-title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}

/* `float: right` is WooCommerce's, from the sheet we keep. It is ignored on a flex item, but
   saying so beats leaving a reader to work out which rule won. */
.woocommerce-account .woocommerce-Address-title .edit {
	float: none;
	flex: 0 0 auto;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--taupe);
	text-decoration: none;
	transition: color .3s var(--ease);
}

.woocommerce-account .woocommerce-Address-title .edit:hover {
	color: var(--ink);
}

.woocommerce-account .woocommerce-Address address {
	font-style: normal;
	margin: 0;
}

/*
 * ⚑ 1100px, NOT the 900px the other two-column rules in this file use, and the number was
 * measured rather than picked. These columns sit INSIDE the account content column, which is
 * already the page minus the gutters, minus the 220px navigation, minus its gap — so at 1024
 * each address gets 277px, and "Billing address" plus its uppercase "ADD BILLING ADDRESS"
 * link need about 300. The heading wrapped to two lines. At 1100 the pair has ~340 and fits;
 * below it they stack and each has the full width.
 */
@media (min-width: 1100px) {
	.woocommerce-account .woocommerce-Addresses {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: clamp(24px, 3vw, 44px);
		align-items: start;
	}
}

/* The order table on the thank-you page and in the account. */
.woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14.5px;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 14px 0;
	text-align: left;
	border-bottom: 1px solid var(--line);
}

.woocommerce table.shop_table th {
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--taupe);
}

/* The receipt strip above the order — order number, date, total, payment method. */
.woocommerce ul.woocommerce-order-overview {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 14px clamp(24px, 4vw, 54px);
	margin: 0 0 clamp(26px, 3vw, 40px);
	padding: 0;
}

.woocommerce ul.woocommerce-order-overview li {
	font-size: 15px;
	color: var(--ink);
}

.woocommerce ul.woocommerce-order-overview li strong {
	display: block;
	margin-top: 4px;
	font-weight: 400;
}

.woocommerce .woocommerce-thankyou-order-received {
	font-size: clamp(16px, 1.3vw, 18px);
	color: var(--taupe);
	margin-bottom: clamp(24px, 3vw, 36px);
}
