/* YY Product Customizer - frontend 样式（适配 Woodmart / 通用 WooCommerce 主题） */

/* ---------- 深色主题：黑底白字 ---------- */
.yy-pc-container,
.yy-pc-container * {
	box-sizing: border-box;
}

.yy-pc-container {
	margin: 25px 0 20px;
	padding: 20px 22px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 10px;
	background: #000000;
	color: #ffffff;
	font-size: 14px;
}

.yy-pc-heading {
	font-size: 19px;
	font-weight: 600;
	margin: 0 0 18px;
	padding-bottom: 12px;
	color: #ffffff;
	border-bottom: 1px solid rgba(255, 255, 255, .15);
}

/* ---------- 步骤 ---------- */
.yy-pc-step {
	margin-bottom: 22px;
}

.yy-pc-step-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 10px;
	display: flex;
	align-items: center;
	gap: 6px;
	color: #ffffff;
}

.yy-pc-step-title::after {
	content: "*";
	color: #ff6b66;
}

/* ---------- 图片画廊选项 ---------- */
.yy-pc-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
	width: 100%;
}

.yy-pc-image-option {
	flex: 1 1 84px;
	width: auto;
	max-width: 150px;
	cursor: pointer;
	text-align: center;
	border: 2px solid transparent;
	border-radius: 8px;
	padding: 4px;
	transition: border-color .15s ease, background .15s ease;
}

.yy-pc-image-option:hover {
	border-color: rgba(255, 255, 255, .35);
}

.yy-pc-image-option.selected {
	border-color: #4da3ff;
	background: rgba(255, 255, 255, .06);
}

.yy-pc-image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 6px;
	overflow: hidden;
	background: #111111;
}

.yy-pc-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.yy-pc-zoom {
	position: absolute;
	right: 4px;
	bottom: 4px;
	width: 22px;
	height: 22px;
	line-height: 22px;
	text-align: center;
	border-radius: 4px;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 13px;
	cursor: zoom-in;
	user-select: none;
}

.yy-pc-zoom:hover {
	background: rgba(0, 0, 0, .8);
}

.yy-pc-image-label {
	display: block;
	font-size: 12px;
	line-height: 1.35;
	margin-top: 6px;
	color: #dddddd;
}

/* 说明图片画廊（仅展示，不参与选择） */
.yy-pc-info-item {
	cursor: zoom-in;
}

.yy-pc-info-item:hover {
	border-color: rgba(255, 255, 255, .35);
}

.yy-pc-info-item .yy-pc-image-wrap img {
	cursor: zoom-in;
}

/* ---------- 下拉框 ---------- */
.yy-pc-select-wrap {
	max-width: 100%;
}

.yy-pc-select {
	width: 100%;
	height: 42px;
	padding: 0 12px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 6px;
	background: #111111;
	color: #ffffff;
	font-size: 14px;
	cursor: pointer;
}

.yy-pc-select option {
	background: #111111;
	color: #ffffff;
}

.yy-pc-select:focus {
	outline: none;
	border-color: #4da3ff;
	box-shadow: 0 0 0 3px rgba(77, 163, 255, .2);
}

.yy-pc-error .yy-pc-select {
	border-color: #ff6b66;
	box-shadow: 0 0 0 3px rgba(255, 107, 102, .15);
}

.yy-pc-error .yy-pc-step-title {
	color: #ff6b66;
}

/* ---------- 价格面板 ---------- */
.yy-pc-price-panel {
	border-top: 1px solid rgba(255, 255, 255, .15);
	margin-top: 6px;
	padding: 14px 2px 4px;
}

.yy-pc-price-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 5px 0;
	color: #cccccc;
}

.yy-pc-price-row span:last-child {
	font-variant-numeric: tabular-nums;
}

.yy-pc-total-row {
	border-top: 1px dashed rgba(255, 255, 255, .25);
	margin-top: 6px;
	padding-top: 10px;
	font-size: 17px;
	font-weight: 600;
	color: #ffffff;
}

.yy-pc-price-panel.yy-pc-has-extra #yy-pc-extra {
	color: #4da3ff;
	font-weight: 600;
}

/* ---------- 已选配置 ---------- */
.yy-pc-toggle {
	background: none;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 6px;
	padding: 7px 14px;
	font-size: 13px;
	cursor: pointer;
	color: #eeeeee;
}

.yy-pc-toggle:hover,
.yy-pc-toggle.active {
	border-color: #4da3ff;
	color: #4da3ff;
}

.yy-pc-details {
	display: none;
	margin-top: 12px;
	padding: 12px 14px;
	background: #111111;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 8px;
}

.yy-pc-detail-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 4px 0;
	font-size: 13px;
	border-bottom: 1px dashed rgba(255, 255, 255, .1);
}

.yy-pc-detail-row:last-child {
	border-bottom: none;
}

.yy-pc-detail-step {
	font-weight: 600;
	color: #ffffff;
}

.yy-pc-detail-value {
	flex: 1;
	color: #bbbbbb;
}

.yy-pc-detail-price {
	font-variant-numeric: tabular-nums;
	color: #4da3ff;
}

.yy-pc-empty {
	color: #999999;
	margin: 0;
	font-size: 13px;
}

/* ---------- Lightbox ---------- */
.yy-pc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.yy-pc-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .75);
}

.yy-pc-lightbox-content {
	position: relative;
	background: #111111;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, .15);
	border-radius: 10px;
	max-width: min(560px, 90vw);
	max-height: 88vh;
	overflow: auto;
	padding: 16px;
}

.yy-pc-lightbox-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.yy-pc-lightbox-header h4 {
	margin: 0;
	font-size: 15px;
	color: #ffffff;
}

.yy-pc-lightbox-close {
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #cccccc;
}

.yy-pc-lightbox-close:hover {
	color: #ffffff;
}

.yy-pc-lightbox-body img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
	.yy-pc-container {
		padding: 14px;
	}

	.yy-pc-image-option {
		flex-basis: 70px;
		max-width: 110px;
	}

	.yy-pc-select-wrap {
		max-width: 100%;
	}
}
