/**
 * My Account page
 *
 * Minimal, airy layout with long vertical rhythm to mirror the reference.
 */

.woocommerce-account .site-main.section {
	padding-block: clamp(4.5rem, 8vw, 7rem) clamp(5rem, 10vw, 8.5rem);
}

.woocommerce-account .container.container--2xl {
	max-width: 88rem;
	padding-inline: clamp(2rem, 6vw, 4.25rem);
}

.account-page {
	max-width: 76rem;
	margin: 0 auto;
	padding: 0;
}

.account-page__header {
	margin-bottom: clamp(3.75rem, 10vw, 7.25rem);
}

.account-page__title {
	font-family: "Cormorant Garamond", "Times New Roman", serif;
	font-size: clamp(2.65rem, 6.1vw, 3.8rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	color: #171716;
	margin: 0;
}

.account-page__intro {
	margin: 1.45rem 0 0;
	max-width: 32ch;
	font-family: var(--font-sans);
	font-size: 0.98rem;
	line-height: 1.9;
	color: #252525;
}

/*
 * The sidebar and the details list share one vertical rhythm so each nav item
 * lines up with the row beside it: the first item sits on the section heading,
 * every later item centres on one details row. Both columns read these.
 */
.account-page__grid {
	display: grid;
	grid-template-columns: 10.5rem minmax(0, 1fr);
	column-gap: clamp(3.5rem, 9vw, 8.5rem);
	align-items: start;

	--account-line: 0.67rem;     /* one mono label line (font-size × line-height 1) */
	--account-head-gap: 1.65rem; /* section heading → first row */
	--account-row: 3.8rem;       /* one details row */
}

.account-nav {
	min-width: 0;
}

.account-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0;
	position: sticky;
	top: 6.25rem;
	max-width: 10.5rem;
}

/* Flex removes the inline-block baseline strut that offset the whole nav. */
.account-nav li {
	display: flex;
	align-items: center;
	min-height: var(--account-row);
}

/* First item tracks the section heading, so it clears heading + gap. */
.account-nav li:first-child {
	align-items: flex-start;
	min-height: calc(var(--account-line) + var(--account-head-gap));
}

.account-nav a {
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	color: #141414;
	transition: color var(--transition-fast);
}

/* Underline drawn outside the box, so it can't change the item's height. */
.account-nav a:hover,
.account-nav .is-active a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.35em;
}

.account-page__content {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(3.25rem, 7vw, 5.75rem);
}

.account-dashboard {
	display: flex;
	flex-direction: column;
	gap: var(--account-head-gap, 1.65rem);
}

.account-dashboard--orders {
	margin-top: clamp(2rem, 4vw, 3.2rem);
}

.account-dashboard__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.account-dashboard__title {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	color: #161616;
}

.account-dashboard__view-all {
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	color: #161616;
	padding-bottom: 0.1rem;
	border-bottom: 1px solid transparent;
}

.account-dashboard__view-all:hover {
	border-bottom-color: #161616;
}

.account-details {
	display: flex;
	flex-direction: column;
	border-top: 0;
	border-bottom: 0;
}

/* Fixed pitch rather than padding, so the nav can match it exactly. */
.account-details__row {
	display: grid;
	grid-template-columns: 7.25rem minmax(0, 1fr) auto;
	column-gap: 2.2rem;
	align-items: center;
	min-height: var(--account-row, 3.8rem);
	padding: 0;
	border-bottom: 0;
}

.account-details__label {
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	color: #161616;
}

.account-details__value {
	font-size: 0.93rem;
	line-height: 1.7;
	color: #222;
	word-break: break-word;
}

.account-details__action a {
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	color: #171717;
	padding-bottom: 0.1rem;
	border-bottom: 1px solid transparent;
}

.account-details__action a:hover {
	border-bottom-color: #171717;
}

.account-orders {
	border-top: 0;
	border-bottom: 0;
}

.account-orders__row {
	display: grid;
	grid-template-columns: minmax(8rem, 1.4fr) minmax(6.25rem, 1fr) minmax(5.7rem, 1fr) minmax(5.4rem, 0.9fr) minmax(4.4rem, 0.75fr) auto;
	column-gap: 1.45rem;
	align-items: center;
	padding: 1.18rem 0;
	border-bottom: 0;
	font-size: 0.86rem;
	line-height: 1.55;
	color: #222;
}

