/**
 * Product Archive / Shop Page Styles.
 *
 * Bố cục 1 cột full-width: Hero → Category Filter → Product Header
 * → Product Grid → SEO Content → FAQ → CTA.
 *
 * Mọi selector scope dưới `.product-archive-page` (wrapper trên <main>) để không
 * rò CSS ra ngoài trang archive.
 *
 * @package TMNhanPhat
 */

/* ==================== HERO SECTION ==================== */
.product-archive__hero {
	background: #f4f9fe;
	border-bottom: 1px solid #e3edf7;
}

.product-archive__hero-inner {
	padding-block: 20px 34px;
}

.product-archive__hero .breadcrumb {
	margin-bottom: 22px;
	color: #587087;
}

.product-archive__hero .breadcrumb__item:not(:last-child)::after {
	content: "›";
	color: #9eb1c3;
	margin-inline: 8px;
}

.product-archive__hero .breadcrumb__item:last-child {
	color: #046ab5;
	font-weight: 600;
}

/* Hero 2 cột (tiêu đề trái – ảnh danh mục phải); is-full = không có ảnh. */
.product-archive__hero-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	align-items: center;
}

.product-archive__hero.has-image .product-archive__hero-body {
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: 40px;
}



.product-archive__title {
	margin: 0;
	color: #131b2e;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: clamp(1.75rem, 3vw, 2.4rem);
	font-weight: 700;
	line-height: 1.2;
}

.product-archive__description {
	max-width: 68ch;
	margin: 12px 0 0;
	color: #3f5266;
	font-family: var(--font-inter, sans-serif);
	font-size: 0.9375rem;
	line-height: 1.7;
}

.product-archive__hero-media {
	display: flex;
	justify-content: center;
}

.product-archive__hero-image {
	width: 100%;
	max-width: 460px;
	height: auto;
	max-height: 280px;
	object-fit: contain;
	border-radius: 12px;
}

/* ==================== BODY / WRAPPER ==================== */
.product-archive__body {
	padding-block: 28px clamp(32px, 4vw, 48px);
}

/* ==================== CATEGORY FILTER (CHIP) ==================== */
.product-archive__cats {
	margin-bottom: 24px;
}

.product-archive__cats-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.product-archive__cats-item {
	margin: 0;
}

.product-archive__cat {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 8px 18px;
	border: 1px solid #dfe6ee;
	border-radius: 999px;
	background: #ffffff;
	color: #3f5266;
	font-family: var(--font-inter, sans-serif);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.product-archive__cat:hover,
.product-archive__cat:focus-visible {
	border-color: #046ab5;
	color: #046ab5;
}

.product-archive__cat.is-active {
	background: #046ab5;
	border-color: #046ab5;
	color: #ffffff;
	font-weight: 600;
}

/* ==================== PRODUCT HEADER (TOOLBAR) ==================== */
.product-archive__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e8eef5;
}

.product-archive__result-count {
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 15px;
	font-weight: 700;
	color: #131b2e;
}

.product-archive__toolbar-meta {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-left: auto;
	flex-wrap: wrap;
}

.product-archive__search {
	position: relative;
	flex: 0 1 220px;
}

.product-archive__search-icon {
	position: absolute;
	top: 50%;
	left: 13px;
	color: #8193a5;
	pointer-events: none;
	transform: translateY(-50%);
}

.product-archive__search input[type="search"] {
	width: 100%;
	height: 38px;
	padding: 7px 14px 7px 36px;
	border: 1px solid #dce5ee;
	border-radius: 999px;
	font-family: var(--font-inter, sans-serif);
	font-size: 13.5px;
	outline: none;
	background: #ffffff;
	color: #1e293b;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-archive__search input[type="search"]:focus {
	border-color: #046ab5;
	box-shadow: 0 0 0 3px rgba(4, 106, 181, 0.12);
}

.product-archive__sort-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.product-archive__sort-label {
	font-family: var(--font-inter, sans-serif);
	font-size: 13.5px;
	font-weight: 500;
	color: #475569;
	white-space: nowrap;
}

.product-archive__sort-select {
	height: 38px;
	padding: 6px 34px 6px 14px;
	border: 1px solid #dce5ee;
	border-radius: 10px;
	font-family: var(--font-inter, sans-serif);
	font-size: 13.5px;
	font-weight: 500;
	color: #1e293b;
	background-color: #ffffff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-archive__sort-select:focus {
	border-color: #046ab5;
	box-shadow: 0 0 0 3px rgba(4, 106, 181, 0.12);
}

/* ≤3 sản phẩm: làm nhoẹt dropdown sắp xếp để không lấn át danh sách ngắn. */
.product-archive__toolbar.is-compact .product-archive__sort-select {
	height: 34px;
	padding-top: 4px;
	padding-bottom: 4px;
	border-color: #e8eef5;
	color: #5b6b7d;
	font-weight: 400;
}

.product-archive__toolbar.is-compact .product-archive__sort-label {
	color: #6b7c8f;
	font-weight: 400;
}

