/*
 * Gió Rừng Store — giao diện phần nội dung.
 *
 * Bản cũ không có template bài viết nên cũng không có CSS cho phần này.
 * Tệp này phục vụ: single.php, archive.php, 404.php, comments.php, searchform.php
 * và breadcrumb dùng chung của plugin Gió Rừng SEO.
 *
 * Giữ nguyên bảng màu và bộ chữ sẵn có của thương hiệu để toàn site đồng nhất.
 */

:root {
	--gr-forest: #0f331f;
	--gr-pine: #446843;
	--gr-gold: #d9a441;
	--gr-cream: #f7f6f1;
	--gr-ink: #23291f;
	--gr-muted: #6c7568;
	--gr-line: #e3e1d7;
	--gr-radius: 18px;
	--gr-font: 'Be Vietnam Pro', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------------------------------------------------------------------- */
/* Breadcrumb dùng chung                                                   */
/* ---------------------------------------------------------------------- */

.gr-breadcrumb {
	margin: 24px 0 18px;
	font-family: var(--gr-font);
	font-size: 13px;
}

.gr-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gr-breadcrumb li {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.gr-breadcrumb a {
	color: var(--gr-pine);
	text-decoration: none;
}

.gr-breadcrumb a:hover {
	color: var(--gr-forest);
	text-decoration: underline;
}

.gr-breadcrumb [aria-current='page'] {
	color: var(--gr-muted);
}

.gr-breadcrumb__sep {
	color: #c3c8bc;
}

/* ---------------------------------------------------------------------- */
/* Bài viết                                                                */
/* ---------------------------------------------------------------------- */

.gr-single-post {
	padding: 0 0 72px;
	background: #fff;
}

.gr-single-post__shell {
	max-width: 1120px;
}

.gr-article {
	max-width: 760px;
	margin: 0 auto;
	font-family: var(--gr-font);
	color: var(--gr-ink);
}

.gr-article__header {
	margin-bottom: 28px;
}

.gr-article__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}

.gr-article__cats a {
	padding: 5px 12px;
	border-radius: 999px;
	background: #edf2e8;
	color: var(--gr-pine);
	font-size: 12px;
	font-weight: 650;
	text-decoration: none;
}

.gr-article__cats a:hover {
	background: var(--gr-pine);
	color: #fff;
}

.gr-article__title {
	margin: 0 0 14px;
	color: var(--gr-forest);
	font-size: clamp(28px, 4.4vw, 42px);
	font-weight: 800;
	line-height: 1.22;
	letter-spacing: -0.015em;
}

.gr-article__lead {
	margin: 0 0 18px;
	color: var(--gr-muted);
	font-size: 17px;
	line-height: 1.7;
}

.gr-article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	padding-top: 16px;
	border-top: 1px solid var(--gr-line);
	color: var(--gr-muted);
	font-size: 13.5px;
}

.gr-article__author {
	color: var(--gr-forest);
	font-weight: 650;
}

.gr-article__cover {
	margin: 0 0 32px;
}

.gr-article__cover img {
	width: 100%;
	height: auto;
	border-radius: var(--gr-radius);
	object-fit: cover;
}

.gr-article__cover figcaption {
	margin-top: 10px;
	color: var(--gr-muted);
	font-size: 13px;
	text-align: center;
}

/* Nội dung bài: cỡ chữ và giãn dòng ưu tiên đọc dài trên điện thoại. */

.gr-article__body {
	font-size: 17px;
	line-height: 1.85;
}

.gr-article__body > * + * {
	margin-top: 20px;
}

.gr-article__body h2 {
	margin: 38px 0 12px;
	color: var(--gr-forest);
	font-size: 25px;
	font-weight: 750;
	line-height: 1.3;
}

.gr-article__body h3 {
	margin: 30px 0 10px;
	color: var(--gr-forest);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
}

.gr-article__body p {
	margin: 0 0 18px;
}

.gr-article__body ul,
.gr-article__body ol {
	margin: 0 0 20px;
	padding-left: 24px;
}

.gr-article__body li {
	margin-bottom: 9px;
}

.gr-article__body a {
	color: var(--gr-pine);
	text-underline-offset: 3px;
}

.gr-article__body a:hover {
	color: var(--gr-forest);
}

.gr-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: 14px;
}

.gr-article__body figure {
	margin: 26px 0;
}

.gr-article__body figcaption {
	margin-top: 8px;
	color: var(--gr-muted);
	font-size: 13px;
	text-align: center;
}

.gr-article__body blockquote {
	margin: 26px 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--gr-gold);
	color: var(--gr-forest);
	font-size: 18px;
	font-style: italic;
}

.gr-article__body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.gr-article__body th,
.gr-article__body td {
	padding: 10px 12px;
	border: 1px solid var(--gr-line);
	text-align: left;
}

