/* Orange Street — My account: banner, member pass, order ticket, buy again, login page. */

/* 頁首：和商店頁同一面黑底網點 */
.account-hero {
	position: relative; overflow: hidden; padding: 36px 0 44px;
	background-color: var(--bg);
	background-image: radial-gradient(rgba(255, 122, 26, .2) 1.5px, transparent 1.6px);
	background-size: 16px 16px;
}
.account-word {
	position: absolute; right: -1%; bottom: -10%; white-space: nowrap; pointer-events: none;
	font-family: var(--display); font-size: clamp(84px, 15vw, 200px); line-height: .9; letter-spacing: .01em;
	color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .13);
}
.account-hero .wrap { position: relative; }
.account-title { font-size: clamp(32px, 5vw, 56px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.account-sub { margin-top: 6px; color: var(--accent); font-size: 15px; font-weight: 800; }
.account-body { padding-top: 28px; padding-bottom: 64px; }

/* 版面：左側會員卡＋選單，右側內容 */
.woocommerce-account.logged-in .account-body > .woocommerce { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
/* WooCommerce 的清除浮動偽元素在 grid 裡會佔掉一格，把選單擠到第二欄 */
.woocommerce-account.logged-in .account-body > .woocommerce::before,
.woocommerce-account.logged-in .account-body > .woocommerce::after { display: none; }
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }

/* 會員卡：橘底、底部黑色斜紋 */
.account-nav { position: sticky; top: 84px; }
.account-pass {
	position: relative; overflow: hidden; display: grid; gap: 1px; padding: 14px 16px 32px; border-radius: var(--r-md);
	background: var(--accent); color: var(--on-accent);
}
.account-pass::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
	background: repeating-linear-gradient(-45deg, #000 0 8px, transparent 8px 16px);
}
.account-pass-word { margin-bottom: 14px; font-family: var(--display); font-size: 26px; line-height: 1; letter-spacing: .03em; }
.account-pass-name { font-size: 20px; font-weight: 900; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-pass-mail { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-nav ul { list-style: none; margin: 10px 0 0; padding: 6px; display: grid; gap: 2px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.account-nav li a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; font-size: 15px; font-weight: 700; color: var(--text-2); }
.account-nav li a .icon { flex: none; width: 20px; height: 20px; color: var(--text-3); }
.account-nav li a:hover { background: var(--surface-2); color: var(--text); }
.account-nav li.is-active a { background: var(--accent); color: var(--on-accent); }
.account-nav li.is-active a .icon { color: var(--on-accent); }

/* 共用文字 */
.account-label { display: block; font-size: 13px; font-weight: 800; color: var(--text-2); }
.account-meta { font-size: 13px; color: var(--text-3); }
.account-order-no { font-family: var(--display); font-size: 24px; font-weight: 400; line-height: 1.1; letter-spacing: .02em; }
.account-section { margin-top: 28px; }
.account-section-title { margin-bottom: 12px; font-size: 22px; font-weight: 900; letter-spacing: -.01em; }

/* 總覽：最近一筆訂單 */
.account-ticket { border-radius: var(--r-md); padding: 20px 22px; }
.account-ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.account-ticket-body { display: flex; align-items: center; gap: 14px; }
.account-ticket-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.account-ticket-total { flex: none; font-size: 24px; font-weight: 900; color: var(--accent); }
.account-ticket-alert { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 900; }
.account-ticket-btn { width: 100%; margin-top: 18px; }
.account-ticket.is-empty { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.account-ticket.is-empty b { font-size: 20px; font-weight: 900; }
.account-ticket.is-empty p { color: var(--text-2); font-size: 15px; }
.account-ticket.is-empty .btn { flex: none; }

/* 再買一次：白底商品圖＋圓鈕，點了開快速選購 */
.rebuy { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rebuy-item { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s; }
.rebuy-item:hover { transform: translateY(-3px); }
.rebuy-img { display: block; aspect-ratio: 1 / 1; background: var(--paper); }
.rebuy-img img { width: 100%; height: 100%; object-fit: contain; }
.rebuy-name {
	margin: 10px 12px 0; font-size: 14px; font-weight: 700; line-height: 1.35;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rebuy-foot { margin-top: auto; padding: 8px 8px 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rebuy-foot b { font-size: 16px; font-weight: 900; color: var(--accent); }
.rebuy-plus { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 22px; font-weight: 800; line-height: 1; }

/* 捷徑 */
.account-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.account-tile { border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 2px; }
.account-tile:hover { border-color: var(--accent); }
.account-tile .icon { width: 24px; height: 24px; margin-bottom: 6px; color: var(--accent); }
.account-tile b { font-size: 16px; font-weight: 800; }
.account-tile span { font-size: 13px; color: var(--text-3); }

/* 訂單列表 */
.account-orders { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.account-order { border-radius: var(--r-md); padding: 18px 20px; min-width: 0; }
.account-order-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-order-head .status-badge { margin-left: auto; }
/* 狀態文字可能很長：編號和狀態同一行，日期放下一行 */
.account-order-head { justify-content: space-between; gap: 2px 10px; }
.account-order-head .account-meta { order: 3; flex-basis: 100%; }
.account-order-body { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.account-order-thumbs { display: flex; flex: none; }
.account-order-thumbs .order-thumb { width: 52px; height: 52px; background: var(--paper); box-shadow: 0 0 0 2px var(--surface); }
.account-order-thumbs .order-thumb img { object-fit: contain; }
.account-order-thumbs .order-thumb + .order-thumb { margin-left: -16px; }
/* 用 block 而不是 grid：grid 子項的最小寬度是內容寬，長品名會把整張卡片撐出畫面 */
.account-order-summary { flex: 1; min-width: 0; display: block; font-size: 14px; font-weight: 700; line-height: 1.35; }
.account-order-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.account-order-summary small { display: block; color: var(--text-3); font-size: 13px; font-weight: 400; }
.account-order-total { flex: none; font-size: 18px; font-weight: 900; color: var(--accent); }
.account-order-extra { font-size: 14px; color: var(--text-2); margin: 0 0 12px; }
.account-order-actions,
.account-order-footer { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.woocommerce .order-action.button { min-height: 40px; padding: 0 16px; font-size: 14px; }
.woocommerce .order-action.view { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.woocommerce .order-action.view:hover { background: var(--surface-3); color: var(--text); }
.woocommerce .order-action.cancel,
.woocommerce .order-action.wc-cancel-order { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.woocommerce .order-action.cancel:hover,
.woocommerce .order-action.wc-cancel-order:hover { background: rgba(255, 92, 92, .1); color: var(--danger); }
.woocommerce .order-action.pay { background: var(--accent); color: var(--on-accent); }
.account-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.account-empty { border-radius: var(--r-md); padding: 40px 24px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.account-empty .icon { width: 40px; height: 40px; color: var(--text-3); }
.account-empty p { color: var(--text-2); }

/* 查看訂單 */
.account-order-header { border-radius: var(--r-md); padding: 20px 22px; margin-bottom: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 16px; }
.account-order-header > div { display: grid; gap: 2px; }
.account-order-header .account-order-no { font-size: 32px; }
.account-order-header .status-badge { font-size: 14px; padding: 6px 14px; }
.account-order-header .order-track { flex: 0 0 100%; }
.account-notes ol { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.account-notes li { position: relative; }
.account-notes li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.account-notes time { font-size: 13px; color: var(--text-3); }
/* 共用樣式把訂單動態設成紅字，在這裡看起來像錯誤訊息 */
.woocommerce .account-notes .woocommerce-OrderUpdate-description p { margin: 2px 0 0; font-weight: 700; color: var(--text); }
/* WooMP 物流單號表格＋主題的「查詢貨態」按鈕 */
.account-extras { font-size: 15px; }
.account-extras h2 { font-size: 13px; font-weight: 700; color: var(--text-3); letter-spacing: .06em; margin: 0 0 12px; }
.account-extras table.shop_table { background: transparent; border-radius: 0; margin: 0; }
.account-extras table.shop_table th,
.account-extras table.shop_table td { padding: 10px 0; border-top: 1px solid var(--line); }
.account-extras table.shop_table tr:first-child > * { border-top: 0; }
.account-extras .cvs-tracking { margin: 0 0 12px; }
.account-order-footer { justify-content: space-between; margin-top: 16px; }
/* 帳號頁內容區較窄，取貨與商品卡片上下排列，商品名稱才不會斷成好幾行 */
.woocommerce-account .order-grid { grid-template-columns: minmax(0, 1fr); }

/* 帳號設定 */
.account-form { max-width: 560px; }
.account-password summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 700; }
.account-password summary::-webkit-details-marker { display: none; }
.account-password summary .icon { color: var(--text-3); transition: transform .2s; }
.account-password[open] summary { margin-bottom: 12px; }
.account-password[open] summary .icon { transform: rotate(180deg); }
.account-hint { font-size: 13px; color: var(--text-3); margin: 0 0 12px; }
.woocommerce .account-form-submit .btn-save { min-height: 48px; padding: 0 32px; background: var(--accent); color: var(--on-accent); }

/* 未登入：登入／註冊表單＋會員能做什麼 */
.account-guest { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 40px; align-items: start; }
.account-guest-form { border-radius: var(--r-lg); padding: 24px; }
.account-guest-form .xoo-el-form-container { max-width: none; margin: 0; padding: 0; background: none; box-shadow: none; }
.account-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.account-reasons li { display: flex; gap: 14px; }
.account-reasons .icon { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--accent); color: var(--on-accent); }
.account-reasons div { display: grid; gap: 2px; }
.account-reasons b { font-size: 17px; font-weight: 900; }
.account-reasons span { font-size: 14px; color: var(--text-2); }
.account-reasons a { font-size: 14px; font-weight: 800; color: var(--accent); }

@media (max-width: 900px) {
	.account-hero { padding: 22px 0 28px; }
	.account-body { padding-top: 16px; padding-bottom: 40px; }
	.woocommerce-account.logged-in .account-body > .woocommerce { grid-template-columns: minmax(0, 1fr); gap: 14px; }

	/* 手機：會員卡只在總覽出現，選單固定四格 */
	.account-nav { position: static; }
	.account-nav:not(.is-dashboard) .account-pass { display: none; }
	.account-nav:not(.is-dashboard) ul { margin-top: 0; }
	.account-pass { padding-bottom: 26px; }
	.account-pass-word { position: absolute; top: 12px; right: 14px; margin: 0; font-size: 22px; }
	.account-pass-name, .account-pass-mail { padding-right: 96px; }
	.account-nav ul { padding: 4px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.account-nav li a { flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 2px; font-size: 12px; text-align: center; }
	.woocommerce-account .woocommerce-MyAccount-content { min-width: 0; }

	.account-guest { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.account-guest-form { padding: 18px; }
}

@media (max-width: 600px) {
	.account-ticket, .account-order, .account-order-header { padding: 16px; }
	.account-ticket-body { flex-wrap: wrap; }
	.account-ticket-total { width: 100%; }
	.account-ticket.is-empty { flex-direction: column; align-items: stretch; }
	.rebuy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.account-tiles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.account-tile { grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; padding: 12px 14px; }
	.account-tile .icon { grid-row: span 2; margin: 0; }
	.woocommerce .account-form-submit .btn-save { width: 100%; }
	.account-order-actions .order-action { flex: 1; }
	.account-order-header { row-gap: 10px; }
	.account-order-footer { flex-direction: column-reverse; align-items: stretch; }
	.account-order-footer .order-action { justify-content: center; }
}

/* 取消訂單確認框（SP2s 顧客取消訂單外掛，預設是淺色玻璃，改成黑橘） */
html body .sp2s-cancel-dialog {
	border-radius: var(--r-lg); background: var(--surface); color: var(--text);
	box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .6);
	-webkit-backdrop-filter: none; backdrop-filter: none;
}
html body .sp2s-cancel-dialog::backdrop { background: rgba(0, 0, 0, .65); }
html body .sp2s-cancel-dialog h2 { font-weight: 900; }
html body .sp2s-cancel-icon { background: rgba(255, 92, 92, .14); color: var(--danger); }
html body .sp2s-cancel-buttons button { border-radius: 10px; font-weight: 800; }
html body .sp2s-cancel-keep { background: var(--surface-3); color: var(--text); }
html body .sp2s-cancel-keep:hover { background: var(--surface-4); }
html body .sp2s-cancel-confirm { background: var(--danger); color: #fff; }
html body .sp2s-cancel-buttons button:focus-visible { outline-color: var(--accent); }
