/* ============================================================
   CATNIPVAULT — app.css
   前台樣式（原創代碼，復刻 terrencestudio.com 設計語言）
   ============================================================ */

:root {
	--ink: #111827;
	--ink-2: #1a1a1a;
	--muted: #888;
	--muted-2: #aaa;
	--line: #e5e7eb;
	--bg: #ffffff;
	--bg-soft: #f7f8fa;
	--panel: #ffffff;
	--brand: #2d7dd2;
	--brand-dark: #1f5fa8;
	--line-green: #06c755;
	--danger: #e60012;
	--amber: #f59e0b;
	--radius: 8px;
	--radius-lg: 12px;
	--radius-xl: 14px;
	--radius-pill: 999px;
	--shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
	--shadow-md: 0 6px 24px rgba(17, 24, 39, 0.10);
	--shadow-lg: 0 16px 48px rgba(17, 24, 39, 0.16);
	--font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.3; }

button { font-family: inherit; }

.required { color: var(--danger); }

.muted { color: var(--muted); font-size: 13px; }

.eyebrow {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--brand);
}

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- 按鈕 ---------------- */
.btn-primary,
.woocommerce-button.button,
.woocommerce-Button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 1px solid var(--brand);
	border-radius: var(--radius);
	background: var(--brand);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn-primary:hover,
.woocommerce-button.button:hover,
.woocommerce-Button.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost,
.ghost-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover,
.ghost-btn:hover { border-color: var(--brand); color: var(--brand); background: #f7fbff; }

.ghost-btn.small { padding: 6px 14px; font-size: 13px; }

/* ---------------- 表單 ---------------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
	font-family: inherit;
	font-size: 14px;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.12); }

label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; }

.form-label-text { font-size: 13px; font-weight: 600; color: var(--ink-2); }

.status-text { font-size: 13px; color: var(--muted); }

/* ---------------- 頂欄 ---------------- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 900;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
	transition: box-shadow 0.2s;
}
.topbar.is-scrolled { box-shadow: var(--shadow-sm); }
.topbar-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 10px 20px;
}
.topbar-left,
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	font-size: 17px;
	letter-spacing: 0.02em;
}
.brand:hover { color: var(--ink); }
.brand strong { font-weight: 800; }
.brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--brand);
	color: #fff;
	font-weight: 800;
	font-size: 17px;
}
.brand .custom-logo { width: 34px; height: 34px; object-fit: contain; }

.mobile-menu-btn {
	display: none;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
	cursor: pointer;
}

.lang-currency-switch { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.lang-currency-btn {
	border: 0;
	background: none;
	color: var(--muted);
	font-size: 12px;
	cursor: pointer;
	padding: 4px 2px;
}
.lang-currency-btn[data-active="1"] { color: var(--ink); font-weight: 700; }
.lang-currency-sep { color: var(--line); }

.topbar-search-wrap { position: relative; display: flex; align-items: center; }
.topbar-search-wrap form { display: flex; align-items: center; gap: 6px; }
.topbar-search-input {
	width: 200px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	padding: 8px 14px;
	font-size: 13px;
}
.topbar-search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.12); }
.header-search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: #fff;
	color: var(--ink);
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}
.header-search-btn:hover { border-color: var(--brand); color: var(--brand); }

.header-login-btn {
	display: inline-flex;
	align-items: center;
	padding: 9px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	color: var(--ink);
	font-size: 13px;
	font-weight: 600;
	background: #fff;
	transition: border-color 0.15s, color 0.15s;
}
.header-login-btn:hover { border-color: var(--brand); color: var(--brand); }

.line-chat-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--line-green);
	color: #fff;
	transition: opacity 0.15s;
}
.line-chat-icon-btn:hover { opacity: 0.88; color: #fff; }

.cart-toggle-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
	cursor: pointer;
}
.cart-toggle-btn:hover { border-color: var(--brand); color: var(--brand); }
.cart-count-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: var(--radius-pill);
	background: var(--danger);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.mobile-search-bar { display: none; padding: 8px 16px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.mobile-search-bar input { border-radius: var(--radius-pill); }

/* ---------------- 區段標題 ---------------- */
.section-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
}
.section-heading h2 { font-size: 24px; font-weight: 800; margin: 0; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 13px; }

