/* ============================================================
   zuzudamn 首頁改造 — 「日系紙感文藝編輯風」前台樣式
   紙纖維紋理、寬版留白、紙感疊層相框、點線花朵分隔線、翻書式新品瀏覽。
   所有顏色 / 字體 / 字級皆透過 CSS variables 由後台設定注入。
   ============================================================ */

.zh-home {
	background-color: var(--zh-bg);
	color: var(--zh-text);
	font-family: var(--zh-font-body);
	line-height: 1.8;
	letter-spacing: 0.01em;
}

.zh-home.zh-paper {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	background-repeat: repeat;
}

.zh-home * { box-sizing: border-box; }

.zh-home h1, .zh-home h2, .zh-home h3 {
	font-family: var(--zh-font-heading);
	line-height: 1.4;
	letter-spacing: 0.02em;
	font-weight: 500;
	margin: 0;
}

.zh-eyebrow, .zh-index-label, .zh-marketbar-label, .zh-ms-label, .zh-product-name, .zh-ms-subhead {
	font-family: var(--zh-font-body);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-weight: 500;
	font-size: 0.72rem;
	color: var(--zh-muted);
}

.zh-h2 { font-size: var(--zh-h2-size); font-weight: 500; }

/* ---------- 點線花朵分隔線 ---------- */
.zh-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 clamp(24px, 8vw, 96px);
}
.zh-divider-line { flex: 1; border-top: 2px dotted var(--zh-muted); opacity: 0.6; }
.zh-divider-flower { display: flex; color: var(--zh-accent); flex-shrink: 0; }

/* ---------- 頂部通知列 ---------- */
.zh-marketbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 12px 24px;
	font-size: 0.82rem;
	color: var(--zh-muted);
	text-align: center;
}
.zh-marketbar-label { color: var(--zh-text); }
.zh-marketbar-link {
	color: var(--zh-accent);
	text-decoration: none;
	border-bottom: 1px solid var(--zh-accent);
	padding-bottom: 1px;
}
.zh-marketbar-link:hover { opacity: 0.7; }

/* ---------- Hero：置中、寬版留白 ---------- */
.zh-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: clamp(64px, 12vw, 140px) clamp(24px, 8vw, 96px);
	max-width: 900px;
	margin: 0 auto;
}
.zh-meta-row {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: clamp(14px, 3vw, 28px);
	font-family: var(--zh-font-body);
	font-size: 0.68rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--zh-muted);
	margin-bottom: 26px;
}
.zh-hero-title {
	font-size: var(--zh-hero-size);
	font-weight: 700;
	margin-bottom: 14px;
}
.zh-hero-subtitle {
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	color: var(--zh-muted);
	font-style: italic;
	margin: 0 0 8px;
}
.zh-hero-tagline {
	font-size: 0.85rem;
	color: var(--zh-muted);
	margin: 0 0 34px;
}
.zh-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.zh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 32px;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid var(--zh-primary);
	transition: background .25s ease, color .25s ease, opacity .25s ease;
}
.zh-btn-solid { background: var(--zh-primary); color: var(--zh-bg); }
.zh-btn-solid:hover { opacity: 0.78; }
.zh-btn-line { background: transparent; color: var(--zh-primary); }
.zh-btn-line:hover { background: var(--zh-primary); color: var(--zh-bg); }

.zh-hero-media { margin-top: 56px; width: 100%; max-width: 480px; text-align: left; }
.zh-figcaption {
	font-family: var(--zh-font-body);
	font-size: 0.72rem;
	font-style: italic;
	color: var(--zh-muted);
	margin: 14px 0 0;
}

/* ---------- 紙感疊層相框（統一套用在 Hero / 商品照片） ---------- */
.zh-frame {
	position: relative;
	display: block;
}
.zh-frame-backing {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 100%;
	height: 100%;
	background: var(--zh-frame-bg);
	z-index: 0;
}
.zh-frame-photo {
	position: relative;
	z-index: 1;
	display: block;
}
.zh-frame-photo img,
.zh-frame-photo img.wp-post-image {
	width: 100%;
	display: block;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}
.zh-frame-lg .zh-frame-backing { top: 14px; left: 14px; }