/* ==================== PRODUCT GRID ====================
 * Flexbox (không Grid) để hàng cuối luôn tự căn giữa khi số sản phẩm
 * không chia hết cho số cột — PROJECT_RULES mục 25.
 * --cols và --gap phải khớp nhau ở từng breakpoint.
 */
.product-archive__grid {
	--cols: 3;
	--gap: 28px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: var(--gap);
	margin-bottom: 32px;
}

.product-archive__grid > .product-card,
.product-archive__grid > .product-archive__inline-cta {
	flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
	max-width: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
	min-width: 0;
}

/* Card giữ chiều cao đồng đều khi nhiều sản phẩm lệch độ dài tên/mô tả.
   components/products.css đặt height:100% cho .product-card — trong flex-wrap
   container, giá trị đó khoá chiều cao theo nội dung thay vì theo hàng, làm các
   card lệch nhau. Reset về auto để align-items:stretch tự cân theo từng hàng. */
.product-archive__grid > .product-card {
	display: flex;
	flex-direction: column;
	height: auto;
}

/* Ảnh sản phẩm: contain + padding để không crop/kéo méo ảnh thang máy. */
.product-archive__grid .product-card__image {
	object-fit: contain;
	padding: 22px 26px;
}

/* ==================== EMPTY STATE ==================== */
.product-archive__empty {
	padding: 64px 20px;
	text-align: center;
	background: #ffffff;
	border: 1px dashed #dce5ee;
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.product-archive__empty-icon {
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #f1f5f9;
}

.product-archive__empty-title {
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 20px;
	font-weight: 700;
	color: #131b2e;
	margin: 0 0 8px;
}

.product-archive__empty-desc {
	max-width: 480px;
	font-family: var(--font-inter, sans-serif);
	font-size: 14px;
	line-height: 1.6;
	color: #64748b;
	margin: 0 0 24px;
}

.product-archive__empty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 24px;
	border-radius: 10px;
	background-color: #046ab5;
	color: #ffffff;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.25s ease;
}

.product-archive__empty-btn:hover {
	background-color: #03518a;
	color: #ffffff;
}

/* ==================== INLINE CTA (sau mỗi 6 sản phẩm) ==================== */
.product-archive__grid > .product-archive__inline-cta {
	flex-basis: 100%;
	max-width: 100%;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 24px;
	align-items: center;
	padding: 26px 30px;
	background: linear-gradient(135deg, #046ab5 0%, #034a83 100%);
	border-radius: 16px;
	color: #ffffff;
}

.product-archive__inline-cta-icon {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.18);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	flex-shrink: 0;
}

.product-archive__inline-cta-eyebrow {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}

.product-archive__inline-cta-title {
	margin: 0 0 6px;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 19px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
}

.product-archive__inline-cta-desc {
	margin: 0;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.92);
	line-height: 1.5;
	max-width: 60ch;
}

.product-archive__inline-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 22px;
	background: #ffffff;
	color: #046ab5;
	border-radius: 999px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.product-archive__inline-cta-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

/* ==================== SEO CONTENT ==================== */
.product-archive__seo-content {
	padding-block: 44px;
	background: #f8faff;
	border-top: 1px solid #e8f0fb;
	border-bottom: 1px solid #e8f0fb;
}

.product-archive__seo-body {
	max-width: 900px;
	margin-inline: auto;
	color: #3f5266;
	font-family: var(--font-inter, sans-serif);
	font-size: 16px;
	line-height: 1.75;
}

.product-archive__seo-body > :first-child {
	margin-top: 0;
}

.product-archive__seo-body > :last-child {
	margin-bottom: 0;
}

.product-archive__seo-body p {
	margin: 0 0 16px;
}

.product-archive__seo-body h2 {
	margin: 32px 0 12px;
	color: #131b2e;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
}

.product-archive__seo-body h3 {
	margin: 24px 0 10px;
	color: #131b2e;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
}

.product-archive__seo-body ul,
.product-archive__seo-body ol {
	margin: 0 0 16px;
	padding-left: 22px;
}

.product-archive__seo-body li {
	margin-bottom: 8px;
}

.product-archive__seo-body a {
	color: #046ab5;
}

.product-archive__seo-body img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.product-archive__seo-body table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
}

.product-archive__seo-body th,
.product-archive__seo-body td {
	padding: 10px 12px;
	border: 1px solid #dfe6ee;
	text-align: left;
}

.product-archive__seo-body th {
	background: #f1f7fd;
	color: #131b2e;
	font-weight: 700;
}

/* ==================== FAQ ==================== */
.product-archive__faq {
	padding-block: 44px;
}

.product-archive__faq-inner {
	max-width: 860px;
	margin-inline: auto;
}

