/*
 * Trang chủ. Chỉ nạp ở front page.
 */

/* --- Hero ----------------------------------------------------------------- */

.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(420px, 60vh, 620px);
	background: var(--bk-sand);
	color: var(--bk-cocoa);
	overflow: hidden;
}

.hero__media {
	position: absolute;
	inset: 0;
}

.hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Lớp phủ để chữ luôn đọc được dù ảnh sáng hay tối. Gradient thay vì màu
   phẳng để phần ảnh bên phải không bị đục. */
.hero--has-image .hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgb(28 18 13 / 78%) 0%, rgb(28 18 13 / 55%) 45%, rgb(28 18 13 / 15%) 100%);
}

.hero__inner {
	position: relative;
	max-width: 720px;
	margin-inline: 0;
	padding-block: clamp(3rem, 8vw, 5rem);
	padding-inline: var(--bk-gutter);
}

@media (min-width: 1240px) {
	.hero__inner {
		margin-inline: auto;
		padding-inline: var(--bk-gutter);
		width: 100%;
		max-width: var(--bk-container);
	}

	.hero__inner > * { max-width: 640px; }
}

.hero--has-image .hero__inner,
.hero--has-image .hero__title,
.hero--has-image .hero__eyebrow { color: #fff; }

.hero__eyebrow {
	margin: 0 0 0.75rem;
	color: var(--bk-gold);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.hero--has-image .hero__eyebrow { color: var(--bk-gold-soft); }

.hero__title {
	margin: 0 0 1rem;
	font-size: clamp(2rem, 6.5vw, 3.5rem);
	line-height: 1.1;
}

.hero__text {
	max-width: 46ch;
	font-size: clamp(1rem, 2.2vw, 1.125rem);
	opacity: 0.92;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

.hero--has-image .button--ghost {
	border-color: rgb(255 255 255 / 65%);
	color: #fff;
}

.hero--has-image .button--ghost:hover {
	background: #fff;
	color: var(--bk-cocoa);
}

/* --- Hero: biến thể markup ------------------------------------------------
   Ba khối dưới đây ăn theo template-parts/home/hero-{split,editorial,poster}.php
   — skin chọn bằng khoá "parts". Chúng KHÔNG phải biến thể CSS của hero mặc
   định: DOM khác nhau thật, nên phần lớn việc ở đây là hoàn nguyên những quy
   tắc mà hero mặc định bật lên cho trường hợp "ảnh làm nền". */

/* Split: ảnh nằm CẠNH chữ, trong luồng. Không có lớp phủ tối, nên phải trả chữ
   về màu trên nền sáng — nếu quên, chữ trắng nằm trên nền kem và mất hút. */
.hero--split .hero__grid {
	display: grid;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
	width: 100%;
	padding-block: clamp(2.5rem, 7vw, 4.5rem);
	padding-inline: var(--bk-gutter);
	margin-inline: auto;
	max-width: var(--bk-container);
}

@media (min-width: 900px) {
	.hero--split .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.hero--split .hero__figure { margin: 0; }

.hero--split .hero__image {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--bk-radius-lg);
}

.hero--split.hero--has-image .hero__title,
.hero--editorial.hero--has-image .hero__title { color: var(--bk-cocoa); }

.hero--split.hero--has-image .hero__eyebrow,
.hero--editorial.hero--has-image .hero__eyebrow { color: var(--bk-gold); }

.hero--split.hero--has-image .button--ghost,
.hero--editorial.hero--has-image .button--ghost {
	border-color: var(--bk-line);
	color: var(--bk-cocoa);
}

.hero--split.hero--has-image .button--ghost:hover,
.hero--editorial.hero--has-image .button--ghost:hover {
	background: var(--bk-cocoa);
	color: var(--bk-cream);
}

/* Editorial: bìa tạp chí — ảnh khổ DỌC, tiêu đề lớn, một đường kẻ ngăn tiêu đề
   với phần dẫn. Nền kem thay vì sand để giống trang giấy. */
.hero--editorial { background: var(--bk-cream); }

.hero--editorial .hero__editorial {
	display: grid;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: center;
	width: 100%;
	padding-block: clamp(2.5rem, 7vw, 5rem);
	padding-inline: var(--bk-gutter);
	margin-inline: auto;
	max-width: var(--bk-container);
}

@media (min-width: 900px) {
	.hero--editorial .hero__editorial { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}

.hero--editorial .hero__title { font-size: clamp(2.25rem, 7vw, 4.25rem); }

.hero--editorial .hero__rule {
	width: clamp(56px, 12vw, 120px);
	height: 2px;
	margin: 1.25rem 0 1.5rem;
	background: var(--bk-gold);
}

.hero--editorial .hero__portrait { margin: 0; }

.hero--editorial .hero__image {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: var(--bk-radius);
}

/* Poster: ảnh tràn khung, chữ căn đáy. Gradient riêng đậm dần từ dưới lên —
   tắt lớp phủ đều của hero mặc định để hai lớp không chồng nhau thành đục. */
.hero--poster {
	align-items: flex-end;
	min-height: clamp(480px, 74vh, 760px);
}

.hero--poster .hero__media::after { display: none; }

.hero--poster .hero__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(12 10 8 / 88%) 0%, rgb(12 10 8 / 55%) 38%, rgb(12 10 8 / 0%) 78%);
}

.hero--poster .hero__inner--bottom {
	padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem);
}

.hero--poster .hero__title { font-size: clamp(2.25rem, 8vw, 4.5rem); }

/* --- Dải cam kết ---------------------------------------------------------- */

.section--usps { padding-block: clamp(1.75rem, 4vw, 2.75rem); }

.usp-strip {
	display: grid;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.usp {
	display: flex;
	gap: 0.875rem;
	align-items: flex-start;
}

.usp__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: var(--bk-radius);
	background: var(--bk-gold-soft);
	color: var(--bk-gold);
}

.usp__body { min-width: 0; }

.usp__title {
	margin: 0 0 0.25rem;
	font-weight: 600;
}

.usp__text {
	margin: 0;
	color: var(--bk-cocoa-soft);
	font-size: 0.9375rem;
}

/* --- Danh mục ------------------------------------------------------------- */

.category-grid {
	display: grid;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
	.category-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
	.category-grid { grid-template-columns: repeat(4, 1fr); }
}

.category-card a {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding: 1.25rem 0.75rem;
	background: var(--bk-surface);
	border: 1px solid var(--bk-line);
	border-radius: var(--bk-radius-lg);
	color: var(--bk-cocoa);
	text-align: center;
	text-decoration: none;
	transition: border-color 0.2s var(--bk-ease), transform 0.2s var(--bk-ease), box-shadow 0.2s var(--bk-ease);
}

.category-card a:hover {
	border-color: var(--bk-gold);
	box-shadow: var(--bk-shadow);
	transform: translateY(-2px);
}

/* Ghim theo mùa (xem template-parts/home/categories.php) — dùng var(--bk-gold)
   nên tự đổi màu theo mùa đang chạy, không cần hardcode màu riêng. */
.category-card--seasonal a { position: relative; border-color: var(--bk-gold); }

.category-card__badge {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 2;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	background: var(--bk-gold);
	color: var(--bk-cream);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.category-card__media {
	display: block;
	width: clamp(72px, 18vw, 104px);
	aspect-ratio: 1;
	margin-bottom: 0.75rem;
	overflow: hidden;
	border-radius: 50%;
	background: var(--bk-sand);
}

.category-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.category-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--bk-sand), var(--bk-gold-soft));
}