/* ---------- About：兩欄、寬版留白 ---------- */
.zh-about {
	display: grid;
	grid-template-columns: 0.7fr 1.3fr;
	gap: clamp(28px, 6vw, 90px);
	padding: clamp(60px, 10vw, 130px) clamp(24px, 8vw, 96px);
	max-width: 1200px;
	margin: 0 auto;
}
.zh-about .zh-h2 { margin-top: 12px; }
.zh-about-body {
	font-size: 1rem;
	max-width: 48ch;
	color: var(--zh-text);
}
.zh-about-quote {
	margin-top: 30px;
	padding-top: 22px;
	border-top: 1px solid rgba(0,0,0,0.1);
	font-style: italic;
	color: var(--zh-muted);
	max-width: 48ch;
	font-size: 0.95rem;
}

@media (max-width: 760px) {
	.zh-about { grid-template-columns: 1fr; }
}

/* ---------- New Arrivals：區塊標頭 ---------- */
.zh-newarrivals {
	padding: clamp(60px, 10vw, 130px) clamp(24px, 8vw, 96px);
	max-width: 1200px;
	margin: 0 auto;
}
.zh-section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 48px;
}
.zh-viewall {
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	color: var(--zh-text);
	text-decoration: none;
	border-bottom: 1px solid var(--zh-text);
	white-space: nowrap;
	padding-bottom: 1px;
}
.zh-viewall:hover { color: var(--zh-accent); border-color: var(--zh-accent); }

.zh-product-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-decoration: none;
	color: var(--zh-text);
	height: 100%;
}
.zh-product-card .zh-frame-photo img { transition: opacity .3s ease; }
.zh-product-card:hover .zh-frame-photo img { opacity: 0.8; }
.zh-product-name { font-size: 0.72rem; }
.zh-product-price { color: var(--zh-muted); font-size: 0.88rem; }
.zh-notice { color: var(--zh-muted); }

/* ---------- 翻書式新品瀏覽 ---------- */
.zh-book {
	max-width: 900px;
	margin: 0 auto;
}
.zh-book-stage {
	position: relative;
	perspective: 2200px;
	min-height: clamp(420px, 42vw, 600px);
}
.zh-book-spread {
	position: absolute;
	inset: 0;
	display: flex;
	background: var(--zh-card-bg);
	border: 1px solid rgba(0,0,0,0.1);
	transform-style: preserve-3d;
	transform-origin: left center;
	transition: transform 0.9s cubic-bezier(0.45, 0.05, 0.55, 0.95);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transform: rotateY(0deg);
	overflow: hidden;
}
.zh-book-spread.zh-flip-out { transform: rotateY(-180deg); }
.zh-book-side {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
	padding: clamp(18px, 3.5vw, 40px);
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.zh-book-side .zh-frame { max-width: 260px; margin: 0 auto; width: 100%; }
.zh-book-side:first-child {
	border-right: 1px solid rgba(0,0,0,0.12);
	box-shadow: inset -12px 0 20px -16px rgba(0,0,0,0.3);
}
.zh-book-side:last-child {
	box-shadow: inset 12px 0 20px -16px rgba(0,0,0,0.3);
}
.zh-book-side .zh-product-card { justify-content: center; text-align: center; height: auto; }
.zh-book-pagenum {
	position: absolute;
	bottom: 12px;
	font-family: var(--zh-font-body);
	font-size: 0.7rem;
	color: var(--zh-muted);
}
.zh-book-side:first-child .zh-book-pagenum { left: 16px; }
.zh-book-side:last-child .zh-book-pagenum { right: 16px; }
.zh-side-empty { background: transparent; }

.zh-book-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
	margin-top: 28px;
}
.zh-book-prev, .zh-book-next {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--zh-primary);
	background: transparent;
	color: var(--zh-primary);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.zh-book-prev:hover:not(:disabled), .zh-book-next:hover:not(:disabled) {
	background: var(--zh-primary);
	color: var(--zh-bg);
}
.zh-book-prev:disabled, .zh-book-next:disabled { opacity: 0.3; cursor: default; }
.zh-book-pageno {
	font-family: var(--zh-font-body);
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	color: var(--zh-muted);
	min-width: 64px;
	text-align: center;
}

@media (max-width: 640px) {
	.zh-book-stage { min-height: clamp(560px, 140vw, 760px); }
	.zh-book-spread { flex-direction: column; overflow-y: auto; }
	.zh-book-side:first-child { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.12); box-shadow: inset 0 -12px 20px -16px rgba(0,0,0,0.3); }
	.zh-book-side:last-child { box-shadow: inset 0 12px 20px -16px rgba(0,0,0,0.3); }
}

