/**
 * Nhà gỗ Đức Cận – trang chủ, thẻ, trang chi tiết, danh sách (mobile-first).
 * Dùng biến khai báo trong main.css.
 */

/* ===== 1. Nền section ===== */
.section--alt {
	background: var(--c-paper-dark);
}

.section--wood {
	background: var(--c-wood-dark) var(--hoi-van) repeat-x top / auto 12px;
	color: var(--c-paper);
}

.section--wood .section-title__heading,
.section--wood h3 {
	color: var(--c-gold-light);
}

.section--wood .section-title__sub {
	color: var(--c-paper-dark);
}

.section__more {
	margin: 32px 0 0;
	text-align: center;
}

.btn--zalo {
	background: var(--c-zalo);
	color: var(--c-white);
}

.btn--zalo:hover {
	background: #0055d4;
	color: var(--c-white);
}

.btn-row--stack {
	flex-direction: column;
}

.btn-row--stack .btn {
	width: 100%;
}

/* ===== 2. Slider đầu trang ===== */
.hero {
	position: relative;
	background: var(--c-wood-dark);
}

.hero .swiper {
	position: relative;
	overflow: hidden;
}

.hero__slide {
	position: relative;
	aspect-ratio: 4 / 5;
	max-height: calc(100svh - var(--header-h) - var(--mobile-bar-h));
	min-height: 420px;
	overflow: hidden;
}

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

.hero__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding-bottom: 56px;
	background: linear-gradient(to top, rgba(30, 18, 8, .88) 0%, rgba(30, 18, 8, .45) 45%, rgba(30, 18, 8, 0) 75%);
}

.hero__content {
	color: var(--c-white);
}

.hero__title {
	max-width: 760px;
	margin: 0 0 12px;
	font: 700 1.9rem/1.25 var(--f-heading);
	color: var(--c-white);
	text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.hero__desc {
	max-width: 620px;
	font-size: 1.05rem;
	color: var(--c-paper);
}

.hero__nav {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	padding: 0;
	color: var(--c-white);
	background: rgba(0, 0, 0, .35);
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 50%;
	cursor: pointer;
}

.hero__nav:hover {
	background: var(--c-red);
}

.hero__nav--prev { left: 16px; }
.hero__nav--next { right: 16px; }

.hero__dots,
.reviews__dots {
	display: flex;
	justify-content: center;
	gap: 4px;
}

.hero__dots {
	position: absolute;
	right: 0;
	bottom: 16px;
	left: 0;
	z-index: 5;
}

.hero__dots .swiper-pagination-bullet,
.reviews__dots .swiper-pagination-bullet {
	width: 12px;
	height: 12px;
	margin: 0 4px;
	background: var(--c-white);
	opacity: .55;
}

.hero__dots .swiper-pagination-bullet-active {
	background: var(--c-gold);
	opacity: 1;
}

/* Trước khi Swiper chạy (hoặc JS tắt): chỉ hiện slide đầu. */
.js-hero:not(.swiper-initialized) .swiper-slide:not(:first-child) {
	display: none;
}

/* ===== 3. Giới thiệu & điểm mạnh ===== */
.intro__text {
	margin-bottom: 32px;
	font-size: 1.1rem;
	text-align: center;
}

.features {
	display: grid;
	gap: 16px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.features__item {
	padding: 22px 20px;
	background: var(--c-white);
	border-top: 3px solid var(--c-gold);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.features__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 10px;
	color: var(--c-red);
	background: var(--c-paper);
	border-radius: 50%;
}

.features__icon .icon {
	width: 28px;
	height: 28px;
}

.features__title {
	margin-bottom: 6px;
	font-size: 1.15rem;
}

.features__item p {
	margin: 0;
	color: var(--c-muted);
}

/* ===== 4. Thẻ ===== */
.card-grid {
	display: grid;
	gap: 20px;
}

.card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--c-white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition: transform .2s, box-shadow .2s;
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(43, 33, 24, .18);
}

.card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--c-paper-dark);
}

.card__media img,
.card__noimg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	font-size: .85rem;
	font-weight: 700;
	color: var(--c-white);
	background: var(--c-red);
	border-radius: 6px;
}

.card__badge--gold {
	color: var(--c-text);
	background: var(--c-gold);
}

.card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 16px 18px 18px;
}

.card__title {
	margin-bottom: 8px;
	font-size: 1.15rem;
}

.card__title a {
	color: inherit;
	text-decoration: none;
}

.card__title a:hover {
	color: var(--c-red);
}

.card__meta {
	display: grid;
	gap: 4px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
	font-size: .92rem;
	color: var(--c-muted);
}