.shop-section,
.generic-page,
.wc-page,
.cart-page,
.checkout-page,
.account-page {
	max-width: 1180px;
	margin: 0 auto;
	padding: 34px 20px 60px;
}

/* ---------------- Hero / 登入門 ---------------- */
.login-gate {
	position: relative;
	min-height: 62vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #0f2440 0%, #1d4e89 55%, #2d7dd2 100%);
	color: #fff;
	text-align: center;
	overflow: hidden;
}
.login-gate.has-banner { background-image: var(--hero-bg); background-size: cover; background-position: center; }
.login-gate.has-banner::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(9, 17, 31, 0.45) 0%, rgba(9, 17, 31, 0.62) 100%);
}
.login-gate-content { position: relative; z-index: 2; max-width: 640px; padding: 40px 24px; }
.login-gate .eyebrow { color: rgba(255, 255, 255, 0.75); }
.login-gate-title { font-size: 40px; font-weight: 900; letter-spacing: 0.04em; margin: 0 0 10px; }
.login-gate-sub { margin: 0 0 26px; color: rgba(255, 255, 255, 0.85); font-size: 15px; }
.login-gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.login-gate-actions .btn-primary { background: #fff; border-color: #fff; color: var(--ink); }
.login-gate-actions .btn-primary:hover { background: #eef3fa; border-color: #eef3fa; }
.login-gate-actions .btn-ghost { border-color: rgba(255, 255, 255, 0.55); background: transparent; color: #fff; }
.login-gate-actions .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); color: #fff; }

.login-gate-plain { min-height: auto; padding: 48px 20px; background: var(--bg-soft); color: var(--ink); text-align: left; }
.login-gate-plain .login-gate-content { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 34px 30px; box-shadow: var(--shadow-sm); }
.login-gate-plain .login-gate-title { color: var(--ink); font-size: 26px; text-align: center; }
.login-gate-plain .u-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 20px; }
.login-gate-plain form p { margin: 0 0 14px; }
.login-gate-plain input { margin-top: 5px; }
.login-gate-plain h2 { font-size: 17px; }

/* ---------------- 分類 chips ---------------- */
.category-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
	padding: 7px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: #fff;
	color: var(--ink);
	font-size: 13px;
	font-weight: 600;
	transition: all 0.15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- 商品網格 / 卡片 ---------------- */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
	gap: 20px;
}

.product-card {
	display: flex;
	flex-direction: column;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.image-wrap { position: relative; aspect-ratio: 1 / 1; background: var(--bg-soft); overflow: hidden; }
.image-wrap img { width: 100%; height: 100%; object-fit: cover; }

.deadline-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 10px;
	border-radius: var(--radius-pill);
	background: var(--amber);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
}

.sold-out-badge {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(1px);
	color: var(--danger);
	font-size: 18px;
	font-weight: 800;
	letter-spacing: 0.1em;
}

.wishlist-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
	width: 34px;
	height: 34px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	color: var(--muted);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: all 0.15s;
}
.wishlist-btn:hover { color: var(--danger); border-color: var(--danger); }
.wishlist-btn.active { color: var(--danger); border-color: var(--danger); background: #fff5f5; }

.product-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; flex: 1; }

