/* ==========================================================================
 * HBC Product Summary — 产品详情卡
 *
 * 结构:
 *   .hbc-product-summary
 *     ├─ .hbc-product-summary__sku
 *     ├─ .hbc-product-summary__title
 *     ├─ .hbc-product-summary__price
 *     │     ├─ .hbc-product-summary__price-label
 *     │     └─ .hbc-product-summary__price-value
 *     ├─ .hbc-product-summary__color
 *     │     ├─ .hbc-product-summary__color-row
 *     │     │     ├─ __color-label
 *     │     │     └─ __color-text
 *     │     └─ .hbc-product-summary__swatches
 *     │           └─ .hbc-product-summary__swatch [.is-active]
 *     ├─ .hbc-product-summary__qty
 *     │     ├─ .hbc-product-summary__qty-label
 *     │     └─ .hbc-product-summary__qty-wrap
 *     │           ├─ .hbc-product-summary__qty-btn--minus
 *     │           ├─ .hbc-product-summary__qty-input
 *     │           └─ .hbc-product-summary__qty-btn--plus
 *     ├─ .hbc-product-summary__acc
 *     │     └─ .hbc-product-summary__acc-item [.is-open]
 *     │           ├─ .hbc-product-summary__acc-trigger
 *     │           │     ├─ .hbc-product-summary__acc-title
 *     │           │     └─ .hbc-product-summary__acc-icon (svg)
 *     │           └─ .hbc-product-summary__acc-panel
 *     │                 └─ .hbc-product-summary__acc-content
 *     ├─ .hbc-product-summary__cta (a)
 *     ├─ .hbc-product-summary__help (a)
 *     │     ├─ .hbc-product-summary__help-icon
 *     │     └─ span
 *     └─ .hbc-product-summary__divider
 * ========================================================================== */

.hbc-product-summary {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	box-sizing: border-box;
}

.hbc-product-summary *,
.hbc-product-summary *::before,
.hbc-product-summary *::after {
	box-sizing: border-box;
}

/* ==========================================================================
 *  SKU
 * ========================================================================== */
.hbc-product-summary__sku {
	color: #9CA3AF;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
}

/* ==========================================================================
 *  标题
 * ========================================================================== */
.hbc-product-summary__title {
	margin: 0;
	color: #1D2D5C;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
}

/* ==========================================================================
 *  价格
 * ========================================================================== */
.hbc-product-summary__price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.hbc-product-summary__price-label {
	display: inline-block;
	background-color: #E5E7EB;
	color: #6B7280;
	font-size: 13px;
	font-weight: 500;
	padding: 2px 6px;
	border-radius: 2px;
	line-height: 1.4;
}

.hbc-product-summary__price-value {
	color: #1D2D5C;
	font-size: 28px;
	font-weight: 600;
	line-height: 1.2;
}

/* WC 价格自带的 ins / del 美化(自动模式时输出) */
.hbc-product-summary__price-value del {
	color: #9CA3AF;
	font-weight: 400;
	margin-right: 8px;
}
.hbc-product-summary__price-value ins {
	text-decoration: none;
}

/* ==========================================================================
 *  颜色选项
 * ========================================================================== */
