/**
 * MeltBeads 主题 - 第一张图 UI
 * 路径：meltbeads-theme/assets/css/main.css
 * 字体由 functions.php 的 meltbeads-fonts 加载
 */

:root {
	--mb-bg: #F2F0EB;
	--mb-text: #1C1C1C;
	--mb-accent: #000000;
	--mb-pegboard: #D6D3CD;
}

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

body {
	margin: 0;
	background-color: var(--mb-bg);
	color: var(--mb-text);
	font-family: 'Playfair Display', serif;
	overflow-x: hidden;
	scroll-behavior: smooth;
}

a {
	color: inherit;
	text-decoration: none;
}

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

/* Pegboard 点阵背景 */
.pegboard-bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: radial-gradient(var(--mb-pegboard) 15%, transparent 16%);
	background-size: 30px 30px;
	z-index: -1;
	opacity: 0.6;
	pointer-events: none;
}

/* ========== Header：第一张图 ☰ MENU | MELTBEADS | ACCOUNT CART ========== */
.mb-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(249, 249, 249, 0.8);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mb-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 32px;
	max-width: 1400px;
	margin: 0 auto;
}

.mb-header__left {
	width: 33.33%;
}

.mb-header__center {
	width: 33.33%;
	text-align: center;
}

.mb-header__right {
	width: 33.33%;
	display: flex;
	justify-content: flex-end;
	gap: 24px;
}

.mb-menu-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	cursor: pointer;
	font-family: 'Space Mono', monospace;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mb-text);
	padding: 6px 0;
	transition: opacity 0.2s ease;
}

.mb-menu-btn:hover {
	opacity: 0.7;
}

.mb-menu-icon {
	font-size: 1em;
}

.mb-brand {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: 24px;
	letter-spacing: -0.02em;
	color: var(--mb-text);
}

.mb-brand-reg {
	color: #dc2626;
	font-size: 12px;
	vertical-align: super;
}

.mb-nav-link {
	font-family: 'Space Mono', monospace;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mb-text);
	position: relative;
	transition: opacity 0.2s ease;
}

.mb-nav-link::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 1px;
	background: var(--mb-text);
	transition: width 0.2s ease;
}

.mb-nav-link:hover {
	opacity: 0.8;
}

.mb-nav-link:hover::after {
	width: 100%;
}

/* MENU 下拉面板 */
.mb-menu-panel {
	position: fixed;
	top: 72px;
	left: 32px;
	width: 100%;
	max-width: 480px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 24px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.15);
	z-index: 99998;
	overflow: hidden;
}
/* 登录后顶部 WordPress 管理条会占位，菜单下移 */
body.admin-bar .mb-menu-panel {
	top: 104px;
}

.mb-menu-panel[hidden] {
	display: none !important;
}

.mb-menu-panel.is-open {
	display: block;
}

.mb-menu-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mb-menu-panel__title {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: 18px;
	color: var(--mb-text);
}

.mb-menu-panel__close {
	background: none;
	border: none;
	cursor: pointer;
	font-family: 'Space Mono', monospace;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--mb-text);
	transition: opacity 0.2s ease;
}

.mb-menu-panel__close:hover {
	opacity: 0.7;
}

.mb-menu-panel__body {
	display: flex;
	flex-direction: column;
	padding: 12px;
}

.mb-menu-item {
	display: block;
	padding: 14px 16px;
	font-family: 'Space Mono', monospace;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mb-text);
	border-radius: 16px;
	transition: background 0.2s ease;
}

.mb-menu-item:hover {
	background: rgba(0, 0, 0, 0.04);
}

/* ========== Hero：第一张图 左 Polaroid 堆叠 + 右文案 ========== */
.mb-hero {
	min-height: calc(100vh - 80px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 24px 64px;
	position: relative;
	z-index: 1;
}

.mb-hero__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
	max-width: 1280px;
	margin: 0 auto;
	width: 100%;
}

@media (max-width: 900px) {
	.mb-hero__grid {
		grid-template-columns: 1fr;
	}
	.mb-hero__visual {
		order: 1;
		min-height: 420px;
	}
	.mb-hero__copy {
		order: 2;
	}
}

/* 左侧：Polaroid 堆叠 */
.mb-hero__visual {
	position: relative;
	min-height: 520px;
}

.mb-hero__stack {
	position: relative;
	width: 100%;
	height: 100%;
}