.card__meta li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.card__meta .icon {
	margin-top: .2em;
	width: 1.05em;
	height: 1.05em;
	color: var(--c-wood);
}

.card__price {
	margin: auto 0 8px;
	font: 700 1.2rem/1.3 var(--f-heading);
	color: var(--c-red);
}

.card__date {
	margin: 0 0 4px;
	font-size: .85rem;
	color: var(--c-muted);
}

.card__excerpt {
	color: var(--c-muted);
}

.card__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
}

.card__price + .card__more {
	margin-top: 0;
}

.card__more .icon {
	width: 1em;
	height: 1em;
	transition: transform .2s;
}

.card__more:hover .icon {
	transform: translateX(3px);
}

/* ===== 5. Quy trình ===== */
.steps {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: step;
}

.steps__item {
	position: relative;
	padding: 18px 18px 18px 76px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(201, 162, 39, .35);
	border-radius: var(--radius);
	counter-increment: step;
}

.steps__item::before {
	content: counter(step);
	position: absolute;
	top: 18px;
	left: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	font: 700 1.2rem/1 var(--f-heading);
	color: var(--c-text);
	background: var(--c-gold);
	border-radius: 50%;
}

.steps__title {
	margin-bottom: 4px;
	font-size: 1.1rem;
}

.steps__item p {
	margin: 0;
	color: var(--c-paper-dark);
}

/* ===== 6. Đánh giá ===== */
.reviews {
	position: relative;
	overflow: hidden;
	padding-bottom: 36px;
}

.reviews .swiper-slide {
	height: auto;
}

.reviews__dots {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
}

.reviews__dots .swiper-pagination-bullet {
	background: var(--c-wood);
}

.reviews__dots .swiper-pagination-bullet-active {
	background: var(--c-red);
	opacity: 1;
}

.js-reviews:not(.swiper-initialized) .swiper-wrapper {
	display: grid;
	gap: 20px;
}

.review {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	padding: 22px 22px 20px;
	background: var(--c-white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.review__stars {
	display: flex;
	gap: 2px;
	margin-bottom: 10px;
	color: var(--c-gold);
}

.review__stars .is-off {
	color: var(--c-paper-dark);
}

.review__text {
	flex: 1;
	margin: 0 0 16px;
	font-size: 1.02rem;
}

.review__text p::before {
	content: "“";
}

.review__text p::after {
	content: "”";
}

.review__author {
	display: flex;
	align-items: center;
	gap: 12px;
}

.review__photo {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
}

.review__photo--initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font: 700 1.3rem/1 var(--f-heading);
	color: var(--c-white);
	background: var(--c-wood);
}

.review__name {
	display: block;
	color: var(--c-wood);
}

.review__role {
	display: block;
	font-size: .88rem;
	color: var(--c-muted);
}

.review-list {
	display: grid;
	gap: 20px;
}

/* ===== 7. Khối nhận báo giá ===== */
.cta-band {
	padding: 48px 0;
	text-align: center;
	color: var(--c-paper);
	background: linear-gradient(135deg, var(--c-red-dark), var(--c-red) 60%, #a32a24);
}

.cta-band__title {
	color: var(--c-white);
}

.cta-band__text {
	max-width: 640px;
	margin: 0 auto 24px;
}

.cta-band .btn--primary {
	color: var(--c-red);
	background: var(--c-white);
}

.cta-band .btn--primary:hover {
	color: var(--c-red-dark);
	background: var(--c-paper);
}

/* ===== 8. Breadcrumb ===== */
.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	font-size: .9rem;
	color: var(--c-muted);
}

.breadcrumb li + li::before {
	content: "›";
	margin-right: 6px;
}

.breadcrumb a {
	color: var(--c-wood);
}

/* ===== 9. Trang chi tiết mẫu nhà / nhà thờ ===== */
.product__header {
	margin-bottom: 24px;
}

.product__code {
	display: inline-block;
	margin: 0 0 8px;
	padding: 2px 10px;
	font-size: .9rem;
	font-weight: 700;
	color: var(--c-white);
	background: var(--c-red);
	border-radius: 6px;
}

.product__title {
	margin-bottom: 8px;
}

.product__summary {
	max-width: 760px;
	font-size: 1.1rem;
	color: var(--c-muted);
}

.product__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--c-muted);
}

.product__facts li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.product__facts-badge {
	font-weight: 600;
	color: #2f6f2f;
}

.product__layout {
	display: grid;
	gap: 24px;
}

.product__section {
	max-width: 900px;
	margin-top: 40px;
}

