/* My Account: title and content share one width, a tidy side menu, no floats. */
body.woocommerce-account main .lt-page-title,
body.woocommerce-account main .lt-prose,
body.woocommerce-account main .lt-prose > * {
	max-width: 1040px !important;
}

/* Flex row (not grid): any extra element WordPress adds around the shortcode, such as an
   empty paragraph or the notices box, takes a full row of its own instead of a column. */
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-start;
	column-gap: 3.5rem;
	row-gap: 0;
	margin-top: 1.5rem;
}
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > * {
	flex: 0 0 100%;
	max-width: 100% !important;
}
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > p:empty,
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > p:has(> br:only-child),
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > br,
body.woocommerce-account .woocommerce > .woocommerce-notices-wrapper:empty {
	display: none;
}
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-navigation {
	flex: 0 0 210px;
}
body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-content {
	flex: 1 1 0;
	min-width: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

/* Side menu */
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
body.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}
body.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 0.6rem 0.9rem;
	border-radius: 10px;
	color: #3d3a35;
	text-decoration: none !important;
	line-height: 1.3;
}
body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
	background: #f4f3f0;
	color: #0a0a0a;
}
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: #f0efeb;
	color: #0a0a0a;
	font-weight: 600;
}
body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 0.75rem !important;
	padding-top: 0.75rem !important;
	border-top: 1px solid #e7e5e0 !important;
}

/* Content */
body.woocommerce-account .woocommerce-MyAccount-content > :first-child {
	margin-top: 0;
}
body.woocommerce-account .woocommerce-MyAccount-content p {
	margin: 0 0 1rem;
}
body.woocommerce-account .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
}
body.woocommerce-account .woocommerce-Addresses::before,
body.woocommerce-account .woocommerce-Addresses::after {
	display: none;
}
body.woocommerce-account .woocommerce-Address {
	float: none !important;
	width: auto !important;
	border: 1px solid #e7e5e0;
	border-radius: 14px;
	padding: 1.25rem 1.4rem;
}
body.woocommerce-account .woocommerce-Address-title {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 0.75rem;
}
body.woocommerce-account .woocommerce-Address-title h2,
body.woocommerce-account .woocommerce-Address-title h3 {
	margin: 0;
	font-size: 1.1rem;
}
body.woocommerce-account .woocommerce-Address-title .edit {
	float: none !important;
	font-size: 0.9rem;
	white-space: nowrap;
}
body.woocommerce-account .woocommerce-Address address {
	font-style: normal;
	line-height: 1.6;
	color: #3d3a35;
}

/* Phones: menu becomes a row of pills above the content */
@media (max-width: 760px) {
	body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-navigation,
	body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-content {
		flex: 0 0 100%;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation {
		margin-bottom: 1.5rem !important;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation ul {
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 0.4rem;
		padding-bottom: 0.25rem !important;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation a {
		white-space: nowrap;
		border: 1px solid #e7e5e0;
		border-radius: 999px;
		padding: 0.45rem 0.9rem;
	}
	body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
		margin-top: 0 !important;
		padding-top: 0 !important;
		border-top: 0 !important;
	}
}

/* Orders table and notices inside the content column */
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #e7e5e0;
	border-radius: 14px;
	overflow: hidden;
	font-size: 0.95rem;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
	padding: 0.8rem 1rem;
	text-align: left;
	border-top: 1px solid #efeee9;
	vertical-align: middle;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table thead th {
	border-top: 0;
	background: #faf9f7;
	font-weight: 600;
}
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table .button {
	padding: 0.45rem 1rem;
	font-size: 0.9rem;
	border-radius: 999px;
	white-space: nowrap;
}
body.woocommerce-account .woocommerce-MyAccount-content .wc-block-components-notice-banner,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info {
	margin: 0 0 1.25rem;
}
@media (max-width: 760px) {
	body.woocommerce-account .woocommerce-MyAccount-content table.shop_table thead { display: none; }
	body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tr { display: block; border-top: 1px solid #efeee9; padding: 0.5rem 0; }
	body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: 0.35rem 1rem; }
	body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td::before { content: attr(data-title); font-weight: 600; }
}
