/* =========================================================
   threadslabin - MY ACCOUNT (all endpoints)
   Save as: assets/css/account.css

   Already loaded by the 'account' entry in inc/body-classes.php
   (is_account_page()), so no PHP change is needed.

   Body classes used (from inc/body-classes.php + WooCommerce):
     custom-woo-my-account
     custom-woo-my-account-{orders|view-order|downloads|edit-account|
                            edit-address|payment-methods|lost-password}
     logged-in (WordPress)

   Covers: Login / Register, Lost + Reset password, Dashboard,
   Orders, View order, Downloads, Addresses, Edit address,
   Payment methods, Account details, Notices, Pagination.

   Visual language follows checkout.css (same tokens, radii,
   card shadow and title bar) so account and checkout feel
   like one flow.
   ========================================================= */

body.custom-woo-my-account {
	--ac-accent: var(--madder, #a8402f);
	--ac-accent-dark: #8c3526;
	--ac-accent-soft: #faf1ef;
	--ac-ink: var(--ink, #1a1d1a);
	--ac-text: var(--ink-soft, #5d625c);
	--ac-muted: #8a8f89;
	--ac-second: var(--indigo, #27408b);
	--ac-second-soft: #eef1f8;
	--ac-ok: #2f6b3a;
	--ac-ok-soft: #eef5ef;
	--ac-border: rgba(26, 29, 26, 0.12);
	--ac-border-soft: rgba(26, 29, 26, 0.07);
	--ac-shadow: 0 18px 45px rgba(26, 29, 26, 0.08);
	--ac-radius: 18px;
	--ac-radius-sm: 11px;
	--ac-field-h: 50px;
}

/* =========================================================
   1. PAGE FRAME
   page.php puts every page in .wrap-narrow (680px). Too tight
   for a sidebar + tables, so the account page widens, the
   same way checkout.css does.
   ========================================================= */

body.custom-woo-my-account .site-content {
	background:
		radial-gradient(circle at 0 10%, rgba(168, 64, 47, 0.05), transparent 32%),
		radial-gradient(circle at 100% 8%, rgba(39, 64, 139, 0.05), transparent 34%),
		#fbfaf7;
}

body.custom-woo-my-account .site-main {
	padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem);
}

body.custom-woo-my-account .site-main > .wrap-narrow {
	width: min(100% - 2.5rem, 1240px);
	max-width: none;
}

body.custom-woo-my-account:not(.logged-in) .site-main > .wrap-narrow {
	width: min(100% - 2.5rem, 1040px);
}

/* Lost / reset password is a single small form */
body.custom-woo-my-account-lost-password .site-main > .wrap-narrow {
	width: min(100% - 2.5rem, 560px) !important;
}

body.custom-woo-my-account article.page,
body.custom-woo-my-account .entry,
body.custom-woo-my-account .entry-content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
}

body.custom-woo-my-account .entry-thumb {
	display: none;
}

/* =========================================================
   2. PAGE TITLE (matches checkout)
   ========================================================= */

body.custom-woo-my-account .page-header {
	margin: 0 0 clamp(1.5rem, 4vw, 2.2rem);
	padding: 0;
}

body.custom-woo-my-account .page-title {
	position: relative;
	display: inline-block;
	margin: 0;
	padding: 0 0 15px;
	color: var(--ac-ink);
	font-size: clamp(2.1rem, 4.2vw, 3.2rem);
	line-height: 1.05;
	letter-spacing: -0.04em;
}

body.custom-woo-my-account .page-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 74px;
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ac-accent), var(--ac-second));
}

/* =========================================================
   3. LAYOUT - sidebar + content (logged in)
   ========================================================= */

body.custom-woo-my-account .entry-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