.category-card__name {
	font-family: var(--bk-font-display);
	font-size: 1rem;
	font-weight: 600;
}

.category-card__count {
	color: var(--bk-cocoa-soft);
	font-size: 0.75rem;
}

/* --- Giới thiệu ----------------------------------------------------------- */

.about {
	display: grid;
	gap: 2rem;
	align-items: center;
}

@media (min-width: 900px) {
	.about { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.about__media img {
	width: 100%;
	border-radius: var(--bk-radius-lg);
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.about__title { font-size: clamp(1.5rem, 4vw, 2.25rem); }

.about__text {
	max-width: 52ch;
	color: var(--bk-cocoa-soft);
}

/* --- CTA ------------------------------------------------------------------ */

.cta {
	background: var(--bk-cocoa);
	color: var(--bk-cream);
}

.cta__inner {
	max-width: 640px;
	margin-inline: auto;
	text-align: center;
}

.cta__title {
	color: var(--bk-cream);
	font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.cta__text {
	color: var(--bk-gold-soft);
	opacity: 0.9;
}

.cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.cta .button--ghost {
	border-color: rgb(255 255 255 / 55%);
	color: var(--bk-cream);
}

.cta .button--ghost:hover {
	background: var(--bk-cream);
	color: var(--bk-cocoa);
}
