/* ============================================================
   HSM Single Product Page
   Brand-specific overrides for the Vineta WooCommerce template.
   ============================================================ */

:root {
	--hsm-primary: #f15a2b;
	--hsm-primary-soft: #fdebe3;
	--hsm-accent: #e63946;
	--hsm-border: #e6e6e6;
	--hsm-text: #1a1a1a;
	--hsm-muted: #707070;
}

/* ---------- Layout ---------- */
/* Header clearance is handled globally by .hsm-inner-page / .hsm-product-page in hsm-homepage.css. */
.hsm-single-product .tf-main-product {
	padding: 30px 0 60px;
}

.hsm-back-link {
	margin-bottom: 18px;
}
.hsm-back-link a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--hsm-text);
	font-size: 14px;
	text-decoration: none;
}
.hsm-back-link a:hover {
	color: var(--hsm-primary);
}
.hsm-back-link .icon::before {
	content: "←";
	font-style: normal;
	font-size: 16px;
	line-height: 1;
}

/* ---------- Info header (category + actions) ---------- */
.hsm-product-info .hsm-info-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}
.hsm-category-tag {
	display: inline-block;
	font-size: 14px;
	color: var(--hsm-muted);
	background: transparent;
	padding: 0;
	letter-spacing: 0.04em;
}
.hsm-info-actions {
	display: inline-flex;
	gap: 10px;
}
.hsm-info-actions .hsm-icon-btn,
.hsm-info-actions .wcboost-wishlist-button {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--hsm-border);
	border-radius: 50%;
	color: var(--hsm-text);
	background: #fff;
	font-size: 16px;
	transition: all 0.2s ease;
	padding: 0;
}
.hsm-info-actions .hsm-icon-btn:hover,
.hsm-info-actions .wcboost-wishlist-button:hover {
	color: var(--hsm-primary);
	border-color: var(--hsm-primary);
}
.hsm-info-actions .wcboost-wishlist-button__text {
	display: none;
}

/* ---------- Title ---------- */
.hsm-product-info .product-info-name {
	font-size: 22px;
	font-weight: 600;
	color: var(--hsm-text);
	margin: 0 0 14px;
	line-height: 1.4;
}

/* ---------- Bullet selling-points ---------- */
.hsm-bullet-list {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--hsm-text);
	line-height: 1.85;
}
.hsm-bullet-list p {
	margin: 0;
}

/* ---------- Rating ---------- */
.hsm-rating-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
}
.hsm-rating-row .list-star {
	display: inline-flex;
	gap: 2px;
	color: #ff9900;
	font-size: 14px;
}
.hsm-rating-row .count-review {
	color: var(--hsm-muted);
	font-size: 13px;
	text-decoration: none;
}

/* ---------- Price ---------- */
.hsm-price-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 18px;
}
.hsm-price-row .price {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
}
.hsm-price-row .price ins,
.hsm-price-row .price > .amount,
.hsm-price-row .price-new {
	font-size: 28px;
	font-weight: 700;
	color: var(--hsm-primary);
	text-decoration: none;
}
.hsm-price-row .price del,
.hsm-price-row .price-old {
	font-size: 14px;
	color: var(--hsm-muted);
	text-decoration: line-through;
}
.hsm-save-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 4px;
	background: var(--hsm-primary-soft);
	color: var(--hsm-primary);
	font-size: 12px;
	font-weight: 500;
}
.hsm-price-row .badge-sale {
	display: none; /* hidden in favour of the save badge */
}

/* ---------- Bundle picker ---------- */
.hsm-bundle-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 22px;
}
.hsm-bundle-option {
	flex: 1 1 auto;
	min-width: 110px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--hsm-border);
	background: #fff;
	border-radius: 6px;
	font-size: 13px;
	color: var(--hsm-text);
	cursor: pointer;
	transition: all 0.2s ease;
}
.hsm-bundle-option:hover {
	border-color: var(--hsm-primary);
}
.hsm-bundle-option.is-active {
	border-color: var(--hsm-primary);
	background: #fff;
	color: var(--hsm-text);
}
.hsm-bundle-option .hsm-bundle-price {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--hsm-primary-soft);
	color: var(--hsm-primary);
	font-size: 12px;
	font-weight: 500;
}
.hsm-bundle-option .hsm-bundle-price .amount {
	color: inherit;
	font-weight: inherit;
}