/* WooCommerce clearfix pseudo elements become grid cells otherwise */
body.custom-woo-my-account .entry-content > .woocommerce::before,
body.custom-woo-my-account .entry-content > .woocommerce::after {
	display: none;
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation,
body.custom-woo-my-account .woocommerce-MyAccount-content {
	float: none;
	width: auto;
	margin: 0;
}

body.custom-woo-my-account .woocommerce-MyAccount-content {
	min-width: 0;
	padding: clamp(20px, 3vw, 32px);
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: var(--ac-shadow);
	color: var(--ac-text);
	line-height: 1.65;
}

body.custom-woo-my-account .woocommerce-MyAccount-content > *:last-child {
	margin-bottom: 0;
}

body.custom-woo-my-account .woocommerce-MyAccount-content h2,
body.custom-woo-my-account .woocommerce-MyAccount-content h3,
body.custom-woo-my-account .woocommerce-MyAccount-content legend {
	color: var(--ac-ink);
	font-family: var(--display, system-ui, sans-serif);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

body.custom-woo-my-account .woocommerce-MyAccount-content h2 { font-size: 1.45rem; margin: 0 0 16px; }
body.custom-woo-my-account .woocommerce-MyAccount-content h3 { font-size: 1.15rem; margin: 0 0 12px; }

body.custom-woo-my-account .woocommerce-MyAccount-content strong {
	color: var(--ac-ink);
}

body.custom-woo-my-account .woocommerce-MyAccount-content a:not(.button) {
	color: var(--ac-accent);
	font-weight: 600;
}

body.custom-woo-my-account .woocommerce-MyAccount-content a:not(.button):hover {
	color: var(--ac-accent-dark);
}

/* =========================================================
   4. NAVIGATION
   ========================================================= */

body.custom-woo-my-account .woocommerce-MyAccount-navigation {
	position: sticky;
	top: calc(var(--header-height, 78px) + 24px);
	padding: 10px;
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius);
	background: #fff;
	box-shadow: var(--ac-shadow);
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
	border: 0;
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 12px 14px;
	border-radius: var(--ac-radius-sm);
	color: var(--ac-ink);
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation li a:hover {
	background: var(--chalk, #f3f2ed);
	color: var(--ac-ink);
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--ac-ink);
	color: #fff;
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 6px !important;
	padding-top: 6px !important;
	border-top: 1px solid var(--ac-border-soft) !important;
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation-link--customer-logout a {
	color: var(--ac-accent);
}

body.custom-woo-my-account .woocommerce-MyAccount-navigation-link--customer-logout a:hover {
	background: var(--ac-accent-soft);
	color: var(--ac-accent-dark);
}

/* =========================================================
   5. NOTICES
   ========================================================= */

body.custom-woo-my-account .woocommerce-message,
body.custom-woo-my-account .woocommerce-info,
body.custom-woo-my-account .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 20px;
	padding: 14px 18px;
	border: 1px solid var(--ac-border);
	border-left: 4px solid var(--ac-second);
	border-radius: var(--ac-radius-sm);
	background: #fff;
	color: var(--ac-ink);
	line-height: 1.5;
	list-style: none;
}

body.custom-woo-my-account .woocommerce-message { border-left-color: var(--ac-ok); background: var(--ac-ok-soft); }
body.custom-woo-my-account .woocommerce-error   { border-left-color: var(--ac-accent); background: var(--ac-accent-soft); flex-direction: column; align-items: flex-start; }

body.custom-woo-my-account .woocommerce-message::before,
body.custom-woo-my-account .woocommerce-info::before,
body.custom-woo-my-account .woocommerce-error::before,
body.custom-woo-my-account .woocommerce-message::after,
body.custom-woo-my-account .woocommerce-info::after,
body.custom-woo-my-account .woocommerce-error::after {
	display: none;
}

body.custom-woo-my-account .woocommerce-error li { margin: 0; }

body.custom-woo-my-account .woocommerce-message .button,
body.custom-woo-my-account .woocommerce-info .button {
	float: none;
	order: 2;
	margin: 0;
}

/* =========================================================
   6. BUTTONS
   ========================================================= */

body.custom-woo-my-account .woocommerce .button,
body.custom-woo-my-account .woocommerce button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border: 1px solid var(--ac-accent);
	border-radius: var(--ac-radius-sm);
	background: var(--ac-accent);
	color: #fff;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.custom-woo-my-account .woocommerce .button:hover,
body.custom-woo-my-account .woocommerce button[type="submit"]:hover {
	border-color: var(--ac-accent-dark);
	background: var(--ac-accent-dark);
	color: #fff;
}

/* Secondary: table actions, pagination, payment method actions */
body.custom-woo-my-account .woocommerce-orders-table__cell-order-actions .button,
body.custom-woo-my-account .woocommerce-pagination .button,
body.custom-woo-my-account .payment-method-actions .button {
	min-height: 40px;
	padding: 8px 16px;
	border-color: var(--rule-strong, #a9a79c);
	background: #fff;
	color: var(--ac-ink);
	font-size: 0.85rem;
}

body.custom-woo-my-account .woocommerce-orders-table__cell-order-actions .button:hover,
body.custom-woo-my-account .woocommerce-pagination .button:hover,
body.custom-woo-my-account .payment-method-actions .button:hover {
	border-color: var(--ac-ink);
	background: var(--ac-ink);
	color: #fff;
}

body.custom-woo-my-account .payment-method-actions .button.delete {
	border-color: var(--ac-accent);
	color: var(--ac-accent);
}

body.custom-woo-my-account .payment-method-actions .button.delete:hover {
	background: var(--ac-accent);
	color: #fff;
}

/* =========================================================
   7. FORMS
   ========================================================= */

body.custom-woo-my-account .woocommerce form .form-row {
	display: flex;
	flex-direction: column;
	float: none;
	width: 100%;
	margin: 0 0 18px;
	padding: 0;
}

body.custom-woo-my-account .woocommerce form .form-row::before,
body.custom-woo-my-account .woocommerce form .form-row::after {
	display: none;
}

body.custom-woo-my-account .woocommerce form label {
	display: block;
	margin: 0 0 6px;
	color: var(--ac-ink);
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.4;
}

body.custom-woo-my-account .woocommerce form .required {
	border: 0;
	color: var(--ac-accent);
	text-decoration: none;
}

body.custom-woo-my-account .woocommerce form .input-text,
body.custom-woo-my-account .woocommerce form select,
body.custom-woo-my-account .woocommerce form textarea {
	width: 100%;
	min-height: var(--ac-field-h);
	padding: 12px 14px;
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius-sm);
	background: #fff;
	color: var(--ac-ink);
	font-size: 16px; /* under 16px makes iPhone zoom into the field */
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.custom-woo-my-account .woocommerce form textarea {
	min-height: 110px;
	resize: vertical;
}

body.custom-woo-my-account .woocommerce form .input-text:focus,
body.custom-woo-my-account .woocommerce form select:focus,
body.custom-woo-my-account .woocommerce form textarea:focus {
	border-color: var(--ac-accent);
	outline: none;
	box-shadow: 0 0 0 4px rgba(168, 64, 47, 0.1);
}

body.custom-woo-my-account .woocommerce form .woocommerce-invalid .input-text,
body.custom-woo-my-account .woocommerce form .woocommerce-invalid select {
	border-color: var(--ac-accent);
}

/* First / last name side by side on desktop */
body.custom-woo-my-account .woocommerce-address-fields__field-wrapper,
body.custom-woo-my-account form.woocommerce-EditAccountForm {
	display: flex;
	flex-wrap: wrap;
	column-gap: 18px;
}

body.custom-woo-my-account .woocommerce-address-fields__field-wrapper > *,
body.custom-woo-my-account form.woocommerce-EditAccountForm > * {
	flex: 1 1 100%;
}

body.custom-woo-my-account .woocommerce form .form-row-first,
body.custom-woo-my-account .woocommerce form .form-row-last {
	flex: 1 1 calc(50% - 9px);
	width: calc(50% - 9px);
}

body.custom-woo-my-account form.woocommerce-EditAccountForm > .clear {
	display: none;
}

/* Password field + eye toggle */
body.custom-woo-my-account .woocommerce form .password-input {
	position: relative;
	display: block;
	width: 100%;
}

body.custom-woo-my-account .woocommerce form .password-input .input-text {
	padding-right: 50px;
}

body.custom-woo-my-account .woocommerce form .show-password-input {
	position: absolute;
	top: 50%;
	right: 8px;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background-color: transparent;
	color: var(--ac-muted);
	transform: translateY(-50%);
}

body.custom-woo-my-account .woocommerce form .show-password-input:hover {
	background-color: transparent;
	color: var(--ac-ink);
}

/* Helper text under fields */
body.custom-woo-my-account .woocommerce form .form-row em,
body.custom-woo-my-account #account_display_name_description {
	display: block;
	margin-top: 6px;
	color: var(--ac-muted);
	font-size: 0.85rem;
	font-style: normal;
}

/* Password change box (Account details) */
body.custom-woo-my-account form.woocommerce-EditAccountForm fieldset {
	margin: 10px 0 22px;
	padding: 20px;
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius-sm);
	background: #fcfbf8;
}

body.custom-woo-my-account form.woocommerce-EditAccountForm fieldset legend {
	padding: 0 8px;
	font-size: 1.05rem;
}

/* Select2 - country / state */
body.custom-woo-my-account .select2-container {
	width: 100% !important;
}

body.custom-woo-my-account .select2-container--default .select2-selection--single {
	height: var(--ac-field-h);
	padding: 0;
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius-sm);
}

