/*
 * 30-components.css — thanh phan dung chung: khung, nhip khoi, tieu de khoi, he nut, form, thanh CTA di dong.
 * Mot thanh phan = mot hop dong bo goc/chieu cao (xem 00-tokens.css). Khong `transition: all`.
 */

/* ---------- KHUNG + NHIP KHOI ---------- */
.bc-wrap {
	box-sizing: border-box;
	max-width: calc(var(--bc-container) + 2 * var(--bc-gutter));
	margin-inline: auto;
	padding-inline: var(--bc-gutter);
}

/* !important duy nhat cho nhip khoi: Flatsome [section] luon in inline
   `#section_NNN{padding-top:30px;padding-bottom:30px}` (specificity ID thang moi rule class). */
.bc-sec {
	padding-top: var(--sec-pt) !important;
	padding-bottom: var(--sec-pb) !important;
	overflow-x: clip;
}

.bc-sec--soft {
	background: var(--bc-surface-soft);
}

.bc-anchor {
	display: block;
	height: 0;
	scroll-margin-top: 120px;
}

/* ---------- TIEU DE KHOI ---------- */
.bc-eyebrow {
	display: block;
	margin: 0 0 var(--s-1);
	font-size: var(--fs-micro);
	line-height: 16px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bc-gold-700);
}

.bc-sec-head {
	margin: 0 0 var(--s-6);
}

.bc-sec-title {
	margin: 0;
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
}

.bc-sec-sub {
	margin: var(--s-1) 0 0;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--bc-muted);
}

@media (min-width: 850px) {
	.bc-sec-head {
		margin-bottom: var(--s-8);
	}
}

/* ---------- NUT: PRIMARY / SECONDARY — cao 44, bo goc 12 (kieu link chu: .bc-news-more, .bc-pdp-stock a) ---------- */
.bc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--s-2);
	box-sizing: border-box;
	min-height: 44px;
	margin: 0;
	padding: 0 var(--s-6);
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	font-family: var(--bc-font);
	font-size: 15px;
	line-height: 20px;
	font-weight: 600;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform 120ms var(--ease);
}

.bc-btn:active {
	transform: translateY(1px);
}

.bc-btn svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.bc-btn--primary {
	background: var(--bc-green-900);
	color: var(--bc-white);
}

.bc-btn--primary:hover {
	background: color-mix(in srgb, var(--bc-green-900) 86%, black);
	color: var(--bc-white);
}

.bc-btn--secondary {
	border-color: var(--bc-green-700);
	background: var(--bc-white);
	color: var(--bc-green-900);
}

.bc-btn--secondary:hover {
	background: var(--bc-green-100);
	color: var(--bc-green-900);
}

.bc-btn[disabled],
.bc-btn[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---------- FORM (Contact Form 7) — o nhap cao 48, bo goc 12 ---------- */
.bc-form .wpcf7-form p {
	margin: 0 0 var(--s-4);
}

.bc-form .wpcf7-form p:last-of-type {
	margin-bottom: 0;
}

.bc-form label {
	display: block;
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: var(--bc-ink);
}

.bc-form .wpcf7-form-control-wrap {
	display: block;
	margin-top: var(--s-2);
}

.bc-form input[type="text"],
.bc-form input[type="tel"],
.bc-form input[type="email"],
.bc-form textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px var(--s-4);
	border: 1px solid var(--bc-line-strong);
	border-radius: var(--radius-sm);
	background: var(--bc-white);
	box-shadow: none;
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
	color: var(--bc-ink);
	transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.bc-form textarea {
	min-height: 120px;
	resize: vertical;
}

.bc-form input:focus,
.bc-form textarea:focus {
	border-color: var(--bc-green-700);
	box-shadow: var(--shadow-ring);
	outline: 0;
}

.bc-form .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 0 var(--s-6);
	border: 0;
	border-radius: var(--radius-sm);
	background: var(--bc-green-900);
	color: var(--bc-white);
	font-size: 15px;
	line-height: 20px;
	font-weight: 600;
	text-transform: none;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease);
}

.bc-form .wpcf7-submit:hover {
	background: color-mix(in srgb, var(--bc-green-900) 86%, black);
}