/* 艺术相框 Polaroid */
.art-frame {
	position: absolute;
	background: #fff;
	padding: 12px 12px 40px 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.art-frame img {
	width: 100%;
	display: block;
}

.art-frame__cap {
	margin: 16px 0 0;
	font-family: 'Space Mono', monospace;
	font-size: 10px;
	color: #6b7280;
	line-height: 1.4;
}

.art-frame--bottom {
	bottom: 0;
	left: 32px;
	width: 256px;
	transform: rotate(-3deg);
	z-index: 10;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.art-frame--top {
	top: 0;
	right: 32px;
	width: 256px;
	transform: rotate(6deg);
	z-index: 20;
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

.pixel-overlay {
	position: absolute;
	inset: 12px 12px 40px 12px;
	background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSIvPgo8L3N2Zz4=');
	background-size: 4px 4px;
	pointer-events: none;
	opacity: 0.3;
}

@media (max-width: 600px) {
	.art-frame--bottom,
	.art-frame--top {
		width: 200px;
	}
	.art-frame--bottom {
		left: 50%;
		transform: translateX(-50%) rotate(-3deg);
	}
	.art-frame--top {
		right: 50%;
		transform: translateX(50%) rotate(6deg);
	}
}

/* 色板卡片 */
.mb-palette-note {
	position: absolute;
	bottom: 16px;
	right: 48px;
	width: 160px;
	background: #fff;
	border: 2px solid var(--mb-accent);
	padding: 10px;
	z-index: 30;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
	transform: rotate(-4deg);
}

.mb-palette-note__label {
	margin: 0 0 8px;
	font-family: 'Space Mono', monospace;
	font-size: 7px;
	text-transform: none;
	letter-spacing: 0.1em;
	color: #374151;
}

.mb-palette-note__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 8px;
}

.mb-swatch {
	width: 20px;
	height: 20px;
	border: 1px solid #9ca3af;
	border-radius: 3px;
	flex-shrink: 0;
}

.mb-palette-note__count {
	margin: 0;
	padding-top: 6px;
	border-top: 1px solid #d1d5db;
	font-family: 'Space Mono', monospace;
	font-size: 6px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #4b5563;
}

/* 右侧：标题、描述、标签、CTA */
.mb-hero__copy {
	max-width: 540px;
}

.mb-hero__title {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: clamp(32px, 4.5vw, 56px);
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 24px;
	color: var(--mb-text);
}

.mb-hero__desc {
	font-family: 'Space Mono', monospace;
	font-size: 16px;
	line-height: 1.6;
	color: #4b5563;
	margin: 0 0 24px;
	letter-spacing: 0.01em;
}

.mb-hero__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
}

.mb-hero__tag {
	display: inline-block;
	padding: 6px 12px;
	background: #f3f4f6;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 999px;
	font-family: 'Space Mono', monospace;
	font-size: 12px;
	letter-spacing: 0.05em;
	color: #374151;
}

.mb-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 32px;
	font-family: 'Space Mono', monospace;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	border: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mb-cta--primary {
	background: var(--mb-accent);
	color: #fff;
	border-radius: 2px;
	box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
}

.mb-cta--primary:hover {
	transform: translate(2px, 2px);
	box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

/* Footer：四栏布局，与测试版一致 */
.site-footer {
	border-top: 1px solid rgba(0,0,0,0.08);
	background: rgba(255,255,255,0.9);
	font-family: 'Space Mono', monospace;
	color: var(--mb-text);
}

.footer-four__container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 48px 24px 24px;
}

.footer-four__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px 24px;
	margin-bottom: 32px;
}

@media (min-width: 768px) {
	.footer-four__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.footer-four__grid {
		grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
		gap: 48px 32px;
	}
}

.footer-four__heading {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: 18px;
	margin: 0 0 12px;
	color: var(--mb-text);
}

.footer-four__reg { font-size: 12px; vertical-align: super; color: #dc2626; }

.footer-four__story {
	font-size: 14px;
	line-height: 1.6;
	color: #4b5563;
	margin: 0;
}

.footer-four__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.footer-four__list a {
	color: #374151;
	text-decoration: none;
	font-size: 14px;
}

.footer-four__list a:hover { text-decoration: underline; }

.footer-four__news-desc {
	font-size: 14px;
	color: #4b5563;
	margin: 0 0 12px;
	line-height: 1.5;
}

.footer-four__form {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.footer-four__input {
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid rgba(0,0,0,0.25);
	background: transparent;
	font-family: 'Space Mono', monospace;
	font-size: 14px;
	color: var(--mb-text);
}

.footer-four__input::placeholder { color: rgba(0,0,0,0.5); }

.footer-four__join {
	padding: 10px 20px;
	background: var(--mb-accent);
	color: #fff;
	border: none;
	font-family: 'Space Mono', monospace;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	cursor: pointer;
	white-space: nowrap;
}

.footer-four__join:hover { opacity: 0.9; }

.footer-four__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 20px;
	border-top: 1px solid rgba(0,0,0,0.08);
	font-size: 12px;
	color: #6b7280;
}

.footer-four__pay { letter-spacing: 0.05em; }

/* 响应式 Header */
@media (max-width: 768px) {
	.mb-header__inner {
		padding: 14px 20px;
		flex-wrap: wrap;
	}
	.mb-header__left,
	.mb-header__center,
	.mb-header__right {
		width: auto;
	}
	.mb-header__center {
		order: 1;
		width: 100%;
		margin-bottom: 8px;
	}
	.mb-header__left {
		order: 2;
	}
	.mb-header__right {
		order: 3;
		gap: 16px;
	}
	.mb-menu-panel {
		left: 16px;
		right: 16px;
		max-width: none;
	}
}