body.custom-woo-my-account .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0 38px 0 14px;
	color: var(--ac-ink);
	line-height: calc(var(--ac-field-h) - 2px);
}

body.custom-woo-my-account .select2-container--default .select2-selection--single .select2-selection__arrow {
	top: 0;
	right: 8px;
	height: calc(var(--ac-field-h) - 2px);
}

body.custom-woo-my-account .select2-container--focus .select2-selection--single,
body.custom-woo-my-account .select2-container--open .select2-selection--single {
	border-color: var(--ac-accent);
}

/* Remember me + login button on one line */
body.custom-woo-my-account .woocommerce-form-login .form-row:has(.woocommerce-form-login__submit) {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

body.custom-woo-my-account .woocommerce-form__label-for-checkbox {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
	font-weight: 500 !important;
	cursor: pointer;
}

body.custom-woo-my-account .woocommerce-form__label-for-checkbox input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--ac-accent);
}

body.custom-woo-my-account .woocommerce-form-login__submit,
body.custom-woo-my-account .woocommerce-form-register__submit {
	float: none !important;
	margin: 0 !important;
}

body.custom-woo-my-account .woocommerce-LostPassword {
	margin: 4px 0 0;
	font-size: 0.92rem;
}

body.custom-woo-my-account .woocommerce-LostPassword a,
body.custom-woo-my-account .woocommerce-privacy-policy-text a {
	color: var(--ac-accent);
	font-weight: 600;
}

