/* ==========================================================================
   AetherGlow 定制工坊
   ========================================================================== */

@font-face {
	font-family: 'Cormorant Garamond';
	src: url('fonts/cormorant-garamond-600.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Manrope';
	src: url('fonts/manrope-400.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Manrope';
	src: url('fonts/manrope-500.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Manrope';
	src: url('fonts/manrope-700.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

.ag-studio {
	--blue: #002f6c;
	--gold: #c5a059;
	--ivory: #f7f3ec;
	--panel: #fffdf9;
	--ink: #14161a;
	--muted: #6e6a63;
	--line: #ddd5c7;

	max-width: 760px;
	margin: 0 auto;
	padding: 56px 20px 96px;
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--ink);
}

/* ---------- 页头 ---------- */

.ag-studio__head {
	margin-bottom: 44px;
	text-align: center;
}

.ag-studio__eyebrow {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--gold);
}

.ag-studio__title {
	margin: 0 0 14px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: clamp(34px, 6vw, 52px);
	font-weight: 600;
	line-height: 1.1;
	color: var(--blue);
}

.ag-studio__lede {
	max-width: 46ch;
	margin: 0 auto;
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--muted);
}

/* ---------- 步骤 ---------- */

.ag-step {
	margin-bottom: 22px;
	padding: 24px 22px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: var(--panel);
	transition: opacity 220ms ease;
}

.ag-step.is-locked {
	opacity: 0.38;
	pointer-events: none;
}

.ag-step__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--blue);
}

.ag-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1px solid var(--gold);
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
	color: var(--gold);
}

/* ---------- 上传 ---------- */

.ag-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 38px 20px;
	border: 1.5px dashed #c9c0b0;
	border-radius: 2px;
	background: var(--ivory);
	text-align: center;
	cursor: pointer;
	transition:
		border-color 200ms ease,
		background-color 200ms ease;
}

.ag-drop:hover,
.ag-drop.is-over {
	border-color: var(--blue);
	background: #f2efe6;
}

.ag-drop__icon {
	color: var(--gold);
}

.ag-drop__text {
	font-size: 14px;
	color: var(--ink);
}

.ag-drop__text strong {
	font-weight: 700;
}

.ag-drop__hint {
	font-size: 11.5px;
	letter-spacing: 0.02em;
	color: var(--muted);
}

.ag-tips {
	margin: 18px 0 0;
	padding: 0 0 0 18px;
	list-style: none;
}

.ag-tips li {
	position: relative;
	margin-bottom: 8px;
	padding-left: 14px;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--muted);
}

.ag-tips li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 8px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--gold);
}

.ag-tips strong {
	color: var(--ink);
	font-weight: 700;
}

/* ---------- 进度 ---------- */

.ag-proc {
	margin: 4px 0 0;
}

.ag-proc__bar {
	height: 3px;
	background: #e7e0d3;
	overflow: hidden;
}

.ag-proc__bar span {
	display: block;
	height: 100%;
	width: 4%;
	background: var(--blue);
	transition: width 280ms ease;
}

.ag-proc__label {
	margin: 10px 0 0;
	font-size: 12.5px;
	color: var(--muted);
}

/* ---------- 成品图 ---------- */

.ag-art__frame {
	display: flex;
	justify-content: center;
	padding: 12px;
	border-radius: 2px;
	background: #000;
}

#ag-art-canvas {
	display: block;
	width: 100%;
	max-width: 360px;
	height: auto;
}

.ag-art__note {
	margin: 12px 0 14px;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--muted);
}

.ag-art__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* ---------- 按钮 ---------- */

.ag-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border: 1px solid var(--blue);
	border-radius: 2px;
	background: transparent;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--blue);
	cursor: pointer;
	transition:
		background-color 180ms ease,
		color 180ms ease,
		opacity 180ms ease;
}

.ag-btn:hover {
	background: var(--blue);
	color: #fff;
}

.ag-btn--primary {
	background: var(--blue);
	color: #fff;
}

.ag-btn--primary:hover {
	background: #001f49;
}

.ag-btn[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
}

.ag-alert {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-left: 2px solid #b3261e;
	border-radius: 2px;
	background: #fdf3f2;
	font-size: 12.5px;
	line-height: 1.55;
	color: #8a1f19;
}

/* ---------- 选项 ---------- */

.ag-field {
	margin-bottom: 24px;
}

.ag-field:last-child {
	margin-bottom: 0;
}

.ag-field__label {
	display: block;
	margin-bottom: 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--blue);
}

.ag-field__opt {
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--muted);
}

.ag-field__hint {
	margin: 8px 0 0;
	font-size: 12px;
	color: var(--muted);
}