/* ---------- Gift picker ---------- */
.hsm-gift-picker {
	margin: 0 0 22px;
}
.hsm-section-title {
	font-size: 13px;
	color: var(--hsm-muted);
	margin: 0 0 8px;
}
.hsm-gift-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.hsm-gift-option {
	padding: 6px 14px;
	border: 1px solid var(--hsm-border);
	background: #fff;
	border-radius: 6px;
	font-size: 13px;
	color: var(--hsm-text);
	cursor: pointer;
	transition: all 0.2s ease;
}
.hsm-gift-option:hover,
.hsm-gift-option.is-active {
	border-color: var(--hsm-primary);
	color: var(--hsm-primary);
}

/* ---------- Promotion box ---------- */
.hsm-promo-box {
	border: 1px solid var(--hsm-border);
	border-radius: 8px;
	padding: 14px 18px;
	margin: 0 0 22px;
	background: #fff;
}
.hsm-promo-title {
	font-size: 14px;
	color: var(--hsm-text);
	margin: 0 0 8px;
	font-weight: 500;
}
.hsm-promo-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.hsm-promo-list li {
	font-size: 13px;
	color: var(--hsm-accent);
	line-height: 1.9;
}

/* ---------- CTA buttons ---------- */
.hsm-cta-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 4px;
}

.hsm-cta-wrap .tf-product-total-quantity {
	margin: 0;
}

.hsm-cta-wrap .group-btn {
	display: flex;
	align-items: stretch;
	gap: 12px;
	width: 100%;
}

.hsm-cta-wrap .quantity {
	flex: 0 0 110px;
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--hsm-border);
	border-radius: 999px;
	padding: 0 6px;
	height: 48px;
}
.hsm-cta-wrap .quantity .qty {
	flex: 1;
	border: 0;
	background: transparent;
	text-align: center;
	font-size: 15px;
	font-weight: 500;
	color: var(--hsm-text);
	height: 100%;
	min-width: 0;
}
.hsm-cta-wrap .quantity .qty:focus {
	outline: none;
}
.hsm-cta-wrap .quantity .btn-quantity {
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	font-size: 18px;
	color: var(--hsm-text);
	cursor: pointer;
}

.hsm-cta-wrap .btn-add-to-cart,
.hsm-cta-wrap .single_add_to_cart_button {
	flex: 1;
	height: 48px;
	border-radius: 999px;
	background: #fff;
	color: var(--hsm-text);
	border: 1px solid var(--hsm-border);
	font-size: 15px;
	font-weight: 500;
	transition: all 0.2s ease;
}
.hsm-cta-wrap .btn-add-to-cart:hover,
.hsm-cta-wrap .single_add_to_cart_button:hover {
	background: var(--hsm-primary-soft);
	border-color: var(--hsm-primary);
	color: var(--hsm-primary);
}

.hsm-cta-wrap .btn-buy-now,
.hsm-cta-wrap .hsm-buy-now {
	height: 48px;
	width: 100%;
	border-radius: 999px;
	background: var(--hsm-primary);
	color: #fff;
	border: 0;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background 0.2s ease;
}
.hsm-cta-wrap .btn-buy-now:hover,
.hsm-cta-wrap .hsm-buy-now:hover {
	background: #d54a1f;
	color: #fff;
}