body.custom-woo-my-account .woocommerce-privacy-policy-text {
	color: var(--ac-muted);
	font-size: 0.86rem;
	line-height: 1.55;
}

/* =========================================================
   8. LOGIN / REGISTER / LOST PASSWORD (logged out)
   ========================================================= */

body.custom-woo-my-account #customer_login.col2-set {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
}

body.custom-woo-my-account #customer_login.col2-set::before,
body.custom-woo-my-account #customer_login.col2-set::after {
	display: none;
}

body.custom-woo-my-account #customer_login .u-column1,
body.custom-woo-my-account #customer_login .u-column2 {
	float: none;
	width: auto;
	max-width: none;
	padding: 0;
}

body.custom-woo-my-account #customer_login h2,
body.custom-woo-my-account:not(.logged-in) .entry-content > .woocommerce > h2 {
	margin: 0 0 14px;
	color: var(--ac-ink);
	font-size: 1.5rem;
	letter-spacing: -0.02em;
}

body.custom-woo-my-account .woocommerce-form-login,
body.custom-woo-my-account .woocommerce-form-register,
body.custom-woo-my-account .woocommerce-ResetPassword {
	margin: 0 !important;
	padding: clamp(20px, 3vw, 30px) !important;
	border: 1px solid var(--ac-border) !important;
	border-radius: var(--ac-radius) !important;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: var(--ac-shadow);
}

/* Registration switched off = login form alone, keep it narrow */
body.custom-woo-my-account:not(.logged-in) .entry-content > .woocommerce > h2,
body.custom-woo-my-account:not(.logged-in) .entry-content > .woocommerce > .woocommerce-form-login {
	max-width: 480px;
	margin-left: auto !important;
	margin-right: auto !important;
}

body.custom-woo-my-account .woocommerce-ResetPassword > p:first-child {
	margin-bottom: 18px;
	color: var(--ac-text);
}

/* =========================================================
   9. TABLES - orders, downloads, payment methods, order details
   ========================================================= */

body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table {
	width: 100%;
	margin: 0 0 22px;
	border: 1px solid var(--ac-border);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--ac-radius-sm);
	overflow: hidden;
	background: #fff;
	font-size: 0.95rem;
}

body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table th,
body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid var(--ac-border-soft);
	color: var(--ac-ink);
	text-align: left;
	vertical-align: middle;
	line-height: 1.45;
}