.ag-styles {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.ag-style {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 8px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: var(--ivory);
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 500;
	color: var(--ink);
	cursor: pointer;
}

.ag-style__swatch {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ag-style.is-active {
	border-color: var(--blue);
	box-shadow: 0 0 0 1px var(--blue);
}

.ag-style.is-soon {
	opacity: 0.5;
	cursor: not-allowed;
}

.ag-style__soon {
	font-size: 9.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.ag-colours {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.ag-colour {
	position: relative;
	width: 50px;
	height: 50px;
	padding: 2px;
	border: 1.5px solid var(--line);
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		transform 180ms ease;
}

.ag-colour__img {
	position: absolute;
	top: 2px;
	left: 2px;
	width: calc(100% - 4px);
	height: calc(100% - 4px);
	border-radius: 50%;
	object-fit: cover;
	z-index: 2;
	transition: transform 220ms ease;
}

.ag-colour__swatch {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ag-colour:hover {
	transform: translateY(-2px) scale(1.05);
	border-color: var(--gold);
}

.ag-colour:hover .ag-colour__img {
	transform: scale(1.1);
}

.ag-colour.is-active {
	border-color: var(--gold);
	box-shadow:
		0 0 0 2px #fff,
		0 0 0 4px var(--gold);
	transform: scale(1.04);
}

.ag-text {
	position: relative;
}

.ag-text input {
	width: 100%;
	height: 50px;
	padding: 0 62px 0 14px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink);
}

.ag-text input:focus {
	outline: none;
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.08);
}

.ag-text__count {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 11px;
	color: var(--muted);
	pointer-events: none;
}

/* ---------- 步骤标题行增加提示 ---------- */

.ag-step__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 18px;
}

.ag-step__head .ag-step__title {
	margin-bottom: 0;
}

.ag-step__action-hint {
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--gold);
}

/* ---------- 预览与大图放大镜 ---------- */

.ag-preview {
	position: relative;
}

.ag-preview__stage {
	position: relative;
	cursor: crosshair;
	overflow: visible;
	border-radius: 2px;
}

/* 预览图尽量占满内容宽度：这是客户唯一要看清的东西 */
.ag-preview canvas#ag-preview-canvas {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto;
	border-radius: 2px;
	background: #1a1613;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* 放大镜跟随镜片 (Lens) */
.ag-zoom-lens {
	position: absolute;
	width: 140px;
	height: 140px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	box-shadow:
		0 0 0 1.5px rgba(0, 0, 0, 0.6),
		0 0 14px rgba(197, 160, 89, 0.7),
		inset 0 0 14px rgba(255, 255, 255, 0.35);
	pointer-events: none;
	transform: translate(-50%, -50%);
	z-index: 10;
	backdrop-filter: blur(0.5px);
	transition: opacity 160ms ease;
}

/* 浮出式 2.5x 高清大图视窗 (Zoom Panel) */
.ag-zoom-panel {
	position: absolute;
	top: 0;
	right: -490px;
	width: 470px;
	height: 470px;
	border: 2px solid var(--gold);
	border-radius: 4px;
	background: #0d0d11;
	box-shadow:
		0 18px 48px rgba(0, 0, 0, 0.45),
		0 2px 10px rgba(0, 0, 0, 0.2);
	z-index: 30;
	overflow: hidden;
	pointer-events: none;
	animation: agZoomFade 180ms ease forwards;
}

@keyframes agZoomFade {
	from {
		opacity: 0;
		transform: translateY(6px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.ag-zoom-panel canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
	background: #0d0d11;
}

.ag-zoom-panel__badge {
	position: absolute;
	bottom: 12px;
	right: 12px;
	padding: 4px 10px;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.75);
	border: 1px solid rgba(197, 160, 89, 0.6);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gold);
	pointer-events: none;
}

/* 当屏幕空间不够往右弹大图时，大图居中悬浮在画布上方 */
@media (max-width: 1280px) {
	.ag-zoom-panel {
		right: 14px;
		top: 14px;
		width: min(380px, 80vw);
		height: min(380px, 80vw);
	}
}

@media (max-width: 600px) {
	.ag-zoom-panel {
		right: 0;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		border-radius: 2px;
	}
}

.ag-preview__note {
	margin: 12px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: var(--muted);
}

/* ---------- 下单 ---------- */

.ag-buy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ag-buy__sum {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ag-buy__price {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 26px;
	font-weight: 600;
	color: var(--blue);
}

.ag-buy__meta {
	font-size: 12px;
	color: var(--muted);
}

/* ---------- 晶石能量意图卡片 ---------- */

.ag-field__head-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 10px;
}

.ag-field__sublabel {
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--muted);
}

.ag-crystal-card {
	margin: 16px 0 12px;
	padding: 16px 18px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--gold);
	border-radius: 2px;
	background: #fff;
	transition: all 200ms ease;
}

.ag-crystal-card__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.ag-crystal-card__name {
	margin: 0;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 19px;
	font-weight: 600;
	color: var(--blue);
}

