/* ==========================================================================
   عیناکتو — طراحی صفحه حساب کاربری
   فقط روی body.woocommerce-account اعمال می‌شود.
   ========================================================================== */

body.woocommerce-account {
	--ac-brand: #780000;
	--ac-brand-soft: rgba(120, 0, 0, .07);
	--ac-line: #e8e2d8;
	--ac-ink: #1c2230;
	--ac-muted: #77808f;
}

body.woocommerce-account:not(.logged-in) .woocommerce {
	max-width: 940px;
	margin-inline: auto;
}

body.woocommerce-account.logged-in .woocommerce {
	display: grid;
	gap: 18px;
	max-width: 1120px;
	margin-inline: auto;
	align-items: start;
}

@media (min-width: 900px) {
	body.woocommerce-account.logged-in .woocommerce {
		grid-template-columns: 268px minmax(0, 1fr);
		gap: 24px;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation {
		position: sticky;
		top: calc(var(--ey-hh, 72px) + 16px);
	}
}

/* ---------- منوی حساب ---------- */

body.woocommerce-account .woocommerce-MyAccount-navigation {
	width: 100%;
	float: none;
	background: #fff;
	border: 1px solid var(--ac-line);
	border-radius: 18px;
	padding: 10px;
	box-shadow: 0 6px 22px rgba(20, 12, 8, .05);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 4px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	width: 100%;
	display: block;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	border: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	border-radius: 12px;
	font-size: .85rem;
	font-weight: 600;
	color: var(--ac-ink) !important;
	text-decoration: none;
	transition: background .16s ease, color .16s ease, transform .16s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a::before {
	content: "";
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	opacity: .55;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: 18px;
	mask-size: 18px;
	-webkit-mask-image: var(--ac-icon, none);
	mask-image: var(--ac-icon, none);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
	background: var(--ey-cream, #fbf8f3);
	color: var(--ac-brand) !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover::before {
	opacity: .9;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
body.eyewear-ux.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: #780000 !important;
	background-image: none !important;
	color: #fff !important;
	box-shadow: 0 8px 18px rgba(120, 0, 0, .22);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a::before {
	opacity: 1;
}

/* آیکون‌ها (mask تا رنگ از متن پیروی کند) */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a {
	--ac-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='7' height='7' rx='1.5'/><rect x='14' y='3' width='7' height='7' rx='1.5'/><rect x='3' y='14' width='7' height='7' rx='1.5'/><rect x='14' y='14' width='7' height='7' rx='1.5'/></svg>");
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a {
	--ac-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 2h9l4 4v16H6z'/><path d='M9 9h7M9 13h7M9 17h4'/></svg>");
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads a {
	--ac-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3v12'/><path d='m7 12 5 5 5-5'/><path d='M5 21h14'/></svg>");
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a {
	--ac-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 0 1 16 0z'/><circle cx='12' cy='10' r='3'/></svg>");
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a {
	--ac-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/></svg>");
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a {
	--ac-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/><path d='m16 17 5-5-5-5'/><path d='M21 12H9'/></svg>");
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a {
	color: #8a2b23 !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a:hover {
	background: #fdf1f0;
}

/* ---------- محتوای حساب ---------- */

body.woocommerce-account .woocommerce-MyAccount-content {
	width: 100%;
	float: none;
	background: #fff;
	border: 1px solid var(--ac-line);
	border-radius: 18px;
	padding: 20px 18px;
	box-shadow: 0 6px 22px rgba(20, 12, 8, .05);
	line-height: 2;
}

/* سربرگ خوش‌آمدگویی پیشخوان */
body.woocommerce-account .ey-dash-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 14px;
	padding: 16px 18px;
	border-radius: 16px;
	border: 1px solid rgba(120, 0, 0, .12);
	background: linear-gradient(135deg, rgba(120, 0, 0, .07), rgba(198, 161, 91, .14));
}

body.woocommerce-account .ey-greet {
	margin: 0;
	font-size: 1rem;
	font-weight: 800;
	color: #4a2a24;
	line-height: 1.8;
}

body.woocommerce-account .ey-greet-sub {
	margin: 4px 0 0;
	font-size: .8rem;
	color: #7c5a52;
	line-height: 1.9;
}

body.woocommerce-account .ey-greet-sub a {
	color: var(--ac-brand);
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 3px;
	margin-inline-start: 4px;
}

body.woocommerce-account .ey-dash-intro {
	margin: 0 0 16px;
	font-size: .86rem;
	color: #4a5263;
	line-height: 2;
}

body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3 {
	margin: 0 0 14px;
	font-size: 1rem;
	font-weight: 800;
	color: var(--ac-ink);
}

body.woocommerce-account .woocommerce-MyAccount-content p {
	font-size: .88rem;
	color: #4a5263;
}

/* ---------- کارت‌های میان‌بر پیشخوان ---------- */

body.woocommerce-account .ey-dash {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 8px;
}

body.woocommerce-account .ey-dash__card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 12px;
	border: 1px solid var(--ac-line);
	border-radius: 14px;
	background: #fff;
	text-decoration: none;
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body.woocommerce-account .ey-dash__card:hover {
	transform: translateY(-2px);
	border-color: rgba(120, 0, 0, .3);
	box-shadow: 0 12px 24px rgba(120, 0, 0, .1);
}

body.woocommerce-account .ey-dash__card svg {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	stroke: var(--ac-brand);
	fill: none;
	stroke-width: 1.8;
}

body.woocommerce-account .ey-dash__card b {
	display: block;
	font-size: .82rem;
	color: var(--ac-ink);
}

body.woocommerce-account .ey-dash__card span span {
	display: block;
	font-size: .72rem;
	color: var(--ac-muted);
	line-height: 1.7;
}

/* ---------- جدول سفارش‌ها ---------- */

body.woocommerce-account table.woocommerce-orders-table,
body.woocommerce-account table.shop_table {
	width: 100%;
	border: 1px solid var(--ac-line);
	border-radius: 14px;
	overflow: hidden;
	border-collapse: separate;
	border-spacing: 0;
	font-size: .84rem;
}

body.woocommerce-account table.woocommerce-orders-table th,
body.woocommerce-account table.shop_table th {
	background: #faf7f2;
	padding: 10px 12px;
	font-size: .76rem;
	font-weight: 800;
	color: var(--ac-muted);
	text-align: start;
}

body.woocommerce-account table.woocommerce-orders-table td,
body.woocommerce-account table.shop_table td {
	padding: 12px;
	border-top: 1px solid var(--ac-line);
	text-align: start;
	vertical-align: middle;
}

body.woocommerce-account table.woocommerce-orders-table td .button,
body.woocommerce-account table.shop_table td .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 14px;
	border-radius: 10px;
	background: var(--ac-brand) !important;
	background-image: none !important;
	color: #fff !important;
	font-size: .76rem;
	font-weight: 700;
	box-shadow: none;
}

/* ---------- فرم‌های حساب ---------- */

body.woocommerce-account .woocommerce-MyAccount-content .form-row {
	margin: 0 0 14px;
}

body.woocommerce-account .woocommerce-MyAccount-content label {
	display: block;
	margin-bottom: 6px;
	font-size: .78rem;
	font-weight: 700;
	color: var(--ac-muted);
}

body.woocommerce-account .woocommerce-MyAccount-content input.input-text,
body.woocommerce-account .woocommerce-MyAccount-content select,
body.woocommerce-account .woocommerce-MyAccount-content textarea,
body.woocommerce-account .select2-selection--single {
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--ac-line);
	border-radius: 12px;
	background: #fff;
	font-size: .88rem;
	color: var(--ac-ink);
	box-shadow: none;
}

body.woocommerce-account .woocommerce-MyAccount-content input.input-text:focus,
body.woocommerce-account .woocommerce-MyAccount-content select:focus {
	border-color: var(--ac-brand);
	box-shadow: 0 0 0 3px rgba(120, 0, 0, .12);
	outline: none;
}

body.woocommerce-account .woocommerce-MyAccount-content button.button,
body.woocommerce-account .woocommerce-MyAccount-content .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border: 0;
	border-radius: 12px;
	background: var(--ac-brand) !important;
	background-image: none !important;
	color: #fff !important;
	font-size: .86rem;
	font-weight: 800;
	box-shadow: 0 8px 18px rgba(120, 0, 0, .18);
}

body.woocommerce-account .woocommerce-MyAccount-content button.button:hover,
body.woocommerce-account .woocommerce-MyAccount-content .button:hover {
	background: #5a0000 !important;
}

/* آدرس‌ها */
body.woocommerce-account .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 6px;
}

body.woocommerce-account .woocommerce-Address {
	float: none;
	width: 100%;
}

body.woocommerce-account .woocommerce-Address address {
	margin-top: 8px;
	padding: 14px;
	border: 1px solid var(--ac-line);
	border-radius: 12px;
	background: #faf9f7;
	font-size: .84rem;
	line-height: 2;
	font-style: normal;
	color: #4a5263;
}

body.woocommerce-account .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

body.woocommerce-account .woocommerce-Address-title h3 {
	margin: 0;
}

/* ---------- موبایل ---------- */

@media (max-width: 899px) {
	body.woocommerce-account .woocommerce-MyAccount-navigation {
		padding: 8px;
		border-radius: 16px;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation ul {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 6px;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation li a {
		padding: 9px 10px;
		font-size: .78rem;
		justify-content: flex-start;
	}

	body.woocommerce-account .woocommerce-MyAccount-content {
		border-radius: 16px;
		padding: 16px 14px;
	}

	body.woocommerce-account .ey-dash {
		grid-template-columns: 1fr;
	}

	body.woocommerce-account .woocommerce-Addresses {
		grid-template-columns: 1fr;
	}

	/* جدول سفارش‌ها در موبایل کارتی شود */
	body.woocommerce-account table.woocommerce-orders-table thead {
		display: none;
	}

	body.woocommerce-account table.woocommerce-orders-table tr {
		display: block;
		padding: 10px 12px;
		border-top: 1px solid var(--ac-line);
	}

	body.woocommerce-account table.woocommerce-orders-table tr:first-child {
		border-top: 0;
	}

	body.woocommerce-account table.woocommerce-orders-table td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		padding: 6px 0;
		border: 0;
		font-size: .8rem;
	}

	body.woocommerce-account table.woocommerce-orders-table td::before {
		content: attr(data-title);
		font-size: .72rem;
		font-weight: 700;
		color: var(--ac-muted);
	}
}

@media (max-width: 480px) {
	body.woocommerce-account .woocommerce-MyAccount-navigation ul {
		grid-template-columns: 1fr;
	}
}

/* ---------- خروج، جدا از بقیه‌ی منو ---------- */

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--ac-line);
}

body.woocommerce-account .ey-logout-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 0 16px;
	border: 1px solid var(--ac-line);
	border-radius: 999px;
	background: #fff;
	color: #8a2b23 !important;
	font-size: .78rem;
	font-weight: 700;
	text-decoration: none;
	transition: background .16s ease, border-color .16s ease;
}

body.woocommerce-account .ey-logout-link:hover {
	background: #fdf1f0;
	border-color: #f0cfcb;
}

/* کارت‌های میان‌بر: فلش به‌جای تیک، در انتهای کارت */
body.woocommerce-account .ey-dash__card svg {
	order: 3;
	margin-inline-start: auto;
	stroke: var(--ac-brand);
	opacity: .7;
}

body.woocommerce-account .ey-dash__card > span {
	order: 2;
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------- جزئیات سربرگ پیشخوان ---------- */

body.woocommerce-account .ey-greet bdi {
	unicode-bidi: isolate;
	direction: ltr;
	display: inline-block;
}

body.woocommerce-account .ey-greet-sub {
	color: #6a4f47 !important;
	font-size: .82rem;
}

body.woocommerce-account .ey-shop-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 18px;
	border-radius: 999px;
	background: #780000;
	color: #fff !important;
	font-size: .8rem;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 8px 18px rgba(120, 0, 0, .2);
}

body.woocommerce-account .ey-shop-link:hover {
	background: #5a0000;
}

body.woocommerce-account .ey-dash-title {
	margin: 4px 0 10px;
	font-size: .82rem;
	font-weight: 800;
	color: var(--ac-muted);
	letter-spacing: .01em;
}

body.woocommerce-account .ey-logout-row {
	margin: 18px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--ac-line);
	display: flex;
	justify-content: flex-end;
}

body.woocommerce-account .ey-dash__card span span {
	color: #5f6a7a !important;
	font-size: .74rem;
}
