/**
 * Premium My Account — dashboard, orders, addresses
 */

.ach-account-page-wrap {
	background: linear-gradient(180deg, #faf8f3 0%, #f5f0e6 40%, #faf8f3 100%);
	padding: 28px 0 64px;
	min-height: 60vh;
}

.ach-account-page-wrap .ach-container--wc {
	max-width: 1120px;
}

.ach-account-page-wrap .woocommerce-account .woocommerce {
	display: block !important;
	width: 100% !important;
	float: none !important;
	clear: both !important;
}

body.ach-account-page .ach-account {
	display: grid !important;
	grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) !important;
	gap: 24px;
	align-items: start;
	width: 100% !important;
}

body.ach-account-page .woocommerce-MyAccount-navigation,
body.ach-account-page .woocommerce-MyAccount-content {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	clear: none !important;
}

body.ach-account-page .woocommerce-MyAccount-content.ach-account__content {
	width: 100% !important;
	min-width: 0;
	overflow: hidden;
}

/* Layout shell */
.ach-account {
	display: grid;
	grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.ach-account__content {
	background: #fff;
	border: 1px solid rgba(201, 162, 39, 0.22);
	border-radius: 22px;
	padding: 26px 28px 30px;
	box-shadow: 0 8px 32px rgba(107, 79, 10, 0.07);
	min-width: 0;
}

.ach-account__content > h2,
.ach-account__content > h3:first-child {
	margin: 0 0 20px;
	padding-bottom: 14px;
	border-bottom: 1px dashed rgba(201, 162, 39, 0.25);
	font-size: 1.25rem;
	font-weight: 800;
	color: #1c1508;
}

/* Sidebar navigation */
.ach-account-nav {
	background: #fff;
	border: 1px solid rgba(201, 162, 39, 0.22);
	border-radius: 22px;
	padding: 14px;
	box-shadow: 0 8px 32px rgba(107, 79, 10, 0.07);
	position: sticky;
	top: 96px;
}

.ach-account-nav__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px 16px;
	margin-bottom: 8px;
	border-bottom: 1px dashed rgba(201, 162, 39, 0.25);
}

.ach-account-nav__avatar img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 2px solid rgba(201, 162, 39, 0.35);
}

.ach-account-nav__name {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 800;
	color: #1c1508;
	line-height: 1.35;
}

.ach-account-nav__label {
	margin: 2px 0 0;
	font-size: 0.75rem;
	color: #8a7a62;
	font-weight: 600;
}

.ach-account-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ach-account-nav li {
	margin-bottom: 6px;
	list-style: none;
}

.ach-account-nav li a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border-radius: 14px;
	color: #3d3428;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.ach-account-nav li a:hover {
	background: #fffbf0;
	color: #6b4f0a;
}

.ach-account-nav__ico {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	font-size: 0.9375rem;
	background: #fff8e6;
	flex-shrink: 0;
}

.ach-account-nav li.is-active a {
	background: linear-gradient(135deg, #fff8e6, #ffe9a8);
	color: #6b4f0a;
	font-weight: 800;
	box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.35);
}

.ach-account-nav li.is-active .ach-account-nav__ico {
	background: rgba(201, 162, 39, 0.25);
}

.ach-account-nav li.woocommerce-MyAccount-navigation-link--customer-logout a {
	color: #9a3412;
}

.ach-account-nav li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
	background: #fef2f2;
}

/* Dashboard */
.ach-account-dashboard__hero {
	padding: 22px 24px;
	margin-bottom: 22px;
	border-radius: 18px;
	background: linear-gradient(135deg, #fff8e6 0%, #fff 60%);
	border: 1px solid rgba(201, 162, 39, 0.25);
}

.ach-account-dashboard__hero h2 {
	margin: 0 0 8px;
	padding: 0;
	border: none;
	font-size: 1.35rem;
	font-weight: 800;
	color: #1c1508;
}

.ach-account-dashboard__hero p {
	margin: 0;
	font-size: 0.9375rem;
	color: #6b5d45;
	line-height: 1.65;
}

.ach-account-dashboard__hero a {
	color: #8a6d1a;
	font-weight: 700;
	text-decoration: none;
}

.ach-account-dashboard__hero a:hover {
	color: #6b4f0a;
	text-decoration: underline;
}

.ach-account-dashboard__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.ach-account-dashboard__tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 18px 16px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid rgba(201, 162, 39, 0.18);
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ach-account-dashboard__tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(107, 79, 10, 0.1);
	border-color: rgba(201, 162, 39, 0.45);
	color: inherit;
}

