/* =============================================================
   My Account — Minimal style, matching cart aesthetic
   ============================================================= */

/* ── 整体容器 ────────────────────────────────────────── */
.woocommerce-account .woocommerce {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 24px 80px;
	box-sizing: border-box;
	color: #1d1d1f;
}

/* ── 页面顶部 header ─────────────────────────────────── */
.hb-myaccount-header {
	padding-bottom: 18px;
	margin-bottom: 32px;
	border-bottom: 1px solid #e5e5e5;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
}

.hb-myaccount-header-text {
	min-width: 0;
}

.hb-myaccount-title {
	margin: 0 0 4px;
	font-size: 30px;
	font-weight: 500;
	letter-spacing: 0.2px;
	line-height: 1.2;
	color: #1d1d1f;
}

.hb-myaccount-greeting {
	margin: 0;
	font-size: 14px;
	color: #6b6b6b;
}

.hb-myaccount-greeting strong {
	color: #1d1d1f;
	font-weight: 500;
}

.hb-myaccount-logout-link {
	font-size: 14px;
	color: #1d1d1f;
	text-decoration: underline;
	text-underline-offset: 4px;
	transition: opacity 0.15s ease;
	white-space: nowrap;
}

.hb-myaccount-logout-link:hover {
	opacity: 0.7;
	color: #1d1d1f;
}

/* ── 主体：左侧导航 + 右侧内容 ───────────────────────── */
.woocommerce-account .woocommerce::after {
	content: none; /* 移除 WC 默认 clearfix */
}

.woocommerce-account .woocommerce {
	display: block;
}

.hb-myaccount-body {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 60px;
	align-items: start;
}

/* ── 左侧导航 ────────────────────────────────────────── */
.woocommerce-MyAccount-navigation {
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
}

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	border-top: 1px solid #f0f0f0;
}

.woocommerce-MyAccount-navigation-link {
	border-bottom: 1px solid #f0f0f0;
	margin: 0;
	padding: 0;
}

.woocommerce-MyAccount-navigation-link a {
	display: block;
	padding: 14px 14px 14px 16px;
	font-size: 14px;
	color: #1d1d1f;
	text-decoration: none !important;
	letter-spacing: 0.2px;
	border-left: 2px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.woocommerce-MyAccount-navigation-link a:hover,
.woocommerce-MyAccount-navigation-link a:focus {
	background: #f7f7f7;
	color: #1d1d1f;
	outline: none;
}

.woocommerce-MyAccount-navigation-link.is-active a {
	border-left-color: #1d1d1f;
	background: #fafafa;
	font-weight: 500;
}

/* Logout 视觉略弱 + 红色 hover */
.woocommerce-MyAccount-navigation-link--customer-logout a {
	color: #6b6b6b;
}

.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
	color: #c0392b;
	background: #fdf3f3;
	border-left-color: #c0392b;
}

/* ── 右侧内容容器 ────────────────────────────────────── */
.woocommerce-MyAccount-content {
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
}

.woocommerce-MyAccount-content > p:first-of-type {
	margin-top: 0;
}

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
	font-size: 18px;
	font-weight: 500;
	color: #1d1d1f;
	margin: 0 0 16px;
	letter-spacing: 0.2px;
}

.woocommerce-MyAccount-content p {
	font-size: 14px;
	line-height: 1.7;
	color: #1d1d1f;
}

.woocommerce-MyAccount-content a {
	color: #1d1d1f;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: opacity 0.15s ease;
}

.woocommerce-MyAccount-content a:hover {
	opacity: 0.7;
}

/* ── Dashboard 卡片网格 ──────────────────────────────── */
.hb-myaccount-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
	margin-top: 24px;
}

.hb-myaccount-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 22px 22px 24px;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	background: #ffffff;
	transition: border-color 0.15s ease, transform 0.15s ease;
	text-decoration: none !important;
	color: #1d1d1f;
}

.hb-myaccount-card:hover {
	border-color: #1d1d1f;
	transform: translateY(-2px);
	color: #1d1d1f;
	opacity: 1;
}

.hb-myaccount-card-icon {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	color: #1d1d1f;
	margin-bottom: 4px;
}

.hb-myaccount-card-title {
	font-size: 15px;
	font-weight: 500;
	color: #1d1d1f;
}

.hb-myaccount-card-desc {
	font-size: 13px;
	color: #6b6b6b;
	line-height: 1.5;
	margin: 0;
}