.bc-form .wpcf7-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.bc-form .wpcf7-not-valid-tip {
	margin-top: var(--s-1);
	font-size: var(--fs-small);
	line-height: 18px;
	color: var(--bc-danger);
}

.bc-form .wpcf7-not-valid {
	border-color: var(--bc-danger);
}

.bc-form .wpcf7-response-output {
	margin: var(--s-4) 0 0;
	padding: var(--s-3) var(--s-4);
	border-radius: var(--radius-sm);
	font-size: 14px;
	line-height: 20px;
}

@media (min-width: 850px) {
	.bc-form .wpcf7-submit {
		width: auto;
		min-width: 220px;
	}
}

/* ---------- THANH CTA DI DONG (chi trang san pham; khong FAB, khong che noi dung) ---------- */
.bc-sticky-cta {
	display: none;
}

@media (max-width: 849px) {
	.bc-sticky-cta {
		position: fixed;
		z-index: 90;
		right: 0;
		bottom: 0;
		left: 0;
		display: flex;
		align-items: center;
		gap: var(--s-3);
		box-sizing: border-box;
		padding: var(--s-2) var(--s-4) calc(var(--s-2) + env(safe-area-inset-bottom));
		border-top: 1px solid var(--bc-line);
		background: var(--bc-white);
	}

	.bc-sticky-cta .bc-sticky-price {
		flex: 1 1 auto;
		min-width: 0;
		font-size: 15px;
		line-height: 20px;
		font-weight: 700;
		color: var(--bc-green-900);
	}

	.bc-sticky-cta .bc-sticky-price small {
		display: block;
		font-size: var(--fs-micro);
		line-height: 16px;
		font-weight: 400;
		color: var(--bc-muted);
	}

	.bc-sticky-cta .bc-btn {
		flex: 0 0 auto;
	}

	body:has(.bc-sticky-cta) {
		padding-bottom: calc(60px + env(safe-area-inset-bottom));
	}
}

/* ---------- NUT LIEN HE NHANH: Goi + Zalo (moi trang) ----------
   <1300: thanh dinh day 2 nut (khong che noi dung vi body chua cho; tren trang san pham di dong thay bang thanh CTA co nut Zalo).
   >=1300: hai nut tron o le phai (khung noi dung 1200 de du le), khong de len the san pham. */
.bc-quick {
	position: fixed;
	z-index: 90;
	right: 0;
	bottom: 0;
	left: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--s-3);
	box-sizing: border-box;
	padding: var(--s-2) var(--s-4) calc(var(--s-2) + env(safe-area-inset-bottom));
	border-top: 1px solid var(--bc-line);
	background: var(--bc-white);
}

body:has(.bc-quick) {
	padding-bottom: calc(60px + env(safe-area-inset-bottom));
}

.bc-sticky-cta .bc-sticky-zalo {
	flex: 0 0 44px;
	width: 44px;
	padding: 0;
}

@media (max-width: 849px) {
	body:has(.bc-sticky-cta) .bc-quick {
		display: none;
	}
}

/* Nut "len dau trang" cua Flatsome: tranh de len thanh / cum nut lien he. */
@container vp (max-width: 1299px) {
	html body #top-link {
		bottom: 84px;
	}
}

@container vp (min-width: 1300px) {
	.bc-quick {
		right: var(--s-6);
		bottom: var(--s-6);
		left: auto;
		display: flex;
		flex-direction: column;
		gap: var(--s-3);
		padding: 0;
		border: 0;
		background: transparent;
	}

	body:has(.bc-quick) {
		padding-bottom: 0;
	}

	.bc-quick .bc-btn {
		width: 52px;
		min-height: 52px;
		height: 52px;
		padding: 0;
		border-radius: var(--radius-pill);
		box-shadow: var(--shadow-hover);
	}

	.bc-quick .bc-btn svg {
		width: 24px;
		height: 24px;
	}

	.bc-quick .bc-btn span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	html body #top-link {
		right: var(--s-6);
		bottom: 164px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bc-btn,
	.bc-form input,
	.bc-form textarea,
	.bc-form .wpcf7-submit {
		transition: none;
	}
}
