/* ============ Chi tiet san pham ============ */

.cgt-pd { padding-top: 34px; padding-bottom: 20px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: start; }

/* ---- Gallery ---- */
.cgt-pd__main {
	position: relative;
	border: 1px solid var(--cgt-border);
	border-radius: var(--cgt-r-lg);
	overflow: hidden;
	background: var(--cgt-input-bg);
	aspect-ratio: 1.22 / 1;
}
.cgt-pd__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cgt-pd__sale { position: absolute; top: 14px; left: 14px; z-index: 2; font-size: 13px; padding: 4px 11px; }
.cgt-pd__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.cgt-pd__thumb {
	display: block; width: 100%; aspect-ratio: 1.35 / 1;
	border: 1.5px solid var(--cgt-border); border-radius: 12px;
	overflow: hidden; background: var(--cgt-input-bg); padding: 0;
	transition: border-color .16s;
}
.cgt-pd__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cgt-pd__thumb.is-active, .cgt-pd__thumb:hover { border-color: var(--cgt-primary); }

/* ---- Info ---- */
.cgt-pd__cat { font-size: 13px; color: var(--cgt-lime-2); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.cgt-pd__name { font-family: var(--cgt-font-display); font-weight: 800; font-size: 34px; line-height: 1.12; color: var(--cgt-heading); margin: 0 0 14px; }
.cgt-pd__prices { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.cgt-pd__price { font-family: var(--cgt-font-display); font-weight: 800; font-size: 34px; color: var(--cgt-red); }
.cgt-pd__old { font-size: 18px; color: #B3BEAD; text-decoration: line-through; }
.cgt-pd__unit { font-size: 13px; color: var(--cgt-muted); }
.cgt-pd__excerpt { font-size: 15px; line-height: 1.7; color: var(--cgt-body-2); margin: 0 0 22px; }
.cgt-pd__specs {
	display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px;
	padding: 18px 20px; background: var(--cgt-tint); border-radius: 14px; margin-bottom: 24px;
}
.cgt-pd__specs > div { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--cgt-body-3); }
.cgt-pd__specs span { color: var(--cgt-muted); }
.cgt-pd__specs strong { font-weight: 700; }

/* Buy row */
.cgt-pd__buyrow { display: flex; align-items: stretch; gap: 14px; margin-bottom: 18px; }
.cgt-pd__qty { border-radius: 11px; }
.cgt-pd__qty button { width: 42px; height: 48px; font-size: 20px; }
.cgt-pd__qty input { width: 52px; font-family: var(--cgt-font-display); font-size: 17px; }
.cgt-pd__add {
	flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px;
	height: 48px;
	border: 1.5px solid var(--cgt-primary); color: var(--cgt-primary); background: #fff;
	border-radius: 11px;
	font-family: var(--cgt-font-display); font-weight: 700; font-size: 15px;
	transition: all .18s;
}
.cgt-pd__add:hover { background: var(--cgt-tint-3); }
.cgt-pd__buynow {
	width: 100%; height: 52px;
	background: var(--cgt-primary); color: #fff;
	border: none; border-radius: 12px;
	font-family: var(--cgt-font-display); font-weight: 700; font-size: 16px;
	box-shadow: 0 12px 24px rgba(46, 125, 50, .28);
	transition: background .18s;
	margin-bottom: 24px;
}
.cgt-pd__buynow:hover { background: var(--cgt-primary-dark); }
.cgt-pd__buynow.loading, .cgt-pd__add.loading { opacity: .6; pointer-events: none; }
.cgt-pd__oos { padding: 16px 18px; border-radius: 12px; background: #FBF0D6; color: #9A6A00; font-size: 14.5px; margin-bottom: 24px; }
.cgt-pd__oos a { font-weight: 700; text-decoration: underline; }
.cgt-pd__badges { display: flex; gap: 22px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--cgt-border-3); }
.cgt-pd__badges > div { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--cgt-body-2); }

/* ---- Mo ta + care box ---- */
.cgt-pd__desc { padding-top: 26px; padding-bottom: 20px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.cgt-pd__h2 { font-family: var(--cgt-font-display); font-weight: 800; font-size: 22px; color: var(--cgt-heading); margin: 0 0 14px; padding-bottom: 12px; border-bottom: 2px solid var(--cgt-tint-3); }
.cgt-pd__content { font-size: 15px; line-height: 1.8; color: var(--cgt-body-2); }
.cgt-pd__content p { margin: 0 0 14px; }
.cgt-pd__content h2 { font-family: var(--cgt-font-display); font-weight: 700; font-size: 18px; color: var(--cgt-heading); margin: 22px 0 10px; }
.cgt-pd__care { background: var(--cgt-tint); border-radius: var(--cgt-r-card); padding: 24px 26px; }
.cgt-pd__care h2 { font-family: var(--cgt-font-display); font-weight: 800; font-size: 20px; color: var(--cgt-heading); margin: 0 0 16px; }
.cgt-pd__steps { display: flex; flex-direction: column; gap: 14px; }
.cgt-pd__step { display: flex; gap: 13px; }
.cgt-pd__stepnum {
	width: 26px; height: 26px; border-radius: 50%;
	background: var(--cgt-primary); color: #fff;
	font-family: var(--cgt-font-display); font-weight: 700; font-size: 13px;
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cgt-pd__steptitle { font-weight: 700; font-size: 14px; color: var(--cgt-ink); margin-bottom: 2px; }
.cgt-pd__stepdesc { font-size: 13px; line-height: 1.6; color: #6B7A6D; }

/* ---- Lien quan ---- */
.cgt-pd__related { padding-top: 34px; }
.cgt-pd__relhead { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.cgt-pd__relhead h2 { font-family: var(--cgt-font-display); font-weight: 800; font-size: 24px; color: var(--cgt-heading); margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.cgt-pd { grid-template-columns: 1fr; gap: 28px; }
	.cgt-pd__desc { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
	.cgt-pd__name { font-size: 26px; }
	.cgt-pd__price { font-size: 28px; }
	.cgt-pd__specs { grid-template-columns: 1fr; }
	/* Mobile: san pham lien quan thanh slide vuot ngang (cung pattern cam nang trang chu) */
	.cgt-pd__related .cgt-pgrid--5 {
		display: flex;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		/* snap tinh theo snapport, KHONG tinh padding -> phai khai scroll-padding rieng */
		scroll-padding-left: 24px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		margin: 0 -24px;
		padding: 0 24px 8px;
	}
	.cgt-pd__related .cgt-pgrid--5::-webkit-scrollbar { display: none; }
	.cgt-pd__related .cgt-pgrid--5 > * {
		flex: 0 0 62%;
		scroll-snap-align: start;
	}
}