.card-status-row { display: flex; gap: 6px; flex-wrap: wrap; }
.category-pill,
.stock-pill {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: var(--radius-pill);
	font-size: 11px;
	font-weight: 700;
}
.category-pill { background: #eef4fb; color: var(--brand); }
.stock-pill { background: #f2fdf6; color: #1a9e4b; }

.product-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.product-title-row h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; flex: 1; }
.product-title-row h3 a { color: var(--ink); }
.product-title-row h3 a:hover { color: var(--brand); }
.product-title-row .price { font-size: 15px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.product-title-row .price .woocommerce-Price-currencySymbol { font-size: 12px; }

.product-excerpt {
	margin: 0;
	color: var(--muted);
	font-size: 12.5px;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.meta-list { margin: 0; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.meta-list div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 2px 0; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 600; color: var(--ink-2); }

.card-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: auto; }
.view-product-btn {
	padding: 10px 12px;
	border: 1px solid var(--brand);
	border-radius: var(--radius);
	background: var(--brand);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	transition: background 0.15s;
}
.view-product-btn:hover { background: var(--brand-dark); color: #fff; }
.line-inquiry-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 12px;
	border: 1px solid var(--line-green);
	border-radius: var(--radius);
	background: #f2fdf6;
	color: #089447;
	font-size: 13px;
	font-weight: 700;
	transition: background 0.15s;
}
.line-inquiry-btn:hover { background: var(--line-green); color: #fff; }

.section-more { margin-top: 28px; text-align: center; }
.empty-note { color: var(--muted); text-align: center; padding: 30px 0; }

/* ---------------- 商品詳情 ---------------- */
.product-detail { max-width: 1180px; margin: 0 auto; padding: 34px 20px 60px; }
.pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pd-gallery .woocommerce-product-gallery { margin: 0; }
.pd-gallery .flex-viewport { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.pd-gallery ol.flex-control-thumbs { display: flex; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; flex-wrap: wrap; }
.pd-gallery ol.flex-control-thumbs li { width: 64px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.pd-gallery ol.flex-control-thumbs li img { opacity: 0.7; transition: opacity 0.15s; }
.pd-gallery ol.flex-control-thumbs li img.flex-active,
.pd-gallery ol.flex-control-thumbs li:hover img { opacity: 1; }
.pd-gallery .woocommerce-product-gallery__trigger { position: absolute; top: 12px; right: 12px; z-index: 5; }

.pd-status-row { display: flex; gap: 6px; margin-bottom: 10px; }
.pd-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.pd-price { font-size: 22px; font-weight: 800; color: var(--brand); margin-bottom: 12px; }
.pd-price .woocommerce-Price-currencySymbol { font-size: 15px; }

.pd-deadline {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	background: #fef4e6;
	color: #b45309;
	font-size: 13px;
	font-weight: 700;
	margin: 0 0 12px;
}

.pd-desc { color: #4b5563; font-size: 14px; margin-bottom: 16px; }

.pd-shipping { margin-bottom: 16px; }
.pd-shipping .form-label-text { display: block; margin-bottom: 6px; }
.shipping-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.shipping-pill { padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 12px; color: var(--ink-2); background: #fff; }

.pd-cart-form { margin: 16px 0; }
.pd-cart-form .cart {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	flex-wrap: wrap;
}
.pd-cart-form .quantity { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pd-cart-form .quantity .qty { width: 64px; border: 0; text-align: center; padding: 10px 6px; font-size: 14px; }
.pd-cart-form .single_add_to_cart_button {
	padding: 12px 30px;
	border: 0;
	border-radius: var(--radius);
	background: var(--brand);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s;
}
.pd-cart-form .single_add_to_cart_button:hover { background: var(--brand-dark); }
.pd-cart-form .variations { margin: 0 0 12px; }
.pd-cart-form .variations td { padding: 4px 0; }
.pd-cart-form .variations .label { padding-right: 12px; }
.pd-cart-form .reset_variations { font-size: 12px; }
.pd-cart-form .woocommerce-variation-price { margin: 8px 0; font-weight: 800; color: var(--brand); font-size: 18px; }
.pd-cart-form .woocommerce-variation-availability { margin-bottom: 8px; font-size: 13px; }

.pd-actions { display: flex; gap: 10px; margin-top: 8px; }
.wishlist-btn-lg {
	position: static;
	width: auto;
	height: auto;
	padding: 10px 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font-size: 14px;
	font-weight: 600;
	background: #fff;
}
.wishlist-btn-lg:hover { color: var(--danger); border-color: var(--danger); background: #fff; }
.wishlist-btn-lg.active { color: var(--danger); border-color: var(--danger); background: #fff5f5; }
.line-inquiry-lg { padding: 10px 18px; }

.woocommerce-tabs { margin-top: 44px; }
.woocommerce-tabs .tabs { display: flex; gap: 4px; padding: 0; margin: 0 0 16px; list-style: none; border-bottom: 2px solid var(--line); }
.woocommerce-tabs .tabs li a { display: block; padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.woocommerce-tabs .tabs li.active a { color: var(--brand); border-bottom-color: var(--brand); }
.woocommerce-tabs .panel { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.woocommerce-tabs .panel h2 { font-size: 16px; }

.related-products { margin-top: 44px; }
.related-products > h2 { font-size: 19px; font-weight: 800; margin-bottom: 16px; }

/* ---------------- 購物車 ---------------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cart-item {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr) auto auto auto;
	align-items: center;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
	position: relative;
}
.cart-item-thumb { width: 88px; height: 88px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.cart-item-title { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.cart-item-title a { color: var(--ink); }
.cart-item-price { font-size: 13px; color: var(--muted); }
.cart-item-subtotal { font-weight: 800; font-size: 15px; min-width: 90px; text-align: right; }
.cart-item-remove {
	border: 0;
	background: none;
	color: var(--muted-2);
	font-size: 15px;
	cursor: pointer;
	padding: 6px;
}
.cart-item-remove:hover { color: var(--danger); }
.cart-item .variation { margin: 0; font-size: 12px; color: var(--muted); }

.cart-update-row { display: flex; align-items: center; gap: 10px; padding-top: 16px; }

.cart-totals-box {
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 20px;
	background: var(--bg-soft);
	position: sticky;
	top: 90px;
}
.cart-totals-box h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.cart-totals-table { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tt-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.tt-row span:first-child { color: var(--muted); }
.tt-row.tt-total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: 16px; }
.tt-row.tt-total strong { font-size: 18px; color: var(--ink); }

.coupon-form { margin-bottom: 14px; }
.coupon-form-row { display: flex; gap: 8px; margin-top: 6px; }
.coupon-form-row input { flex: 1; }

.checkout-btn { width: 100%; }

.empty-cart { text-align: center; padding: 50px 0; color: var(--muted); }
.empty-cart p { font-size: 16px; margin-bottom: 18px; }

/* ---------------- 結帳 ---------------- */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; }
.checkout-section-title { font-size: 17px; font-weight: 800; margin: 22px 0 12px; }
.checkout-section-title:first-child { margin-top: 0; }

.checkout-fields .form-row { margin: 0 0 12px; }
.checkout-fields .form-row label { margin-bottom: 5px; }
.checkout-fields .form-row input,
.checkout-fields .form-row select,
.checkout-fields .form-row textarea { margin-top: 4px; }
.checkout-fields .form-row.woocommerce-invalid input { border-color: var(--danger); }

.checkout-review { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; background: var(--bg-soft); position: sticky; top: 90px; }

#order_review .shop_table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
#order_review .shop_table th,
#order_review .shop_table td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }
#order_review .shop_table th { color: var(--muted); font-weight: 600; }
#order_review .shop_table .product-total,
#order_review .shop_table .order-total th,
#order_review .shop_table .order-total td { text-align: right; }
#order_review .shop_table .order-total td strong { font-size: 17px; }

.woocommerce-checkout-payment { margin-top: 14px; }
.woocommerce-checkout-payment .wc_payment_methods { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.woocommerce-checkout-payment .wc_payment_method { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; }
.woocommerce-checkout-payment .wc_payment_method label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.woocommerce-checkout-payment .payment_box { margin-top: 10px; font-size: 13px; color: #4b5563; background: var(--bg-soft); border-radius: var(--radius); padding: 12px; }
.woocommerce-checkout-payment .payment_box p { margin: 0 0 8px; }
.woocommerce-checkout-payment .payment_box p:last-child { margin-bottom: 0; }

.place-order { margin-top: 16px; }
#place_order {
	width: 100%;
	padding: 14px;
	border: 0;
	border-radius: var(--radius);
	background: var(--brand);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	transition: background 0.15s;
}
#place_order:hover { background: var(--brand-dark); }

.checkout-login-note { max-width: 1180px; margin: 40px auto; text-align: center; color: var(--muted); }

/* ---------------- 購物車浮層 ---------------- */
.cart-preview {
	position: fixed;
	top: 62px;
	right: 16px;
	z-index: 950;
	width: 340px;
	max-width: calc(100vw - 32px);
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 16px;
}
.cart-preview-items { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; }
.cart-preview-item { display: flex; gap: 10px; align-items: center; }
.cart-preview-item img { width: 52px; height: 52px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--line); }
.cart-preview-item-info { flex: 1; min-width: 0; }
.cart-preview-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-preview-item-meta { font-size: 12px; color: var(--muted); }
.cart-preview-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 14px 0; }
.cart-preview-divider { height: 1px; background: var(--line); margin: 12px 0; }
.cart-preview-footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cart-preview-footer span { color: var(--muted); font-size: 13px; }
.cart-preview-footer strong { font-size: 17px; }
.cart-preview-btn {
	display: block;
	width: 100%;
	text-align: center;
	padding: 11px;
	border-radius: var(--radius);
	background: var(--ink);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}
.cart-preview-btn:hover { background: #000; color: #fff; }

/* ---------------- 會員中心 ---------------- */
.acct-layout { max-width: 1180px; margin: 0 auto; padding: 34px 20px 60px; }
.acct-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.acct-user-card { display: flex; align-items: center; gap: 12px; }
.acct-avatar-wrap {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #eef4fb;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--brand);
}
.acct-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.acct-user-meta strong { display: block; font-size: 16px; }
.acct-user-meta span { color: var(--muted); font-size: 12.5px; }
.acct-logout-btn { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-pill); padding: 8px 18px; font-size: 13px; cursor: pointer; color: var(--muted); }
.acct-logout-btn:hover { border-color: var(--danger); color: var(--danger); }

.acct-tabs-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.acct-tab {
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
	white-space: nowrap;
}
.acct-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
a.acct-tab:hover { color: var(--brand); }

.acct-panel-content { min-height: 200px; }
.acct-hello { font-size: 15px; margin-bottom: 20px; }
.acct-quick-links { display: flex; gap: 10px; flex-wrap: wrap; }

.orders-list { display: flex; flex-direction: column; gap: 10px; }
.order-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 14px 16px;
	background: #fff;
	flex-wrap: wrap;
}
.order-row-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.order-no { font-weight: 800; }
.order-date { color: var(--muted); font-size: 13px; }
.order-total { font-weight: 700; }
.order-status {
	padding: 3px 10px;
	border-radius: var(--radius-pill);
	background: var(--bg-soft);
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
}
.order-status.status-processing { background: #eef4fb; color: var(--brand); }
.order-status.status-completed { background: #f2fdf6; color: #1a9e4b; }
.order-status.status-on-hold { background: #fef4e6; color: #b45309; }
.order-status.status-cancelled,
.order-status.status-refunded,
.order-status.status-failed { background: #fff1f1; color: var(--danger); }
.order-row-actions { display: flex; gap: 8px; }

.order-detail-box { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; background: #fff; }
.order-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.order-total-row { display: flex; justify-content: space-between; padding: 14px 0 0; font-size: 16px; }
.order-actions-line { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

.payment-proof-form { border: 1px dashed var(--brand); background: #f7fbff; border-radius: var(--radius-lg); padding: 16px; margin-bottom: 18px; }
.payment-proof-form h4 { margin-bottom: 4px; }
.payment-proof-form form { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.payment-proof-done { border: 1px solid #d1f5dd; background: #f2fdf6; border-radius: var(--radius-lg); padding: 16px; margin-bottom: 18px; }

/* ---------------- 頁尾 ---------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); }
.site-footer-inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 30px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 40px 20px 30px;
}
.footer-col h4 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.footer-nav { display: flex; flex-direction: column; gap: 7px; }
.footer-nav a,
.footer-col p a { color: var(--muted); font-size: 13px; }
.footer-nav a:hover,
.footer-col p a:hover { color: var(--brand); }
.footer-col p { margin: 0 0 8px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; }
.footer-col p span:first-child { min-width: 64px; font-weight: 600; color: var(--ink-2); }

.footer-biz {
	display: flex;
	justify-content: center;
	gap: 22px;
	flex-wrap: wrap;
	padding: 16px 20px 22px;
	border-top: 1px solid var(--line);
	color: var(--muted-2);
	font-size: 12px;
}

/* ---------------- 浮動聯絡 ---------------- */
.floating-contact {
	position: fixed;
	left: 16px;
	bottom: 20px;
	z-index: 960;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.floating-contact a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	box-shadow: var(--shadow-md);
	transition: transform 0.15s;
}
.floating-contact a:hover { transform: scale(1.08); }
.line-contact { background: var(--line-green); color: #fff; }
.ig-contact { background: #fff; color: #262626; border: 1px solid var(--line); }

/* ---------------- 行動版分類抽屜 ---------------- */
.mobile-cat-panel { position: fixed; inset: 0; z-index: 990; }
.mobile-cat-overlay { position: absolute; inset: 0; background: rgba(17, 24, 39, 0.5); }
.mobile-cat-drawer {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(320px, 82vw);
	background: #fff;
	box-shadow: var(--shadow-lg);
	display: flex;
	flex-direction: column;
	animation: drawerIn 0.22s ease;
}
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.mobile-cat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid var(--line);
	font-weight: 700;
}
.mobile-cat-close { border: 0; background: none; cursor: pointer; color: var(--muted); }
.mobile-cat-list { flex: 1; overflow-y: auto; padding: 10px 0; display: flex; flex-direction: column; }
.mobile-cat-list a { padding: 12px 20px; color: var(--ink); font-size: 14.5px; border-bottom: 1px solid #f3f4f6; }
.mobile-cat-list a:hover { background: var(--bg-soft); color: var(--brand); }

/* ---------------- 通用頁面 ---------------- */
.generic-page-inner { max-width: 820px; margin: 0 auto; }
.generic-header { margin-bottom: 20px; }
.generic-header h1 { font-size: 26px; font-weight: 800; }
.generic-content { color: #374151; font-size: 14.5px; line-height: 1.9; }
.generic-content h2 { font-size: 19px; margin-top: 26px; }
.generic-content ul { padding-left: 20px; }

/* ---------------- 分頁 / 通知 ---------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; color: var(--muted); font-size: 13px; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: var(--radius);
	font-size: 14px;
	list-style: none;
}
.woocommerce-message { background: #f2fdf6; border: 1px solid #d1f5dd; color: #1a9e4b; }
.woocommerce-info { background: #eef4fb; border: 1px solid #d6e6f7; color: var(--brand); }
.woocommerce-error { background: #fff1f1; border: 1px solid #ffd6d6; color: var(--danger); }

.woocommerce-notices-wrapper { max-width: 1180px; margin: 0 auto; padding: 20px 20px 0; }

/* ---------------- 響應式 ---------------- */
@media (max-width: 960px) {
	.cart-layout,
	.checkout-layout { grid-template-columns: 1fr; }
	.cart-totals-box,
	.checkout-review { position: static; }
	.pd-layout { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 720px) {
	.mobile-menu-btn { display: inline-flex; }
	.topbar-search-wrap { display: none; }
	.mobile-search-bar { display: block; }
	.lang-currency-switch { display: none; }
	.topbar-main { padding: 10px 14px; }
	.brand strong { font-size: 15px; }
	.header-login-btn { padding: 8px 12px; font-size: 12px; }
	.header-login-btn svg { display: none; }

	.login-gate { min-height: 52vh; }
	.login-gate-title { font-size: 28px; }

	.shop-section,
	.generic-page,
	.wc-page,
	.cart-page,
	.checkout-page { padding: 24px 14px 50px; }
	.section-heading { flex-direction: column; align-items: flex-start; gap: 6px; }

	.product-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
	.product-title-row { flex-direction: column; gap: 4px; }
	.card-actions { grid-template-columns: 1fr; }
	.meta-list { display: none; }

	.cart-item { grid-template-columns: 70px minmax(0, 1fr) auto; grid-template-rows: auto auto; }
	.cart-item-thumb { width: 70px; height: 70px; }
	.cart-item-subtotal { grid-column: 2 / 3; text-align: left; }
	.cart-item-remove { position: absolute; top: 10px; right: 6px; }

	.login-gate-plain .u-columns { grid-template-columns: 1fr; }
	.form-grid { grid-template-columns: 1fr; }
	.floating-contact { left: 12px; bottom: 14px; }
	.floating-contact a { width: 44px; height: 44px; }
}