.hbc-product-summary__color {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hbc-product-summary__color-row {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.hbc-product-summary__color-label {
	color: #4B5563;
	font-size: 14px;
	font-weight: 400;
}

.hbc-product-summary__color-text {
	color: #1F1F1F;
	font-size: 14px;
	font-weight: 600;
}

.hbc-product-summary__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hbc-product-summary__swatch {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	background-color: var( --swatch-color, #FFFFFF );
	border: 2px solid #1D2D5C;
	border-radius: 50%;
	padding: 0;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hbc-product-summary__swatch:hover {
	transform: scale(1.05);
}

.hbc-product-summary__swatch:focus-visible {
	outline: 2px solid #E91A8C;
	outline-offset: 2px;
}

.hbc-product-summary__swatch.is-active {
	box-shadow: 0 0 0 2px #FFFFFF inset, 0 0 0 4px #1D2D5C inset;
}

/* ==========================================================================
 *  数量
 * ========================================================================== */
.hbc-product-summary__qty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.hbc-product-summary__qty-label {
	color: #4B5563;
	font-size: 14px;
	font-weight: 400;
}

.hbc-product-summary__qty-wrap {
	display: inline-flex;
	align-items: stretch;
	height: 48px;
	min-width: 130px;
	background-color: #FFFFFF;
	border: 1px solid #D1D5DB;
	border-radius: 4px;
	overflow: hidden;
}

.hbc-product-summary__qty-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	background: transparent;
	border: 0;
	padding: 0;
	color: #E91A8C;
	font-size: 20px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: background-color 0.12s ease;
	line-height: 1;
}

.hbc-product-summary__qty-btn:hover {
	background-color: rgba( 233, 26, 140, 0.08 );
}

.hbc-product-summary__qty-btn:focus-visible {
	outline: 2px solid #E91A8C;
	outline-offset: -2px;
}

.hbc-product-summary__qty-input {
	flex: 1 1 auto;
	min-width: 50px;
	width: 100%;
	padding: 0 4px;
	margin: 0;
	background: transparent;
	border: 0;
	color: #1F1F1F;
	font-size: 16px;
	font-weight: 500;
	font-family: inherit;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.hbc-product-summary__qty-input::-webkit-outer-spin-button,
.hbc-product-summary__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.hbc-product-summary__qty-input:focus {
	outline: none;
}

/* ==========================================================================
 *  手风琴
 * ========================================================================== */
.hbc-product-summary__acc {
	display: flex;
	flex-direction: column;
}

.hbc-product-summary__acc-item {
	border-bottom: 1px solid #E5E7EB;
}

.hbc-product-summary__acc-item:first-child {
	border-top: 1px solid #E5E7EB;
}

.hbc-product-summary__acc-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 14px 0;
	background: transparent;
	border: 0;
	font-family: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.hbc-product-summary__acc-trigger:focus-visible {
	outline: 2px solid #1D2D5C;
	outline-offset: -2px;
}

.hbc-product-summary__acc-title {
	flex: 1 1 auto;
	color: #1D2D5C;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.hbc-product-summary__acc-icon {
	flex: 0 0 auto;
	color: #E91A8C;
	transition: transform 0.2s ease;
}

.hbc-product-summary__acc-item.is-open .hbc-product-summary__acc-icon {
	transform: rotate(180deg);
}

/* 内容面板 — 用 grid-template-rows 实现高度动画 */
.hbc-product-summary__acc-panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.25s ease;
}

.hbc-product-summary__acc-item.is-open .hbc-product-summary__acc-panel {
	grid-template-rows: 1fr;
}

.hbc-product-summary__acc-content {
	min-height: 0;
	overflow: hidden;
	padding: 0;
	color: #4B5563;
	font-size: 14px;
	line-height: 1.6;
}

.hbc-product-summary__acc-item.is-open .hbc-product-summary__acc-content {
	padding-bottom: 16px;
}

.hbc-product-summary__acc-content > *:first-child {
	margin-top: 0;
}

.hbc-product-summary__acc-content > *:last-child {
	margin-bottom: 0;
}

.hbc-product-summary__acc-content p {
	margin: 0 0 12px;
}

.hbc-product-summary__acc-content p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
 *  CTA 按钮
 * ========================================================================== */
.hbc-product-summary__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 16px 24px;
	margin: 0;
	background-color: #1D2D5C;
	color: #FFFFFF;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.1s ease;
}

.hbc-product-summary__cta:hover,
.hbc-product-summary__cta:focus {
	background-color: #142046;
	color: #FFFFFF;
	text-decoration: none;
}

.hbc-product-summary__cta:active {
	transform: translateY(1px);
}

.hbc-product-summary__cta:focus-visible {
	outline: 2px solid #E91A8C;
	outline-offset: 2px;
}

/* ==========================================================================
 *  帮助链接
 * ========================================================================== */
.hbc-product-summary__help {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #1F1F1F;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: opacity 0.15s ease;
	align-self: center;
}

.hbc-product-summary__help:hover,
.hbc-product-summary__help:focus {
	color: #1F1F1F;
	text-decoration: none;
	opacity: 0.8;
}

.hbc-product-summary__help-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background-color: #E91A8C;
	color: #FFFFFF;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	flex: 0 0 auto;
}

/* ==========================================================================
 *  装饰线
 * ========================================================================== */
.hbc-product-summary__divider {
	width: 100%;
	height: 1px;
	background-color: #E91A8C;
	margin-top: 8px;
}

/* ==========================================================================
 *  减少动效偏好
 * ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.hbc-product-summary__acc-panel,
	.hbc-product-summary__acc-icon,
	.hbc-product-summary__qty-btn,
	.hbc-product-summary__swatch,
	.hbc-product-summary__cta {
		transition: none;
	}
}