.account-orders__row--head {
	padding-top: 0;
	padding-bottom: 1.15rem;
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	color: #161616;
}

.account-orders__cell {
	min-width: 0;
	word-break: break-word;
}

.account-orders__cell--action {
	justify-self: end;
	white-space: nowrap;
	word-break: normal;
}

.account-orders__view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6rem;
	height: 1.6rem;
	font-size: 1.22rem;
	line-height: 1;
	text-decoration: none;
	color: #171717;
	transition: transform var(--transition-fast), color var(--transition-fast);
}

.account-orders__view:hover {
	color: #000;
	transform: translateX(3px);
}

/*
 * Empty states are a plain line of text, never a panel. `.account-empty` is what
 * the shared orders list emits; the dashboard alias is kept for older markup.
 */
.account-empty,
.account-dashboard__empty {
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	line-height: 1.8;
	color: #232323;
	text-transform: none;
	letter-spacing: 0;
	font-family: var(--font-sans);
}

.account-empty a,
.account-dashboard__empty a {
	color: #161616;
	text-decoration: none;
	border-bottom: 1px solid #161616;
}

.account-empty a:hover,
.account-dashboard__empty a:hover {
	border-bottom-color: #000;
}

/* --- Orders pagination --- */

.account-orders__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-6);
	margin-top: var(--space-8);
}

/* Keep the non-dashboard endpoints aligned with the same airy style. */
.woocommerce-MyAccount-content > p,
.woocommerce-MyAccount-content > legend,
.woocommerce-MyAccount-content fieldset > legend {
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	color: #161616;
	margin-bottom: 1.2rem;
}

.woocommerce-MyAccount-content .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 4vw, 3.25rem);
	margin-top: 0.5rem;
}

.woocommerce-MyAccount-content .woocommerce-Address {
	padding-top: 0;
	border-top: 0;
}

.woocommerce-MyAccount-content .woocommerce-Address-title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.95rem;
}

.woocommerce-MyAccount-content .woocommerce-Address-title h3 {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	color: #161616;
}

.woocommerce-MyAccount-content .woocommerce-Address-title .edit,
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content .woocommerce-orders-table .button,
.woocommerce-MyAccount-content .woocommerce-pagination .button {
	padding: 0;
	min-height: auto;
	border: 0;
	background: transparent;
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	color: #171717;
	border-bottom: 1px solid transparent;
}

.woocommerce-MyAccount-content .woocommerce-Address-title .edit:hover,
.woocommerce-MyAccount-content .woocommerce-Button:hover,
.woocommerce-MyAccount-content .woocommerce-orders-table .button:hover,
.woocommerce-MyAccount-content .woocommerce-pagination .button:hover {
	background: transparent;
	border-color: transparent transparent #171717;
	color: #000;
}

.woocommerce-MyAccount-content .woocommerce-orders-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	border-top: 0;
	font-size: 0.9rem;
}

.woocommerce-MyAccount-content .woocommerce-orders-table th,
.woocommerce-MyAccount-content .woocommerce-orders-table td {
	padding: 0.95rem 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 0;
}

.woocommerce-MyAccount-content .woocommerce-orders-table th {
	padding-top: 0;
	padding-bottom: 0.95rem;
	font-family: var(--font-mono);
	font-size: 0.67rem;
	font-weight: var(--weight-medium);
	letter-spacing: 0.11em;
	line-height: 1;
	text-transform: uppercase;
	color: #161616;
}

.woocommerce-MyAccount-content .woocommerce-form-row,
.woocommerce-MyAccount-content .form-row {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin: 0 0 1.6rem;
	padding: 0;
}

.woocommerce-MyAccount-content .woocommerce-form-row label,
.woocommerce-MyAccount-content .form-row label {
	font-size: 0.83rem;
	line-height: 1.4;
	color: #4b4b4b;
}

.woocommerce-MyAccount-content .woocommerce-form-row .input-text,
.woocommerce-MyAccount-content .woocommerce-form-row select,
.woocommerce-MyAccount-content .form-row .input-text,
.woocommerce-MyAccount-content .form-row select,
.woocommerce-MyAccount-content textarea {
	width: 100%;
	min-height: 3rem;
	padding: 0.45rem 0;
	background: transparent;
	border: 0;
	border-bottom: 1px solid #d0d0ca;
	border-radius: 0;
	font-size: 0.98rem;
	line-height: 1.7;
	color: #222;
}