.gr-article__body th {
	background: var(--gr-cream);
	color: var(--gr-forest);
	font-weight: 700;
}

.gr-article__body code {
	padding: 2px 6px;
	border-radius: 5px;
	background: var(--gr-cream);
	font-size: 14px;
}

.gr-article__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid var(--gr-line);
	font-size: 13.5px;
}

.gr-article__tags span {
	color: var(--gr-muted);
}

.gr-article__tags a {
	padding: 4px 11px;
	border: 1px solid var(--gr-line);
	border-radius: 999px;
	color: var(--gr-pine);
	text-decoration: none;
}

.gr-article__tags a:hover {
	border-color: var(--gr-pine);
	background: #edf2e8;
}

.gr-article__pages {
	margin-top: 24px;
	color: var(--gr-muted);
	font-size: 14px;
}

/* Khối kêu gọi dùng trợ lý AI ở cuối bài. */

.gr-article__cta {
	margin-top: 40px;
	padding: 26px 28px;
	border-radius: var(--gr-radius);
	background: linear-gradient(135deg, rgba(68, 104, 67, 0.1), rgba(217, 164, 65, 0.14));
}

.gr-article__cta h2 {
	margin: 0 0 10px;
	color: var(--gr-forest);
	font-size: 21px;
	font-weight: 750;
}

.gr-article__cta p {
	margin: 0 0 18px;
	color: var(--gr-ink);
	font-size: 15px;
	line-height: 1.7;
}

/* ---------------------------------------------------------------------- */
/* Sản phẩm và bài liên quan                                               */
/* ---------------------------------------------------------------------- */

.gr-article-products,
.gr-article-related {
	max-width: 960px;
	margin: 56px auto 0;
	font-family: var(--gr-font);
}

.gr-article-products h2,
.gr-article-related h2 {
	margin: 0 0 20px;
	color: var(--gr-forest);
	font-size: 22px;
	font-weight: 750;
}

.gr-article-products__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 16px;
}

.gr-article-product {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px;
	border: 1px solid var(--gr-line);
	border-radius: 16px;
	background: #fff;
	color: var(--gr-ink);
	text-decoration: none;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.gr-article-product:hover {
	border-color: var(--gr-pine);
	transform: translateY(-2px);
}

.gr-article-product__media img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.gr-article-product strong {
	color: var(--gr-forest);
	font-size: 14.5px;
	font-weight: 650;
	line-height: 1.45;
}

.gr-article-product__price {
	color: var(--gr-pine);
	font-size: 15px;
	font-weight: 750;
}

.gr-article-product__price del {
	margin-right: 6px;
	color: var(--gr-muted);
	font-size: 13px;
	font-weight: 400;
}

/* Điều hướng bài trước / bài sau. */

.gr-article-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 14px;
	max-width: 960px;
	margin: 48px auto 0;
	padding-top: 24px;
	border-top: 1px solid var(--gr-line);
	font-family: var(--gr-font);
	font-size: 14.5px;
}

.gr-article-nav a {
	color: var(--gr-pine);
	text-decoration: none;
}

.gr-article-nav a:hover {
	color: var(--gr-forest);
	text-decoration: underline;
}

.gr-article-nav__next {
	margin-left: auto;
	text-align: right;
}

/* ---------------------------------------------------------------------- */
/* Lưu trữ và danh sách bài                                                */
/* ---------------------------------------------------------------------- */

.gr-archive {
	padding: 0 0 72px;
	font-family: var(--gr-font);
}

.gr-page-heading {
	margin-bottom: 34px;
}

.gr-page-heading h1 {
	margin: 6px 0 12px;
	color: var(--gr-forest);
	font-size: clamp(26px, 4vw, 38px);
	font-weight: 800;
	line-height: 1.25;
}

.gr-eyebrow {
	display: inline-block;
	color: var(--gr-pine);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.gr-archive-description {
	max-width: 660px;
	color: var(--gr-muted);
	font-size: 15.5px;
	line-height: 1.75;
}

.gr-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

.gr-post-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--gr-line);
	border-radius: var(--gr-radius);
	background: #fff;
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.gr-post-card:hover {
	border-color: var(--gr-pine);
	box-shadow: 0 14px 30px rgba(15, 51, 31, 0.08);
	transform: translateY(-3px);
}

.gr-post-thumb {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--gr-cream);
}

.gr-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gr-post-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 9px;
	padding: 18px 20px 22px;
}

.gr-post-meta {
	margin: 0;
	color: var(--gr-muted);
	font-size: 12.5px;
}

.gr-post-card-body h2,
.gr-post-card-body h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
}

.gr-post-card-body h2 a,
.gr-post-card-body h3 a {
	color: var(--gr-forest);
	text-decoration: none;
}