body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table thead th {
	background: var(--chalk, #f3f2ed);
	color: var(--ac-text);
	font-size: 0.82rem;
	font-weight: 700;
	white-space: nowrap;
}

body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table tbody tr:last-child > *,
body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table tfoot tr:last-child > * {
	border-bottom: 0;
}

body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table tfoot th,
body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table tfoot td {
	background: #fcfbf8;
}

body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table tfoot tr:last-child > * {
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1.05rem;
	font-weight: 700;
}

body.custom-woo-my-account .woocommerce-orders-table__cell-order-number a {
	color: var(--ac-ink) !important;
	font-family: var(--display, system-ui, sans-serif);
}

body.custom-woo-my-account .woocommerce-orders-table__cell-order-actions {
	white-space: nowrap;
}

body.custom-woo-my-account .woocommerce-orders-table__cell-order-actions .button {
	margin: 2px 6px 2px 0;
}

/* Status colour */
body.custom-woo-my-account .woocommerce-orders-table__cell-order-status { font-weight: 700; }
body.custom-woo-my-account .woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status { color: var(--ac-ok); }
body.custom-woo-my-account .woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status,
body.custom-woo-my-account .woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status { color: var(--ac-second); }
body.custom-woo-my-account .woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
body.custom-woo-my-account .woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status,
body.custom-woo-my-account .woocommerce-orders-table__row--status-refunded .woocommerce-orders-table__cell-order-status { color: var(--ac-accent); }

/* Previous / Next */
body.custom-woo-my-account .woocommerce-pagination {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 16px;
}

body.custom-woo-my-account .woocommerce-pagination .button {
	float: none;
	margin: 0;
}

/* =========================================================
   10. VIEW ORDER
   ========================================================= */

body.custom-woo-my-account-view-order .woocommerce-MyAccount-content > p:first-of-type {
	padding: 14px 18px;
	border-radius: var(--ac-radius-sm);
	background: var(--chalk, #f3f2ed);
	color: var(--ac-ink);
}

body.custom-woo-my-account .woocommerce-MyAccount-content mark {
	background: transparent;
	color: var(--ac-ink);
	font-weight: 700;
}

body.custom-woo-my-account .woocommerce-order-details,
body.custom-woo-my-account .woocommerce-customer-details {
	margin: 0 0 26px;
}

body.custom-woo-my-account .woocommerce-table--order-details td.product-name {
	word-break: break-word;
}

body.custom-woo-my-account .woocommerce-table--order-details td.product-name a {
	color: var(--ac-ink) !important;
}

body.custom-woo-my-account .woocommerce-table--order-details th:last-child,
body.custom-woo-my-account .woocommerce-table--order-details td:last-child {
	text-align: right;
}

body.custom-woo-my-account .woocommerce-table--order-details .wc-item-meta {
	margin: 6px 0 0;
	padding: 0;
	color: var(--ac-muted);
	font-size: 0.85rem;
	list-style: none;
}

body.custom-woo-my-account .woocommerce-table--order-details .wc-item-meta li,
body.custom-woo-my-account .woocommerce-table--order-details .wc-item-meta p {
	display: inline;
	margin: 0;
}

/* Order updates / notes */
body.custom-woo-my-account .woocommerce-OrderUpdates {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

body.custom-woo-my-account .woocommerce-OrderUpdate {
	margin: 0 0 10px;
	padding: 14px 16px;
	border-left: 3px solid var(--ac-second);
	border-radius: 0 var(--ac-radius-sm) var(--ac-radius-sm) 0;
	background: var(--ac-second-soft);
}

body.custom-woo-my-account .woocommerce-OrderUpdate-meta {
	margin: 0 0 4px;
	color: var(--ac-muted);
	font-size: 0.8rem;
}

/* Billing / shipping on view order */
body.custom-woo-my-account .woocommerce-customer-details .col2-set,
body.custom-woo-my-account .woocommerce-columns--addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	width: 100%;
}

body.custom-woo-my-account .woocommerce-customer-details .col2-set::before,
body.custom-woo-my-account .woocommerce-customer-details .col2-set::after,
body.custom-woo-my-account .woocommerce-columns--addresses::before,
body.custom-woo-my-account .woocommerce-columns--addresses::after {
	display: none;
}

body.custom-woo-my-account .woocommerce-customer-details .col2-set > *,
body.custom-woo-my-account .woocommerce-columns--addresses > * {
	float: none;
	width: auto;
	max-width: none;
}

body.custom-woo-my-account .woocommerce-customer-details address {
	margin: 0;
	padding: 18px;
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius-sm);
	background: #fff;
	color: var(--ac-text);
	font-style: normal;
	line-height: 1.7;
	word-break: break-word;
}

body.custom-woo-my-account .woocommerce-customer-details address p {
	margin: 6px 0 0;
}

/* =========================================================
   11. ADDRESSES LIST
   ========================================================= */

body.custom-woo-my-account .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	width: 100%;
	margin-top: 16px;
}

