/* Taman Herbal – Data Tanaman (frontend) */
.th-single,
.th-archive {
	--th-green: #2f5d34;
	--th-leaf: #61ce70;
	--th-soft: #eef5ee;
	--th-ink: #212121;
	--th-muted: #545454;
	--th-line: #e3e8e3;
	background: #f7f8f9;
	padding: 64px 0 80px;
	color: var(--th-ink);
}
.th-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Badge kode */
.th-badge {
	display: inline-block;
	background: var(--th-soft, #eef5ee);
	color: var(--th-green, #2f5d34);
	border: 1px solid rgba(47, 93, 52, .2);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
}

/* Detail */
.th-breadcrumb { font-size: 14px; color: var(--th-muted); margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.th-breadcrumb a { color: var(--th-green); text-decoration: none; }
.th-detail {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 48px;
	background: #fff;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}
.th-detail__img { width: 100%; height: auto; border-radius: 12px; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.th-detail__noimg,
.th-card__noimg {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 4 / 3; border-radius: 12px; background: var(--th-soft, #eef5ee); font-size: 64px;
}
.th-detail__title { margin: 12px 0 16px; font-size: clamp(28px, 4vw, 40px); line-height: 1.2; }
.th-detail__content { color: var(--th-muted); line-height: 1.8; }
.th-detail__content > *:last-child { margin-bottom: 0; }
.th-qr {
	display: flex; gap: 20px; align-items: center;
	margin-top: 32px; padding: 20px; border: 1px dashed var(--th-line); border-radius: 12px; background: #fcfdfc;
}
.th-qr img { flex: 0 0 120px; width: 120px; height: 120px; }
.th-qr p { margin: 6px 0 0; font-size: 14px; color: var(--th-muted); }
.th-back { margin-top: 32px; }
.th-back a { color: var(--th-green); font-weight: 600; text-decoration: none; }

/* Arsip */
.th-archive__header { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.th-archive__header h1 { margin: 0 0 8px; }
.th-archive__header p { color: var(--th-muted); }
.th-search { display: flex; gap: 8px; margin-top: 20px; }
.th-search input[type="search"] { flex: 1; padding: 12px 16px; border: 1px solid var(--th-line); border-radius: 8px; background: #fff; }
.th-search button { padding: 12px 24px; border: 0; border-radius: 8px; background: #2a2a2a; color: #fff; cursor: pointer; }
.th-pagination { margin-top: 40px; text-align: center; }
.th-empty { text-align: center; color: #545454; }

/* Grid kartu (arsip & shortcode) */
.th-grid { display: grid; grid-template-columns: repeat(var(--th-cols, 3), minmax(0, 1fr)); gap: 24px; }
.th-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .06); display: flex; flex-direction: column; }
.th-card__img > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.th-card__noimg { border-radius: 0; }
.th-card__body { padding: 20px; }
.th-card__title { margin: 10px 0 8px; font-size: 20px; line-height: 1.3; }
.th-card__title a { color: inherit; text-decoration: none; }
.th-card__excerpt { margin: 0; font-size: 14px; color: #545454; line-height: 1.6; }

.th-archive__header h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.15; }
.th-count { margin: 0 0 20px; color: var(--th-muted); font-size: 15px; }

/* Tombol detail */
.th-btn {
	display: inline-flex; align-items: center; gap: 6px;
	margin-top: 16px; padding: 10px 18px; border-radius: 6px;
	background: #2a2a2a; color: #fff !important; text-decoration: none;
	font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	transition: background .2s ease;
}
.th-btn:hover, .th-btn:focus-visible { background: var(--th-green, #2f5d34); }

/* Kartu horizontal di halaman Koleksi (2 kolom, 10 per halaman = 5 baris rapi) */
.th-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.th-grid--list .th-card { flex-direction: row; }
.th-grid--list .th-card__img { position: relative; flex: 0 0 42%; min-height: 230px; display: block; }
.th-grid--list .th-card__img > img,
.th-grid--list .th-card__noimg { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.th-grid--list .th-card__noimg { display: flex; align-items: center; justify-content: center; }
.th-grid--list .th-card__body { display: flex; flex-direction: column; align-items: flex-start; }
.th-grid--list .th-btn { margin-top: auto; }
.th-grid--list .th-card__excerpt { margin-bottom: 16px; }

/* Nomor halaman */
.th-pagination { margin-top: 48px; }
.th-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.th-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 14px; border-radius: 6px;
	background: #fff; border: 1px solid var(--th-line); color: var(--th-ink); text-decoration: none; font-weight: 600;
}
.th-pagination a.page-numbers:hover { border-color: var(--th-green); color: var(--th-green); }
.th-pagination .page-numbers.current { background: var(--th-green); border-color: var(--th-green); color: #fff; }
.th-pagination .page-numbers.dots { background: transparent; border: 0; }

@media (max-width: 921px) {
	.th-grid--list { grid-template-columns: 1fr; }
	.th-single, .th-archive { padding-top: 40px; }
	.th-detail { grid-template-columns: 1fr; gap: 28px; padding: 20px; }
	.th-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 544px) {
	.th-grid { grid-template-columns: 1fr; }
	.th-grid--list .th-card { flex-direction: column; }
	.th-grid--list .th-card__img { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
	.th-pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 10px; }
	.th-qr { flex-direction: column; text-align: center; }
}