.gr-post-card-body h2 a:hover,
.gr-post-card-body h3 a:hover {
	color: var(--gr-pine);
}

.gr-post-excerpt {
	color: var(--gr-muted);
	font-size: 14.5px;
	line-height: 1.7;
}

.gr-post-excerpt p {
	margin: 0;
}

.gr-post-more {
	margin-top: auto;
	padding-top: 6px;
	color: var(--gr-pine);
	font-size: 14px;
	font-weight: 650;
	text-decoration: none;
}

.gr-post-more:hover {
	color: var(--gr-forest);
}

/* Phân trang. */

.pagination,
.navigation.pagination {
	margin-top: 40px;
	font-family: var(--gr-font);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.pagination .page-numbers {
	display: inline-flex;
	min-width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	border: 1px solid var(--gr-line);
	border-radius: 10px;
	color: var(--gr-pine);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.pagination .page-numbers:hover {
	border-color: var(--gr-pine);
	background: var(--gr-cream);
}

.pagination .page-numbers.current {
	border-color: var(--gr-forest);
	background: var(--gr-forest);
	color: #fff;
}

/* ---------------------------------------------------------------------- */
/* Trạng thái rỗng và trang 404                                            */
/* ---------------------------------------------------------------------- */

.gr-empty-state {
	max-width: 560px;
	margin: 0 auto;
	padding: 56px 20px;
	font-family: var(--gr-font);
	text-align: center;
}

.gr-empty-state h1,
.gr-empty-state h2 {
	margin: 0 0 12px;
	color: var(--gr-forest);
	font-size: 24px;
	font-weight: 750;
}

.gr-empty-state p {
	color: var(--gr-muted);
	font-size: 15px;
	line-height: 1.75;
}

.gr-404 {
	padding: 0 0 80px;
	font-family: var(--gr-font);
}

.gr-404__hero {
	max-width: 680px;
	margin: 0 auto 48px;
	text-align: center;
}

.gr-404__hero h1 {
	margin: 8px 0 14px;
	color: var(--gr-forest);
	font-size: clamp(26px, 4.2vw, 38px);
	font-weight: 800;
}

.gr-404__hero p {
	margin: 0 0 22px;
	color: var(--gr-muted);
	font-size: 16px;
	line-height: 1.7;
}

.gr-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-top: 24px;
}

.gr-404__block {
	max-width: 680px;
	margin: 0 auto 32px;
	text-align: center;
}

.gr-404__block h2 {
	margin: 0 0 14px;
	color: var(--gr-forest);
	font-size: 18px;
	font-weight: 700;
}

.gr-404__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gr-404__links a {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid var(--gr-line);
	border-radius: 999px;
	color: var(--gr-pine);
	font-size: 14px;
	text-decoration: none;
}

.gr-404__links a:hover {
	border-color: var(--gr-pine);
	background: var(--gr-cream);
}

/* ---------------------------------------------------------------------- */
/* Form tìm kiếm                                                           */
/* ---------------------------------------------------------------------- */

.gr-searchform {
	display: flex;
	max-width: 520px;
	margin: 0 auto;
	gap: 8px;
	font-family: var(--gr-font);
}

.gr-searchform__input {
	flex: 1;
	min-width: 0;
	padding: 12px 16px;
	border: 1px solid var(--gr-line);
	border-radius: 12px;
	background: #fff;
	color: var(--gr-ink);
	font-family: inherit;
	font-size: 15px;
}

.gr-searchform__input:focus {
	border-color: var(--gr-pine);
	outline: 2px solid rgba(68, 104, 67, 0.16);
	outline-offset: 1px;
}

.gr-searchform__submit {
	padding: 12px 20px;
	border: 0;
	border-radius: 12px;
	background: var(--gr-forest);
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 650;
}

.gr-searchform__submit:hover {
	background: var(--gr-pine);
}

/* ---------------------------------------------------------------------- */
/* Nút dùng chung trong phần nội dung                                      */
/* ---------------------------------------------------------------------- */

.gr-single-post .gr-btn,
.gr-archive .gr-btn,
.gr-404 .gr-btn,
.gr-basic-page .gr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: var(--gr-font);
	font-size: 14.5px;
	font-weight: 650;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gr-single-post .gr-btn--primary,
.gr-archive .gr-btn--primary,
.gr-404 .gr-btn--primary,
.gr-basic-page .gr-btn--primary {
	background: var(--gr-forest);
	color: #fff;
}

.gr-single-post .gr-btn--primary:hover,
.gr-archive .gr-btn--primary:hover,
.gr-404 .gr-btn--primary:hover,
.gr-basic-page .gr-btn--primary:hover {
	background: var(--gr-pine);
}

.gr-single-post .gr-btn--ghost,
.gr-archive .gr-btn--ghost,
.gr-404 .gr-btn--ghost,
.gr-basic-page .gr-btn--ghost {
	border-color: var(--gr-line);
	background: #fff;
	color: var(--gr-forest);
}

.gr-single-post .gr-btn--ghost:hover,
.gr-archive .gr-btn--ghost:hover,
.gr-404 .gr-btn--ghost:hover,
.gr-basic-page .gr-btn--ghost:hover {
	border-color: var(--gr-pine);
	background: var(--gr-cream);
}

/* ---------------------------------------------------------------------- */
/* Trang tĩnh (chính sách, giới thiệu, liên hệ)                            */
/* ---------------------------------------------------------------------- */

.gr-basic-page .gr-page-content {
	max-width: 760px;
	font-family: var(--gr-font);
	font-size: 16.5px;
	line-height: 1.85;
}

.gr-basic-page .gr-page-content h2 {
	margin: 34px 0 12px;
	color: var(--gr-forest);
	font-size: 23px;
	font-weight: 750;
}

.gr-basic-page .gr-page-content h3 {
	margin: 26px 0 10px;
	color: var(--gr-forest);
	font-size: 18px;
	font-weight: 700;
}

.gr-basic-page .gr-page-content ul,
.gr-basic-page .gr-page-content ol {
	margin: 0 0 20px;
	padding-left: 24px;
}

.gr-basic-page .gr-page-content li {
	margin-bottom: 9px;
}

/* ---------------------------------------------------------------------- */
/* Bình luận                                                               */
/* ---------------------------------------------------------------------- */

.gr-comments {
	max-width: 760px;
	margin: 56px auto 0;
	padding-top: 32px;
	border-top: 1px solid var(--gr-line);
	font-family: var(--gr-font);
}

.gr-comments__title {
	margin: 0 0 24px;
	color: var(--gr-forest);
	font-size: 21px;
	font-weight: 750;
}

.gr-comments__list {
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.gr-comments__list .children {
	margin: 16px 0 0 24px;
	padding: 0;
	list-style: none;
}

.gr-comments__list .comment-body {
	padding: 18px 20px;
	margin-bottom: 14px;
	border: 1px solid var(--gr-line);
	border-radius: 14px;
	background: #fff;
	font-size: 15px;
	line-height: 1.7;
}

.gr-comments__list .comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--gr-forest);
	font-size: 14.5px;
	font-weight: 650;
}