.product-archive__faq-title {
	margin: 0 0 22px;
	color: #131b2e;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: clamp(1.35rem, 2.2vw, 1.75rem);
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.product-archive__faq-item {
	background: #ffffff;
	border: 1px solid #e3edf7;
	border-radius: 12px;
	margin-bottom: 12px;
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.product-archive__faq-item[open] {
	border-color: #046ab5;
}

.product-archive__faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 20px;
	color: #131b2e;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	cursor: pointer;
	list-style: none;
	transition: color 0.2s ease;
}

.product-archive__faq-question::-webkit-details-marker {
	display: none;
}

.product-archive__faq-question:hover {
	color: #046ab5;
}

.product-archive__faq-item[open] .product-archive__faq-question {
	color: #046ab5;
}

.product-archive__faq-question svg {
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

.product-archive__faq-item[open] .product-archive__faq-question svg {
	transform: rotate(180deg);
}

.product-archive__faq-answer {
	padding: 0 20px 18px;
	color: #4a5b6d;
	font-family: var(--font-inter, sans-serif);
	font-size: 15px;
	line-height: 1.75;
}

.product-archive__faq-answer > :first-child {
	margin-top: 0;
}

.product-archive__faq-answer > :last-child {
	margin-bottom: 0;
}

/* ==================== CTA TƯ VẤN ==================== */
.product-archive__cta {
	padding-block: 8px 56px;
}

.product-archive__cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	flex-wrap: wrap;
	padding: 30px 36px;
	background: #046ab5;
	border-radius: 16px;
	color: #ffffff;
}

.product-archive__cta-title {
	margin: 0 0 8px;
	color: #ffffff;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: clamp(1.3rem, 2.2vw, 1.7rem);
	font-weight: 700;
	line-height: 1.3;
}

.product-archive__cta-desc {
	margin: 0;
	max-width: 60ch;
	color: rgba(255, 255, 255, 0.92);
	font-family: var(--font-inter, sans-serif);
	font-size: 15px;
	line-height: 1.65;
}

.product-archive__cta-actions {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.product-archive__cta-phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #ffffff;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.product-archive__cta-phone:hover {
	opacity: 0.85;
}

/* Nút của shortcode [tmnp_quote_popup] trên nền xanh. */
.product-archive__cta .tmnp-quote-btn {
	min-height: 46px;
	padding: 12px 26px;
	border-radius: 999px;
	font-family: var(--font-hanken, 'Hanken Grotesk', sans-serif);
	font-size: 15px;
	font-weight: 700;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1199px) {
	.product-archive__grid {
		--cols: 2;
		--gap: 24px;
	}
}

@media (max-width: 991px) {
	.product-archive__hero.has-image .product-archive__hero-body {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.product-archive__hero-image {
		max-width: 100%;
		max-height: 220px;
	}

	.product-archive__grid > .product-archive__inline-cta {
		grid-template-columns: 1fr;
		text-align: center;
		gap: 18px;
		padding: 26px 22px;
	}

	.product-archive__inline-cta-icon {
		margin: 0 auto;
	}

	.product-archive__inline-cta-desc {
		margin: 0 auto;
	}

	.product-archive__grid {
		--cols: 2;
		--gap: 20px;
	}

	.product-archive__cta-inner {
		padding: 28px 24px;
	}
}

@media (max-width: 640px) {
	.product-archive__hero-inner {
		padding-block: 16px 26px;
	}

	.product-archive__title {
		font-size: 1.6rem;
	}

	.product-archive__description {
		font-size: 0.9rem;
	}

	/* Chip danh mục: cuộn ngang thay vì xuống dòng, tránh đẩy grid xuống thấp. */
	.product-archive__cats-list {
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
		/* Ẩn scrollbar nhưng vẫn cuộn được */
		scrollbar-width: none;
	}

	.product-archive__cats-list::-webkit-scrollbar {
		display: none;
	}

	.product-archive__cats-item {
		flex-shrink: 0;
		scroll-snap-align: start;
	}

	.product-archive__toolbar {
		align-items: flex-start;
		gap: 12px;
	}

	.product-archive__toolbar-meta {
		width: 100%;
		margin-left: 0;
		gap: 10px;
	}

	.product-archive__search {
		flex: 1 1 100%;
	}

	.product-archive__sort-wrap {
		width: 100%;
	}

	.product-archive__sort-select {
		flex: 1 1 auto;
	}

	.product-archive__grid {
		--cols: 1;
		--gap: 18px;
	}

	.product-archive__grid .product-card__image {
		padding: 18px 22px;
	}

	.product-archive__seo-content,
	.product-archive__faq {
		padding-block: 32px;
	}

	.product-archive__seo-body {
		font-size: 15px;
	}

	.product-archive__seo-body h2 {
		font-size: 20px;
	}

	.product-archive__seo-body h3 {
		font-size: 17px;
	}

	.product-archive__faq-question {
		padding: 14px 16px;
		font-size: 15px;
	}

	.product-archive__cta {
		padding-block: 8px 36px;
	}

	.product-archive__cta-inner {
		padding: 24px 18px;
		text-align: center;
		flex-direction: column;
		gap: 18px;
	}

	.product-archive__cta-actions {
		justify-content: center;
		width: 100%;
		flex-direction: column;
		gap: 14px;
	}

	.product-archive__cta .tmnp-quote-btn {
		width: 100%;
		justify-content: center;
	}
}