.woocommerce-MyAccount-content .woocommerce-form-row .input-text:focus,
.woocommerce-MyAccount-content .woocommerce-form-row select:focus,
.woocommerce-MyAccount-content .form-row .input-text:focus,
.woocommerce-MyAccount-content .form-row select:focus,
.woocommerce-MyAccount-content textarea:focus {
	outline: none;
	border-bottom-color: #1e1e1e;
}

.woocommerce-MyAccount-content .account-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.woocommerce-MyAccount-content .account-form__intro {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.8;
	color: #262626;
}

@media (max-width: 70rem) {
	.account-page__grid {
		grid-template-columns: 1fr;
		row-gap: 2.8rem;
	}

	.account-nav ul {
		position: static;
		max-width: none;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 1.1rem 1.6rem;
	}

	/* Nothing to line up with once the nav runs horizontally. */
	.account-nav li,
	.account-nav li:first-child {
		min-height: 0;
		align-items: center;
	}

	/* Rows grow past the fixed pitch here, so space them with padding again. */
	.account-details__row {
		min-height: 0;
		padding-block: 1.1rem;
	}
}

@media (max-width: 56rem) {
	.account-details__row {
		grid-template-columns: 6.5rem minmax(0, 1fr) auto;
		column-gap: 1.15rem;
	}

	.account-orders__row {
		grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
		column-gap: 1rem;
	}

	.account-orders__row--head .account-orders__cell:nth-child(5),
	.account-orders__row .account-orders__cell:nth-child(5) {
		display: none;
	}
}

@media (max-width: 45rem) {
	.woocommerce-account .container.container--2xl {
		padding-inline: 1.4rem;
	}

	.account-page__header {
		margin-bottom: 2.7rem;
	}

	.account-page__title {
		font-size: 2.45rem;
	}

	.account-page__intro {
		font-size: 0.91rem;
		line-height: 1.75;
	}

	.account-details__row {
		grid-template-columns: 1fr auto;
		row-gap: 0.4rem;
	}

	.account-details__value {
		grid-column: 1 / -1;
	}

	.account-orders__head {
		display: none;
	}

	.account-orders__row {
		grid-template-columns: 1fr auto;
		row-gap: 0.6rem;
		column-gap: 0.8rem;
		padding: 1.05rem 0;
	}

	.account-orders__cell {
		font-size: 0.88rem;
	}

	.account-orders__cell::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 0.14rem;
		font-family: var(--font-mono);
		font-size: 0.64rem;
		font-weight: var(--weight-medium);
		letter-spacing: 0.1em;
		line-height: 1;
		text-transform: uppercase;
		color: #6b6b6b;
	}

	.account-orders__cell--action {
		grid-column: 2;
		grid-row: 1 / span 4;
		align-self: center;
	}

	.account-orders__cell--action::before {
		display: none;
	}

	.woocommerce-MyAccount-content .woocommerce-Addresses {
		grid-template-columns: 1fr;
	}

	.woocommerce-MyAccount-content .woocommerce-orders-table,
	.woocommerce-MyAccount-content .woocommerce-orders-table thead,
	.woocommerce-MyAccount-content .woocommerce-orders-table tbody,
	.woocommerce-MyAccount-content .woocommerce-orders-table tr,
	.woocommerce-MyAccount-content .woocommerce-orders-table th,
	.woocommerce-MyAccount-content .woocommerce-orders-table td {
		display: block;
		width: 100%;
	}

	.woocommerce-MyAccount-content .woocommerce-orders-table thead {
		display: none;
	}

	.woocommerce-MyAccount-content .woocommerce-orders-table tr {
		padding: 0.85rem 0;
	}

	.woocommerce-MyAccount-content .woocommerce-orders-table td {
		padding: 0.32rem 0;
	}

	.woocommerce-MyAccount-content .woocommerce-orders-table td::before {
		content: attr(data-title);
		display: block;
		margin-bottom: 0.14rem;
		font-family: var(--font-mono);
		font-size: 0.64rem;
		font-weight: var(--weight-medium);
		letter-spacing: 0.1em;
		line-height: 1;
		text-transform: uppercase;
		color: #6b6b6b;
	}

	.woocommerce-MyAccount-content .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions::before {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.account-nav a,
	.account-orders__view,
	.account-orders__view:hover {
		transition: none;
		transform: none;
	}
}