body.custom-woo-my-account .woocommerce-Addresses::before,
body.custom-woo-my-account .woocommerce-Addresses::after {
	display: none;
}

body.custom-woo-my-account .woocommerce-Addresses .woocommerce-Address {
	float: none;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 20px;
	border: 1px solid var(--ac-border);
	border-radius: var(--ac-radius-sm);
	background: #fff;
}

body.custom-woo-my-account .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ac-border-soft);
}

body.custom-woo-my-account .woocommerce-Address-title::before,
body.custom-woo-my-account .woocommerce-Address-title::after {
	display: none;
}

body.custom-woo-my-account .woocommerce-Address-title h2,
body.custom-woo-my-account .woocommerce-Address-title h3 {
	float: none;
	margin: 0;
	font-size: 1.1rem;
}

body.custom-woo-my-account .woocommerce-Address-title .edit {
	float: none;
	flex-shrink: 0;
	font-size: 0.9rem;
}

body.custom-woo-my-account .woocommerce-Address address {
	margin: 0;
	color: var(--ac-text);
	font-style: normal;
	line-height: 1.7;
	word-break: break-word;
}

/* =========================================================
   12. MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	body.custom-woo-my-account .woocommerce * {
		transition: none !important;
	}
}

/* =========================================================
   TABLET - up to 1024px
   ========================================================= */