.entry-content--wide {
	max-width: none;
	margin: 0;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.gallery-grid__item {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	background: var(--c-paper-dark);
}

.gallery-grid__item--main {
	grid-column: 1 / -1;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
}

.gallery-grid__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s;
}

.gallery-grid__item:hover img {
	transform: scale(1.03);
}

.price-box {
	padding: 22px 20px;
	background: var(--c-white);
	border-top: 4px solid var(--c-red);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.price-box__label {
	margin: 0 0 4px;
	font-size: .9rem;
	font-weight: 600;
	color: var(--c-muted);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.price-box__value {
	margin: 0 0 6px;
	font: 700 1.7rem/1.25 var(--f-heading);
	color: var(--c-red);
}

.price-box__note {
	font-size: .88rem;
	color: var(--c-muted);
}

.spec-list {
	margin: 0 0 20px;
}

.spec-list__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--c-paper-dark);
}

.spec-list dt {
	color: var(--c-muted);
}

.spec-list dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.video-embed iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
}

/* ===== 10. Bài viết ===== */
.single-post__header {
	max-width: 820px;
	margin: 0 auto 20px;
}

.single-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--c-muted);
}

.single-post__thumb {
	max-width: 1000px;
	margin: 0 auto 28px;
}

.single-post__thumb img {
	display: block;
	width: 100%;
	border-radius: var(--radius);
}

.single-post .breadcrumb {
	max-width: 820px;
	margin: 0 auto;
}

/* ===== 11. Danh sách & bộ lọc ===== */
.filters {
	margin-bottom: 24px;
	padding: 16px;
	background: var(--c-white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.filters__group + .filters__group {
	margin-top: 12px;
}

.filters__label {
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--c-wood);
}

.filters__list {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0 0 4px;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: thin;
}

.chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	white-space: nowrap;
	color: var(--c-wood);
	text-decoration: none;
	background: var(--c-paper);
	border: 1px solid var(--c-paper-dark);
	border-radius: 999px;
}

.chip:hover {
	color: var(--c-wood);
	border-color: var(--c-wood);
}

.chip.is-active {
	color: var(--c-white);
	background: var(--c-wood);
	border-color: var(--c-wood);
}

.filters__reset {
	margin: 12px 0 0;
}

.archive-list__count {
	color: var(--c-muted);
}

.archive-list__empty {
	padding: 40px 0;
	text-align: center;
	color: var(--c-muted);
}

/* ===== 12. Màn hình lớn hơn ===== */
@media (min-width: 600px) {
	.features,
	.card-grid,
	.review-list {
		grid-template-columns: repeat(2, 1fr);
	}

	.steps {
		grid-template-columns: repeat(2, 1fr);
	}

	.js-reviews:not(.swiper-initialized) .swiper-wrapper {
		grid-template-columns: repeat(2, 1fr);
	}

	.btn-row--stack {
		flex-direction: row;
	}

	.btn-row--stack .btn {
		width: auto;
	}
}

@media (min-width: 768px) {
	.hero__slide {
		aspect-ratio: 16 / 9;
		max-height: calc(100svh - var(--header-h));
	}

	.hero__overlay {
		align-items: center;
		padding-bottom: 0;
		background: linear-gradient(to right, rgba(30, 18, 8, .85) 0%, rgba(30, 18, 8, .5) 45%, rgba(30, 18, 8, 0) 75%);
	}

	.hero__title {
		font-size: 2.6rem;
	}

	.hero__desc {
		font-size: 1.2rem;
	}

	.hero__nav {
		display: inline-flex;
	}

	.cta-band {
		padding: 64px 0;
	}
}

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

	.card-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}

	.card-grid--4 {
		grid-template-columns: repeat(4, 1fr);
	}

	.steps {
		grid-template-columns: repeat(3, 1fr);
	}

	.js-reviews:not(.swiper-initialized) .swiper-wrapper {
		grid-template-columns: repeat(3, 1fr);
	}

	.hero__title {
		font-size: 3rem;
	}

	.product__layout {
		grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
		align-items: start;
		gap: 32px;
	}

	.product__aside {
		position: sticky;
		top: calc(var(--header-h) + 16px);
	}

	.btn-row--stack {
		flex-direction: column;
	}

	.btn-row--stack .btn {
		width: 100%;
	}

	.filters {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}

	.filters__group + .filters__group {
		margin-top: 0;
	}

	.filters__list {
		flex-wrap: wrap;
		overflow: visible;
	}

	.filters__reset {
		grid-column: 1 / -1;
		margin: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.card:hover,
	.gallery-grid__item:hover img {
		transform: none;
	}
}
