/**
 * WooCommerce My Account — layout, readable nav, no clipped labels.
 */

/* Undo shop-wide zero-padding / full-bleed side effects on account pages */
body.woocommerce-account .site-content .ast-container,
body.woocommerce-account #primary,
body.woocommerce-account #primary.content-area,
body.woocommerce-account .entry-content {
	margin-left: auto !important;
	margin-right: auto !important;
	left: auto !important;
	right: auto !important;
	width: 100% !important;
	max-width: 100% !important;
	overflow: visible !important;
	padding-left: clamp(16px, 4vw, 48px) !important;
	padding-right: clamp(16px, 4vw, 48px) !important;
	box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 2rem 2.5rem;
	max-width: 1140px;
	margin: 0 auto;
	padding: 2rem 0 3rem;
	box-sizing: border-box;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
	flex: 0 0 280px;
	width: 280px;
	max-width: 100%;
	min-width: 0;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: visible !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	margin: 0 0 0.35rem;
	padding: 0;
	overflow: visible !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	flex-wrap: nowrap;
	padding: 0.65rem 1rem !important;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	color: #1a1a1a;
	text-decoration: none;
	text-indent: 0 !important;
	white-space: nowrap !important;
	word-break: normal !important;
	overflow: visible !important;
	box-sizing: border-box;
	transition: background 0.15s ease, color 0.15s ease;
}

/* WooCommerce order/download counts (green badges) stay on one line */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a .count,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li .count {
	flex-shrink: 0;
	margin: 0 !important;
	float: none !important;
	white-space: nowrap;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	background: #fff3eb;
	color: #c55800;
}

body.woocommerce-account .woocommerce-MyAccount-content {
	flex: 1 1 360px;
	min-width: 0;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
}

body.woocommerce-account .woocommerce-MyAccount-content > p {
	font-size: 1rem;
	line-height: 1.55;
	color: #374151;
}

body.woocommerce-account .es-account-dashboard-greeting {
	font-size: 1.15rem;
	margin-bottom: 0.75rem;
}

/* Footer — avoid huge empty black block on short account pages */
body.woocommerce-account #page {
	display: flex !important;
	flex-direction: column !important;
	min-height: auto !important;
	background: #fff !important;
}

body.woocommerce-account .site-content,
body.woocommerce-account #content {
	flex: 1 0 auto !important;
	background: #fff !important;
}

body.woocommerce-account .site-footer,
body.woocommerce-account footer.site-footer,
body.woocommerce-account #colophon {
	flex-shrink: 0 !important;
	margin-top: 0 !important;
}

body.woocommerce-account .site-primary-footer-wrap,
body.woocommerce-account .site-above-footer-wrap,
body.woocommerce-account .site-below-footer-wrap {
	min-height: 0 !important;
}

/* Primary footer widget row — collapse when empty (Astra black bar) */
body.woocommerce-account .site-primary-footer-wrap {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.woocommerce-account .site-primary-footer-wrap:not(:has(.footer-widget-area *)),
body.woocommerce-account .site-primary-footer-wrap .ast-builder-grid-row:empty {
	display: none !important;
	min-height: 0 !important;
}

body.woocommerce-account .site-footer-section {
	padding-top: 1.5rem !important;
	padding-bottom: 1.5rem !important;
}

/* Hide duplicate nav / card grid inside content (Astra / block-style dashboards) */
body.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content nav.woocommerce-MyAccount-navigation {
	display: none !important;
}

body.woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content > div:has(a[href*="customer-logout"]),
body.woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content > div:has(a[href*="orders"]),
body.woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content > div:has(a[href*="commandes"]),
body.woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content .woocommerce-MyAccount-dashboard-links {
	display: none !important;
}

@media (max-width: 768px) {
	body.woocommerce-account .woocommerce {
		flex-direction: column;
		gap: 1.25rem;
		padding: 1.25rem 0 2rem;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation {
		flex: 1 1 auto;
		width: 100%;
	}
}