/* ---------- Market：條列式 / Stockist：塊狀卡片 ---------- */
.zh-marketstockist {
	padding: clamp(60px, 10vw, 130px) clamp(24px, 8vw, 96px);
	max-width: 1080px;
	margin: 0 auto;
}
.zh-ms-intro {
	color: var(--zh-muted);
	max-width: 60ch;
	margin: 16px 0 44px;
	font-size: 0.95rem;
}
.zh-ms-subhead { margin: 0 0 16px; }
.zh-ms-subhead:not(:first-of-type) { margin-top: 40px; }

.zh-ms-list { display: flex; flex-direction: column; }
.zh-ms-row {
	display: grid;
	grid-template-columns: 1fr 1fr 2fr 1fr;
	gap: 16px;
	align-items: baseline;
	padding: 16px 0;
	border-bottom: 1px solid rgba(0,0,0,0.09);
	font-size: 0.9rem;
}
.zh-ms-row .zh-ms-label { color: var(--zh-accent); }
.zh-ms-title { font-family: var(--zh-font-heading); }
.zh-ms-loc, .zh-ms-date { color: var(--zh-muted); }

.zh-ms-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}
.zh-ms-card {
	background: var(--zh-card-bg);
	border: 1px solid rgba(0,0,0,0.12);
	padding: 24px;
}
.zh-ms-card h3 { font-size: 1rem; margin: 10px 0 6px; }
.zh-ms-card p { font-size: 0.85rem; color: var(--zh-muted); margin: 0; }

@media (max-width: 640px) {
	.zh-ms-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Instagram / 頁尾 ---------- */
.zh-instagram {
	text-align: center;
	padding: clamp(64px, 10vw, 150px) clamp(24px, 8vw, 96px);
}
.zh-instagram .zh-h2 { max-width: 24ch; margin: 14px auto 36px; }
.zh-instagram-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.zh-contact { color: var(--zh-muted); font-size: 0.82rem; }
.zh-contact a { color: var(--zh-muted); }

/* ---------- 商店頁橫幅 ---------- */
.zh-shop-banner {
	background-color: var(--zh-bg);
	background-image: var(--zh-shop-img, none);
	background-size: cover;
	background-position: center;
	text-align: center;
	padding: clamp(64px, 10vw, 130px) clamp(24px, 8vw, 96px);
	margin-bottom: 48px;
	border-bottom: 1px solid rgba(0,0,0,0.09);
}
.zh-shop-banner .zh-eyebrow { justify-content: center; display: flex; margin-bottom: 14px; }
.zh-shop-heading {
	font-family: var(--zh-font-heading);
	font-size: var(--zh-hero-size);
	font-weight: 700;
	color: var(--zh-text);
	margin: 0 0 12px;
}
.zh-shop-subtitle { color: var(--zh-muted); max-width: 60ch; margin: 0 auto; }

/* ---------- WooCommerce 商品列表覆寫 ----------
   改用 box-shadow 做出「紙感疊層」偏移色塊，而不是用絕對定位猜測卡片高度。
   box-shadow 永遠貼合圖片本身的實際大小，不受佈景主題欄數、卡片高度影響，
   在桌面版多欄排列時也不會跑版。 */
body.zh-shop-styled ul.products li.product {
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin-bottom: 40px !important;
}
body.zh-shop-styled ul.products li.product a img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	display: block;
	margin: 0 0 16px !important;
	box-shadow: 8px 8px 0 var(--zh-frame-bg, #c9bb9e);
	transition: opacity .3s ease, box-shadow .3s ease;
}
body.zh-shop-styled ul.products li.product:hover img { opacity: 0.85; }
body.zh-shop-styled ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--zh-font-body, inherit);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 500;
	font-size: 0.72rem;
}
body.zh-shop-styled ul.products li.product .price {
	color: var(--zh-muted, inherit);
	font-weight: 400;
	font-size: 0.88rem;
}
body.zh-shop-styled ul.products li.product .button {
	border: 1px solid var(--zh-text, #33302a) !important;
	background: transparent !important;
	color: var(--zh-text, #33302a) !important;
	border-radius: 0 !important;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 400;
	font-size: 0.75rem;
}
body.zh-shop-styled ul.products li.product .button:hover {
	background: var(--zh-text, #33302a) !important;
	color: var(--zh-bg, #fff) !important;
}