.ach-account-dashboard__tile-ico {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	font-size: 1.125rem;
	background: linear-gradient(145deg, #fff8e6, #ffe9a8);
}

.ach-account-dashboard__tile strong {
	font-size: 0.9375rem;
	color: #1c1508;
}

.ach-account-dashboard__tile span {
	font-size: 0.8125rem;
	color: #8a7a62;
	line-height: 1.5;
}

/* Order cards */
.ach-order-cards {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ach-order-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	gap: 12px 16px;
	padding: 18px 20px;
	background: linear-gradient(180deg, #fffdf7, #fff);
	border: 1px solid rgba(201, 162, 39, 0.18);
	border-radius: 18px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ach-order-card:hover {
	box-shadow: 0 8px 24px rgba(107, 79, 10, 0.08);
	border-color: rgba(201, 162, 39, 0.35);
}

.ach-order-card__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	grid-column: 1;
}

.ach-order-card__num {
	font-size: 1.0625rem;
	font-weight: 800;
	color: #8a6d1a;
	text-decoration: none;
}

.ach-order-card__num:hover {
	color: #6b4f0a;
}

.ach-order-card__status {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1.4;
}

.ach-order-card__status--pending,
.ach-order-card__status--on-hold {
	background: #fef3c7;
	color: #92400e;
}

.ach-order-card__status--processing {
	background: #dbeafe;
	color: #1e40af;
}

.ach-order-card__status--completed {
	background: #d1fae5;
	color: #065f46;
}

.ach-order-card__status--cancelled,
.ach-order-card__status--failed {
	background: #fee2e2;
	color: #991b1b;
}

.ach-order-card__status--refunded {
	background: #f3e8ff;
	color: #6b21a8;
}

.ach-order-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 20px;
	grid-column: 1;
	font-size: 0.875rem;
	color: #6b5d45;
}

.ach-order-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ach-order-card__meta-item strong {
	color: #1c1508;
	font-weight: 700;
}

.ach-order-card__actions {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
}

.ach-order-card__actions .button,
.ach-order-card__actions .woocommerce-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 10px 20px !important;
	border-radius: 12px !important;
	background: linear-gradient(135deg, #f0d78c, #c9a227) !important;
	border: none !important;
	color: #1a1408 !important;
	font-family: inherit !important;
	font-size: 0.875rem !important;
	font-weight: 800 !important;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(201, 162, 39, 0.3) !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.ach-order-card__actions .button:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(201, 162, 39, 0.4) !important;
	color: #1a1408 !important;
}

/* Addresses */
.ach-account-addresses__desc {
	margin: 0 0 20px;
	padding: 14px 16px;
	border-radius: 14px;
	background: #fffbf0;
	border: 1px solid rgba(201, 162, 39, 0.2);
	font-size: 0.875rem;
	color: #6b5d45;
	line-height: 1.6;
}

.ach-address-grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	width: 100% !important;
	float: none !important;
	clear: both !important;
}

.ach-address-grid::before,
.ach-address-grid::after {
	display: none !important;
	content: none !important;
}

.ach-address-card,
.ach-account-addresses .woocommerce-Address {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
	box-sizing: border-box;
}

.ach-account-addresses .woocommerce-Address-title,
.ach-account-addresses .woocommerce-Address-title.title {
	float: none !important;
	width: 100% !important;
	position: static !important;
	display: block !important;
}

.ach-account-addresses .woocommerce-Address-title h2,
.ach-account-addresses .woocommerce-Address-title h3 {
	float: none !important;
	width: auto !important;
}

.ach-account-addresses .woocommerce-Address-title .edit {
	float: none !important;
	position: static !important;
}