/* ---------- Tabs (商品介紹 / 規格說明 / 運送方式 / 用戶評價) ---------- */
.hsm-product-page .wc-tabs-wrapper .wc-tabs,
.hsm-product-page .tf-product-tabs .tabs {
	display: flex;
	justify-content: center;
	gap: 0;
	border-bottom: 1px solid var(--hsm-border);
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}
.hsm-product-page .wc-tabs-wrapper .wc-tabs li,
.hsm-product-page .tf-product-tabs .tabs li {
	flex: 1;
	text-align: center;
	margin: 0;
}
.hsm-product-page .wc-tabs-wrapper .wc-tabs li a,
.hsm-product-page .tf-product-tabs .tabs li a {
	display: block;
	padding: 14px 0;
	font-size: 15px;
	color: var(--hsm-muted);
	border-bottom: 2px solid transparent;
	text-decoration: none;
}
.hsm-product-page .wc-tabs-wrapper .wc-tabs li.active a,
.hsm-product-page .wc-tabs-wrapper .wc-tabs li a.active,
.hsm-product-page .tf-product-tabs .tabs li.active a {
	color: var(--hsm-primary);
	border-bottom-color: var(--hsm-primary);
	font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
	.hsm-product-info {
		padding: 16px 0;
	}
	.hsm-product-info .product-info-name {
		font-size: 20px;
	}
	.hsm-price-row .price ins,
	.hsm-price-row .price > .amount,
	.hsm-price-row .price-new {
		font-size: 24px;
	}
}

@media (max-width: 575.98px) {
	.hsm-cta-wrap .group-btn {
		flex-wrap: wrap;
	}
	.hsm-cta-wrap .quantity {
		flex: 0 0 100%;
		justify-content: space-between;
	}
	.hsm-cta-wrap .btn-add-to-cart,
	.hsm-cta-wrap .single_add_to_cart_button {
		flex: 1 1 100%;
	}
}

/* ============================================================
   Post-info area: tabs · product story · Suitable For You · related
   ============================================================ */

/* ---------- Tab bar ---------- */
/* Tab BAR spans wide; tab CONTENT is the narrow column. */
.hsm-product-page .tab-single-product {
	margin: 24px auto 0;
	padding: 0;
	width: 100%;
}
.hsm-product-page .tab-single-product > div,
.hsm-product-page .tab-single-product .flat-animate-tab {
	width: 100%;
}
.hsm-product-page .tab-single-product .menu-tab {
	display: flex;
	gap: 0;
	padding: 0;
	margin: 0 auto 36px;
	width: 80%;
	max-width: 1280px;
	border-bottom: 1px solid var(--hsm-border);
	list-style: none;
	justify-content: center;
	/* kill the theme's `.tab-product-desc .menu-tab { overflow: auto }` which
	   leaks a vertical scrollbar on the right edge */
	overflow: visible;
}
.hsm-product-page .tab-single-product .menu-tab li {
	flex: 1;
	text-align: center;
	margin: 0;
}
.hsm-product-page .tab-single-product .menu-tab .tab-link {
	display: block;
	padding: 14px 0;
	font-size: 15px;
	color: var(--hsm-muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color 0.2s ease, border-color 0.2s ease;
}
.hsm-product-page .tab-single-product .menu-tab .tab-link:hover {
	color: var(--hsm-primary);
}
.hsm-product-page .tab-single-product .menu-tab .tab-link.active {
	color: var(--hsm-primary);
	border-bottom-color: var(--hsm-primary);
	font-weight: 500;
}

.hsm-product-page .tab-single-product .tab-content {
	max-width: 820px;
	width: 100%;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
}

/* ---------- Product story (the description tab content) ---------- */
.hsm-product-page .woocommerce-Tabs-panel,
.hsm-product-page .tab-single-product .tab-pane {
	padding: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.hsm-product-page .woocommerce-Tabs-panel > *,
.hsm-product-page .tab-single-product .tab-pane > * {
	max-width: 100%;
}

.hsm-product-story {
	display: block;
	margin: 0 auto;
}

.hsm-product-story img,
.hsm-product-page .woocommerce-Tabs-panel img,
.hsm-product-page .tab-single-product .tab-pane img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(17, 24, 39, 0.08);
}

/* YouTube / video embeds */
.hsm-product-page .tab-single-product .tab-pane iframe,
.hsm-product-page .tab-single-product .tab-pane video,
.hsm-product-page .tab-single-product .tab-pane .wp-block-embed,
.hsm-product-page .tab-single-product .tab-pane .wp-video {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0 auto 24px;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(17, 24, 39, 0.08);
}
.hsm-product-page .tab-single-product .tab-pane .wp-block-embed__wrapper {
	border-radius: 16px;
	overflow: hidden;
}
.hsm-product-page .tab-single-product .tab-pane p {
	text-align: center;
	line-height: 1.85;
}

/* ---------- Section title (誰需要…) ---------- */
/* Available on any HSM page; scoped to its own class so works in description tab. */
.hsm-section-heading {
	text-align: center;
	margin: 64px auto 32px;
	max-width: 820px;
}
.hsm-section-heading::before {
	content: "";
	display: block;
	width: 40px;
	height: 2px;
	background: var(--hsm-primary);
	margin: 0 auto 18px;
}
.hsm-section-heading h2,
.hsm-section-heading .hsm-section-title {
	font-size: 26px;
	font-weight: 600;
	color: var(--hsm-primary);
	margin: 0 0 6px;
	letter-spacing: 0.04em;
}
.hsm-section-heading .hsm-section-subtitle {
	font-size: 14px;
	color: var(--hsm-muted);
	letter-spacing: 0.16em;
	text-transform: none;
	margin: 0;
}

/* ---------- Suitable For You: tilted polaroid grid ---------- */
.hsm-suitable-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 36px;
	max-width: 760px;
	margin: 0 auto;
	padding: 8px 0 56px;
}