.gr-comments__list .comment-author img {
	border-radius: 50%;
}

.gr-comments__list .comment-meta {
	margin-bottom: 10px;
	color: var(--gr-muted);
	font-size: 12.5px;
}

.gr-comments__closed {
	color: var(--gr-muted);
	font-size: 14px;
}

.gr-comment-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.gr-comment-form__note {
	margin: 0;
	color: var(--gr-muted);
	font-size: 13px;
}

.gr-comment-form__row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.gr-comment-form__row label {
	color: var(--gr-forest);
	font-size: 13.5px;
	font-weight: 650;
}

.gr-comment-form__row input,
.gr-comment-form__row textarea {
	padding: 11px 14px;
	border: 1px solid var(--gr-line);
	border-radius: 12px;
	background: #fff;
	color: var(--gr-ink);
	font-family: inherit;
	font-size: 15px;
	resize: vertical;
}

.gr-comment-form__row input:focus,
.gr-comment-form__row textarea:focus {
	border-color: var(--gr-pine);
	outline: 2px solid rgba(68, 104, 67, 0.16);
	outline-offset: 1px;
}

.gr-comment-form .form-submit {
	margin: 0;
}

.gr-comment-form .gr-btn--primary {
	padding: 12px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--gr-forest);
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 15px;
	font-weight: 650;
}

.gr-comment-form .gr-btn--primary:hover {
	background: var(--gr-pine);
}

/* ---------------------------------------------------------------------- */
/* Màn hình nhỏ                                                            */
/* ---------------------------------------------------------------------- */

@media (max-width: 640px) {
	.gr-article__body {
		font-size: 16.5px;
	}

	.gr-article__cta {
		padding: 22px 20px;
	}

	.gr-searchform {
		flex-direction: column;
	}

	.gr-article-nav {
		flex-direction: column;
	}

	.gr-article-nav__next {
		margin-left: 0;
		text-align: left;
	}

	.gr-comments__list .children {
		margin-left: 12px;
	}
}

/* Hỗ trợ người dùng tắt hiệu ứng chuyển động. */

@media (prefers-reduced-motion: reduce) {
	.gr-post-card,
	.gr-article-product {
		transition: none;
	}

	.gr-post-card:hover,
	.gr-article-product:hover {
		transform: none;
	}
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