@media (max-width: 1024px) {
	body.custom-woo-my-account .entry-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) {
		grid-template-columns: 210px minmax(0, 1fr);
		gap: 20px;
	}

	/* Content column is narrow here, so cards stack */
	body.custom-woo-my-account .woocommerce-Addresses,
	body.custom-woo-my-account .woocommerce-customer-details .col2-set,
	body.custom-woo-my-account .woocommerce-columns--addresses {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   MOBILE - up to 768px
   ========================================================= */

@media (max-width: 768px) {
	body.custom-woo-my-account .site-main > .wrap-narrow,
	body.custom-woo-my-account:not(.logged-in) .site-main > .wrap-narrow {
		width: min(100% - 2rem, 1240px);
	}

	body.custom-woo-my-account .entry-content > .woocommerce:has(> .woocommerce-MyAccount-navigation) {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	/* Nav turns into a swipeable row of pills */
	body.custom-woo-my-account .woocommerce-MyAccount-navigation {
		position: static;
		padding: 6px;
		border-radius: 999px;
		box-shadow: none;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-navigation ul {
		flex-direction: row;
		gap: 4px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
		display: none;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-navigation li {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-navigation li a {
		padding: 10px 14px;
		border-radius: 999px;
		font-size: 0.88rem;
		white-space: nowrap;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-navigation-link--customer-logout {
		margin-top: 0 !important;
		padding-top: 0 !important;
		border-top: 0 !important;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-content {
		padding: 18px 16px;
		border-radius: 14px;
	}

	/* Login + register stack */
	body.custom-woo-my-account #customer_login.col2-set {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	/* Names full width */
	body.custom-woo-my-account .woocommerce form .form-row-first,
	body.custom-woo-my-account .woocommerce form .form-row-last {
		flex: 1 1 100%;
		width: 100%;
	}

	body.custom-woo-my-account form.woocommerce-EditAccountForm fieldset {
		padding: 16px;
	}

	/* Save buttons full width */
	body.custom-woo-my-account .woocommerce-address-fields .button,
	body.custom-woo-my-account form.woocommerce-EditAccountForm .button,
	body.custom-woo-my-account .woocommerce-ResetPassword .button,
	body.custom-woo-my-account .woocommerce-form-register__submit {
		width: 100%;
	}

	body.custom-woo-my-account .woocommerce-message,
	body.custom-woo-my-account .woocommerce-info {
		flex-direction: column;
		align-items: stretch;
	}

	body.custom-woo-my-account .woocommerce-message .button,
	body.custom-woo-my-account .woocommerce-info .button {
		width: 100%;
	}

	/* ---- Tables become cards (orders, downloads, payment methods) ---- */
	body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table_responsive {
		border: 0;
		border-radius: 0;
		overflow: visible;
		background: transparent;
	}

	body.custom-woo-my-account table.shop_table_responsive thead {
		display: none;
	}

	body.custom-woo-my-account table.shop_table_responsive,
	body.custom-woo-my-account table.shop_table_responsive tbody,
	body.custom-woo-my-account table.shop_table_responsive tbody tr {
		display: block;
		width: 100%;
	}

	body.custom-woo-my-account table.shop_table_responsive tbody tr {
		margin: 0 0 14px;
		border: 1px solid var(--ac-border);
		border-radius: var(--ac-radius-sm);
		overflow: hidden;
		background: #fff;
	}

	/* th included: newer WooCommerce prints the order number as <th>,
	   which woocommerce-smallscreen.css hides on phones */
	body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table_responsive tbody tr > td,
	body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table_responsive tbody tr > th {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		width: 100%;
		padding: 12px 14px;
		border-bottom: 1px solid var(--ac-border-soft);
		background: transparent;
		text-align: right !important;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table_responsive tbody tr > *:last-child {
		border-bottom: 0;
	}

	body.custom-woo-my-account table.shop_table_responsive tbody tr > td::before,
	body.custom-woo-my-account table.shop_table_responsive tbody tr > th::before {
		content: attr(data-title);
		float: none !important;
		flex-shrink: 0;
		color: var(--ac-muted);
		font-family: var(--body, system-ui, sans-serif);
		font-size: 0.82rem;
		font-weight: 700;
		text-align: left;
	}

	/* Order number row = card header */
	body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table_responsive tbody tr > .woocommerce-orders-table__cell-order-number {
		background: var(--chalk, #f3f2ed);
	}

	/* Action rows: no label, buttons share the width */
	body.custom-woo-my-account table.shop_table_responsive tbody tr > .woocommerce-orders-table__cell-order-actions::before,
	body.custom-woo-my-account table.shop_table_responsive tbody tr > .download-file::before,
	body.custom-woo-my-account table.shop_table_responsive tbody tr > .payment-method-actions::before {
		display: none;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table_responsive tbody tr > .woocommerce-orders-table__cell-order-actions,
	body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table_responsive tbody tr > .download-file,
	body.custom-woo-my-account .woocommerce-MyAccount-content table.shop_table_responsive tbody tr > .payment-method-actions {
		flex-wrap: wrap;
		gap: 8px;
		white-space: normal;
	}

	body.custom-woo-my-account table.shop_table_responsive .woocommerce-orders-table__cell-order-actions .button,
	body.custom-woo-my-account table.shop_table_responsive .download-file .button,
	body.custom-woo-my-account table.shop_table_responsive .payment-method-actions .button {
		flex: 1 1 0;
		margin: 0;
	}

	/* Order details (view order) stays a 2-column table, just tighter */
	body.custom-woo-my-account .woocommerce-table--order-details th,
	body.custom-woo-my-account .woocommerce-table--order-details td {
		padding: 12px !important;
		font-size: 0.9rem;
	}

	body.custom-woo-my-account .woocommerce-Addresses .woocommerce-Address {
		padding: 16px;
	}

	body.custom-woo-my-account .woocommerce-pagination .button {
		flex: 1 1 0;
	}
}

/* =========================================================
   SMALL PHONES - up to 480px
   ========================================================= */

@media (max-width: 480px) {
	body.custom-woo-my-account .page-title {
		font-size: 2rem;
	}

	body.custom-woo-my-account .woocommerce-MyAccount-content h2,
	body.custom-woo-my-account #customer_login h2,
	body.custom-woo-my-account:not(.logged-in) .entry-content > .woocommerce > h2 {
		font-size: 1.25rem;
	}

	body.custom-woo-my-account .woocommerce-form-login .form-row:has(.woocommerce-form-login__submit) {
		flex-direction: column;
		align-items: stretch;
	}

	body.custom-woo-my-account .woocommerce-form-login__submit {
		width: 100%;
	}

	body.custom-woo-my-account .woocommerce-Address-title {
		flex-wrap: wrap;
	}

	body.custom-woo-my-account table.shop_table_responsive .woocommerce-orders-table__cell-order-actions .button {
		flex: 1 1 100%;
	}
}