.hb-myaccount-card-arrow {
	margin-top: auto;
	padding-top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #1d1d1f;
	letter-spacing: 0.3px;
}

.hb-myaccount-card-arrow svg {
	transition: transform 0.15s ease;
}

.hb-myaccount-card:hover .hb-myaccount-card-arrow svg {
	transform: translateX(3px);
}

/* ── Orders / Downloads 表格 ─────────────────────────── */
.woocommerce-MyAccount-content table.shop_table,
.woocommerce-MyAccount-content table.account-orders-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 24px;
	font-size: 13px;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	overflow: hidden;
}

.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.account-orders-table th {
	background: #fafafa;
	padding: 12px 14px;
	text-align: left;
	font-weight: 400;
	font-size: 12px;
	color: #6b6b6b;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	border-bottom: 1px solid #e5e5e5;
}

.woocommerce-MyAccount-content table.shop_table td,
.woocommerce-MyAccount-content table.account-orders-table td {
	padding: 14px;
	border-bottom: 1px solid #f0f0f0;
	color: #1d1d1f;
	vertical-align: middle;
}

.woocommerce-MyAccount-content table.shop_table tr:last-child td,
.woocommerce-MyAccount-content table.account-orders-table tr:last-child td {
	border-bottom: 0;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions {
	text-align: right;
}

/* 订单状态徽章 */
.woocommerce-orders-table__cell-order-status,
.order-status {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	font-size: 12px;
	border-radius: 999px;
	background: #f0f0f0;
	color: #1d1d1f;
	letter-spacing: 0.3px;
}

.order-status.status-completed { background: #e7f6ec; color: #2d7a46; }
.order-status.status-processing { background: #fff5e0; color: #b97309; }
.order-status.status-on-hold    { background: #fbe9e7; color: #c0392b; }
.order-status.status-cancelled  { background: #efefef; color: #6b6b6b; }
.order-status.status-pending    { background: #f0f0f0; color: #6b6b6b; }

/* ── 表单 ────────────────────────────────────────────── */
.woocommerce-MyAccount-content form {
	max-width: 560px;
}

.woocommerce-MyAccount-content fieldset {
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 18px 20px 8px;
	margin: 24px 0;
}

.woocommerce-MyAccount-content fieldset legend {
	padding: 0 6px;
	font-size: 13px;
	color: #6b6b6b;
	letter-spacing: 0.4px;
}

.woocommerce-MyAccount-content .woocommerce-form-row,
.woocommerce-MyAccount-content .form-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
}

.woocommerce-MyAccount-content .form-row label {
	font-size: 13px;
	color: #6b6b6b;
	letter-spacing: 0.2px;
	margin: 0;
}

.woocommerce-MyAccount-content .form-row input[type="text"],
.woocommerce-MyAccount-content .form-row input[type="email"],
.woocommerce-MyAccount-content .form-row input[type="password"],
.woocommerce-MyAccount-content .form-row input[type="tel"],
.woocommerce-MyAccount-content .form-row select,
.woocommerce-MyAccount-content .form-row textarea {
	width: 100%;
	height: 42px;
	padding: 0 14px;
	border: 1px solid #d4d4d4;
	border-radius: 3px;
	font-size: 14px;
	color: #1d1d1f;
	background: #ffffff;
	font-family: inherit;
	box-sizing: border-box;
	box-shadow: none;
	transition: border-color 0.15s ease;
}

.woocommerce-MyAccount-content .form-row textarea {
	height: auto;
	min-height: 100px;
	padding: 12px 14px;
	resize: vertical;
}

.woocommerce-MyAccount-content .form-row input:focus,
.woocommerce-MyAccount-content .form-row select:focus,
.woocommerce-MyAccount-content .form-row textarea:focus {
	outline: none;
	border-color: #1d1d1f;
}

/* ── 按钮 ────────────────────────────────────────────── */
.woocommerce-MyAccount-content .button,
.woocommerce-MyAccount-content button[type="submit"],
.woocommerce-MyAccount-content input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	padding: 0 26px;
	background: #1d1d1f;
	color: #ffffff !important;
	border: 1px solid #1d1d1f;
	border-radius: 3px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.4px;
	cursor: pointer;
	text-decoration: none !important;
	font-family: inherit;
	transition: opacity 0.15s ease;
}

.woocommerce-MyAccount-content .button:hover,
.woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-MyAccount-content input[type="submit"]:hover {
	opacity: 0.85;
	color: #ffffff !important;
}

/* 视觉次要的按钮（如 View / Pay）不全黑 */
.woocommerce-MyAccount-content .woocommerce-button.view {
	background: #ffffff;
	color: #1d1d1f !important;
	border: 1px solid #d4d4d4;
}

.woocommerce-MyAccount-content .woocommerce-button.view:hover {
	background: #fafafa;
	color: #1d1d1f !important;
	border-color: #1d1d1f;
	opacity: 1;
}

/* ── 地址（Addresses）卡片 ───────────────────────────── */
.woocommerce-MyAccount-content .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 18px;
	margin: 0;
}

.woocommerce-MyAccount-content .woocommerce-Address {
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 22px;
	background: #ffffff;
}

.woocommerce-MyAccount-content .woocommerce-Address-title {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 12px;
}

.woocommerce-MyAccount-content .woocommerce-Address-title h2,
.woocommerce-MyAccount-content .woocommerce-Address-title h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
}

.woocommerce-MyAccount-content .woocommerce-Address-title .edit {
	font-size: 13px;
	color: #1d1d1f;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.woocommerce-MyAccount-content .woocommerce-Address address {
	font-size: 13px;
	color: #6b6b6b;
	line-height: 1.7;
	margin: 0;
	font-style: normal;
}

/* ── 通知 / 错误 / 成功 ──────────────────────────────── */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
	margin: 0 0 18px;
	padding: 12px 16px;
	border-radius: 3px;
	font-size: 13px;
	background: #f7f7f7;
	border-left: 3px solid #1d1d1f;
	color: #1d1d1f;
	list-style: none;
}

.woocommerce-notices-wrapper .woocommerce-message {
	background: #f1f8f4;
	border-left-color: #2d7a46;
	color: #2d7a46;
}

.woocommerce-notices-wrapper .woocommerce-error {
	background: #fef2f0;
	border-left-color: #c0392b;
	color: #c0392b;
}

.woocommerce-notices-wrapper .woocommerce-info {
	background: #f0f7fb;
	border-left-color: #2563eb;
	color: #1d1d1f;
}

.woocommerce-notices-wrapper .button {
	margin-left: 12px;
}

/* ── 分页 ────────────────────────────────────────────── */
.woocommerce-pagination {
	margin: 24px 0 0;
	text-align: center;
	border: 0;
}

.woocommerce-pagination ul {
	display: inline-flex;
	gap: 6px;
	list-style: none;
	padding: 0;
	margin: 0;
	border: 0;
}

.woocommerce-pagination ul li {
	border: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #e5e5e5;
	border-radius: 3px;
	font-size: 13px;
	color: #1d1d1f;
	background: #ffffff;
	text-decoration: none;
}

.woocommerce-pagination ul li span.current {
	background: #1d1d1f;
	color: #ffffff;
	border-color: #1d1d1f;
}

.woocommerce-pagination ul li a:hover {
	border-color: #1d1d1f;
}

/* ── 响应式 ──────────────────────────────────────────── */
@media (max-width: 900px) {
	.woocommerce-account .woocommerce {
		padding: 32px 16px 60px;
	}

	.hb-myaccount-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.hb-myaccount-title {
		font-size: 24px;
	}

	.hb-myaccount-body {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.woocommerce-MyAccount-navigation {
		border: 1px solid #e5e5e5;
		border-radius: 4px;
		overflow: hidden;
	}

	.woocommerce-MyAccount-navigation ul {
		border-top: 0;
	}

	.woocommerce-MyAccount-navigation-link:last-child {
		border-bottom: 0;
	}
}

@media (max-width: 480px) {
	.woocommerce-MyAccount-content table.shop_table thead {
		display: none;
	}

	.woocommerce-MyAccount-content table.shop_table tbody tr {
		display: block;
		padding: 10px 0;
		border-bottom: 1px solid #f0f0f0;
	}

	.woocommerce-MyAccount-content table.shop_table tbody td {
		display: flex;
		justify-content: space-between;
		gap: 10px;
		padding: 4px 14px;
		border: 0;
		font-size: 13px;
	}

	.woocommerce-MyAccount-content table.shop_table tbody td::before {
		content: attr(data-title);
		font-weight: 500;
		color: #6b6b6b;
	}
}