.hsm-suitable-card {
	background: #fff;
	padding: 14px 14px 18px;
	box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
	position: relative;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hsm-suitable-card:hover {
	transform: translateY(-4px) rotate(0deg) !important;
	box-shadow: 0 20px 40px rgba(17, 24, 39, 0.18);
	z-index: 2;
}
.hsm-suitable-card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.hsm-suitable-card .hsm-suitable-caption {
	display: block;
	margin: 14px 4px 0;
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
	letter-spacing: 0.04em;
}
.hsm-suitable-card .hsm-suitable-caption .accent {
	color: var(--hsm-primary);
}

/* Tilt offsets — applied via nth-child for the scattered look. */
.hsm-suitable-card:nth-child(1) { transform: rotate(-3deg); }
.hsm-suitable-card:nth-child(2) { transform: rotate(2deg) translateY(20px); }
.hsm-suitable-card:nth-child(3) { transform: rotate(-2deg) translateY(20px); }
.hsm-suitable-card:nth-child(4) { transform: rotate(3deg) translateY(40px); }
.hsm-suitable-card:nth-child(5) {
	grid-column: 1 / -1;
	max-width: 360px;
	margin: 24px auto 0;
	transform: rotate(-2deg);
}

/* Optional note at top of section (e.g. "*孕婦…請先諮詢醫師") */
.hsm-suitable-note {
	display: block;
	text-align: right;
	font-size: 12px;
	color: var(--hsm-muted);
	margin: 0 0 18px;
}

/* Related / Up-sells / Cross-sells / Recently Viewed all use the
   .hsm-top-sellers + .hsm-product-card markup, which is styled in
   hsm-homepage.css. No extra rules needed here. */

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
	.hsm-product-page .tab-single-product .menu-tab {
		width: 100%;
		padding: 0 16px;
		box-sizing: border-box;
	}
	.hsm-product-page .tab-single-product .menu-tab .tab-link {
		font-size: 14px;
		padding: 12px 0;
	}
	.hsm-section-heading {
		margin: 48px 0 24px;
	}
	.hsm-section-heading h2,
	.hsm-section-heading .hsm-section-title {
		font-size: 22px;
	}
	.hsm-suitable-grid {
		gap: 18px 18px;
		padding-bottom: 32px;
	}
	.hsm-suitable-card {
		padding: 10px 10px 14px;
	}
	.hsm-suitable-card .hsm-suitable-caption {
		font-size: 14px;
		margin-top: 10px;
	}
	.hsm-suitable-card:nth-child(5) {
		max-width: 280px;
		margin-top: 12px;
	}
}