.ach-account-addresses address {
	display: block !important;
	width: 100% !important;
	white-space: normal !important;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.ach-account-addresses {
	width: 100%;
	min-width: 0;
}

/* Reset WooCommerce legacy float columns inside account content */
body.ach-account-page .ach-account__content .col2-set,
body.ach-account-page .ach-account__content .u-columns {
	width: 100% !important;
	float: none !important;
}

body.ach-account-page .ach-account__content .col2-set::before,
body.ach-account-page .ach-account__content .col2-set::after,
body.ach-account-page .ach-account__content .u-columns::before,
body.ach-account-page .ach-account__content .u-columns::after {
	display: none !important;
}

body.ach-account-page .ach-account__content .col-1,
body.ach-account-page .ach-account__content .col-2,
body.ach-account-page .ach-account__content .u-column1,
body.ach-account-page .ach-account__content .u-column2,
body.ach-account-page .ach-account__content .u-column {
	float: none !important;
	width: auto !important;
	max-width: none !important;
}

.ach-address-card {
	padding: 20px 22px;
	background: linear-gradient(180deg, #fffdf7, #fff);
	border: 1px solid rgba(201, 162, 39, 0.18);
	border-radius: 18px;
	box-shadow: 0 4px 16px rgba(107, 79, 10, 0.04);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ach-address-card:hover {
	box-shadow: 0 8px 24px rgba(107, 79, 10, 0.08);
	border-color: rgba(201, 162, 39, 0.35);
}

.ach-address-card__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px dashed rgba(201, 162, 39, 0.2);
}

.ach-address-card__ico {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	font-size: 1.25rem;
	background: linear-gradient(145deg, #fff8e6, #ffe9a8);
	flex-shrink: 0;
}

.ach-address-card__title-wrap {
	flex: 1;
	min-width: 0;
}

.ach-address-card__title-wrap h2 {
	margin: 0;
	padding: 0;
	border: none;
	font-size: 1rem;
	font-weight: 800;
	color: #1c1508;
}

.ach-address-card__edit {
	display: inline-flex;
	margin-top: 6px;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #8a6d1a;
	text-decoration: none;
}

.ach-address-card__edit:hover {
	color: #6b4f0a;
	text-decoration: underline;
}

.ach-address-card address {
	font-style: normal;
	font-size: 0.9375rem;
	line-height: 1.75;
	color: #3d3428;
}

.ach-address-card--empty address {
	color: #8a7a62;
	font-size: 0.875rem;
}

/* Edit address form */
.ach-account-edit-address {
	max-width: 640px;
}

.ach-account-edit-address .woocommerce-address-fields .form-row {
	margin-bottom: 16px;
}

.ach-account-edit-address label {
	display: block;
	margin-bottom: 7px;
	font-size: 0.875rem;
	font-weight: 700;
	color: #3d3428;
}

.ach-account-edit-address input.input-text,
.ach-account-edit-address select,
.ach-account-edit-address textarea {
	width: 100%;
	padding: 13px 16px;
	border: 1.5px solid #e8dcc4;
	border-radius: 14px;
	font-family: inherit;
	font-size: 0.9375rem;
	background: #fffdf8;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ach-account-edit-address input.input-text:focus,
.ach-account-edit-address select:focus,
.ach-account-edit-address textarea:focus {
	border-color: #c9a227;
	box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.15);
	outline: none;
	background: #fff;
}

.ach-account-edit-address .button {
	padding: 13px 28px !important;
	border-radius: 14px !important;
	background: linear-gradient(135deg, #f0d78c, #c9a227) !important;
	border: none !important;
	color: #1a1408 !important;
	font-weight: 800 !important;
	box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35) !important;
}

/* Empty state */
.ach-account-empty {
	text-align: center;
	padding: 36px 24px;
	border-radius: 18px;
	background: #fffbf0;
	border: 1px dashed rgba(201, 162, 39, 0.35);
}

.ach-account-empty p {
	margin: 0 0 16px;
	color: #6b5d45;
	font-size: 0.9375rem;
}

.ach-account-empty .button {
	padding: 12px 24px !important;
	border-radius: 14px !important;
	background: linear-gradient(135deg, #f0d78c, #c9a227) !important;
	border: none !important;
	color: #1a1408 !important;
	font-weight: 800 !important;
}

/* Pagination */
.ach-account .woocommerce-pagination {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.ach-account .woocommerce-pagination .button {
	padding: 10px 18px !important;
	border-radius: 12px !important;
	background: #fff !important;
	border: 1.5px solid rgba(201, 162, 39, 0.45) !important;
	color: #6b4f0a !important;
	font-weight: 700 !important;
}

/* View order */
.ach-account__content .woocommerce-order-details {
	margin-top: 8px;
}

.ach-account__content mark.order-number,
.ach-account__content mark.order-date,
.ach-account__content mark.order-status {
	background: #fff8e6;
	color: #6b4f0a;
	padding: 2px 8px;
	border-radius: 6px;
	font-weight: 700;
}

/* Override legacy polish red active nav when premium loaded */
.ach-account-page-wrap .woocommerce-MyAccount-navigation ul li.is-active {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
}

@media (max-width: 960px) {
	.ach-account {
		grid-template-columns: 1fr;
	}

	.ach-account-nav {
		position: static;
	}

	.ach-account-nav ul {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 6px;
	}

	.ach-account-nav li {
		margin-bottom: 0;
	}

	.ach-account-dashboard__grid,
	.ach-address-grid {
		grid-template-columns: 1fr;
	}

	.ach-order-card {
		grid-template-columns: 1fr;
	}

	.ach-order-card__actions {
		grid-column: 1;
		grid-row: auto;
	}

	.ach-order-card__actions .button {
		width: 100%;
	}
}

@media (max-width: 520px) {
	.ach-account-nav ul {
		grid-template-columns: 1fr;
	}

	.ach-account__content {
		padding: 20px 16px 24px;
		border-radius: 18px;
	}
}