.ag-crystal-card__badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 2px;
	background: var(--ivory);
	border: 1px solid rgba(197, 160, 89, 0.4);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #63470b;
}

.ag-crystal-card__desc {
	margin: 0 0 10px;
	font-size: 12.5px;
	line-height: 1.55;
	color: #3f3c37;
}

.ag-crystal-card__space {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-size: 11.5px;
	border-top: 1px dashed var(--line);
	padding-top: 8px;
}

.ag-crystal-card__space-label {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 10px;
	color: var(--muted);
}

.ag-crystal-card__space-val {
	color: var(--blue);
	font-weight: 500;
}

/* ---------- 天然材质免责声明 ---------- */

.ag-natural-disclaimer {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 10px 0 0;
	padding: 10px 12px;
	border-radius: 2px;
	background: var(--ivory);
	font-size: 11.5px;
	line-height: 1.55;
	color: #615a4f;
}

.ag-natural-disclaimer svg {
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--gold);
}

.ag-natural-disclaimer strong {
	color: var(--ink);
	font-weight: 600;
}

/* ---------- 叙事区块：空间安放与开箱礼遇 ---------- */

.ag-story-block {
	margin: 36px 0;
	padding: 28px 22px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: var(--panel);
}

.ag-story-block__title {
	margin: 0 0 6px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 26px;
	font-weight: 600;
	text-align: center;
	color: var(--blue);
}

.ag-story-block__subtitle {
	margin: 0 0 24px;
	font-size: 13px;
	text-align: center;
	color: var(--muted);
}

.ag-spaces {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.ag-space-card {
	display: flex;
	flex-direction: column;
	padding: 18px 16px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: #fff;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.ag-space-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.ag-space-card__icon {
	color: var(--gold);
	margin-bottom: 10px;
}

.ag-space-card__title {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--blue);
}

.ag-space-card__text {
	margin: 0 0 12px;
	font-size: 12px;
	line-height: 1.6;
	color: var(--muted);
	flex: 1 0 auto;
}

.ag-space-card__match {
	font-size: 11px;
	font-weight: 600;
	color: var(--gold);
	border-top: 1px dashed var(--line);
	padding-top: 8px;
}

/* 开箱礼盒区块 */

.ag-story-block--gifting {
	background: linear-gradient(145deg, #001f49 0%, #002f6c 100%);
	border-color: #001f49;
	color: #fff;
}

.ag-gift-box__tag {
	display: inline-block;
	margin-bottom: 8px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold);
}

.ag-gift-box__title {
	margin: 0 0 12px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 26px;
	font-weight: 600;
	color: #fff;
}

.ag-gift-box__text {
	margin: 0 0 22px;
	font-size: 13.5px;
	line-height: 1.65;
	color: #d1d9e6;
	max-width: 58ch;
}

.ag-gift-box__perks {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.ag-gift-perk {
	padding: 14px 16px;
	border: 1px solid rgba(197, 160, 89, 0.35);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.05);
}

.ag-gift-perk__title {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 700;
	color: var(--gold);
}

.ag-gift-perk__desc {
	display: block;
	font-size: 11.5px;
	line-height: 1.55;
	color: #cbd5e1;
}

/* ---------- 第 5 步：订单概要与结算 ---------- */

.ag-order-summary {
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: var(--ivory);
}

.ag-order-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 6px 0;
	font-size: 12.5px;
	border-bottom: 1px dashed var(--line);
}

.ag-order-summary__row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.ag-order-summary__label {
	color: var(--muted);
	font-weight: 500;
}

.ag-order-summary__val {
	color: var(--ink);
	font-weight: 600;
	text-align: right;
}

.ag-consent--studio {
	margin-bottom: 18px;
}

.ag-buy__btns {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

@media (max-width: 760px) {
	.ag-spaces {
		grid-template-columns: 1fr;
	}
	.ag-gift-box__perks {
		grid-template-columns: 1fr;
	}
}

/* ---------- 首次加载提示 ---------- */

.ag-firstrun {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-left: 2px solid var(--gold);
	border-radius: 2px;
	background: var(--ivory);
	font-size: 12px;
	line-height: 1.6;
	color: var(--muted);
}

.ag-buy__note {
	margin: 16px 0 0;
	font-size: 12.5px;
	line-height: 1.65;
	color: var(--muted);
}

/* ---------- 窄屏 ---------- */

@media (max-width: 560px) {
	.ag-studio {
		padding: 36px 14px 72px;
	}

	.ag-step {
		padding: 20px 16px;
	}

	.ag-styles {
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
	}

	.ag-style {
		padding: 12px 4px;
		font-size: 10.5px;
	}

	.ag-style__swatch {
		width: 28px;
		height: 28px;
	}

	.ag-btn {
		width: 100%;
	}
}
