/* ==========================================================================
   HHD Blog — product strip, archive pages, single post template.
   Loaded on: is_singular('post'), is_home(), is_category().
   ========================================================================== */

/* ── [hhd_products] product strip ─────────────────────────────────────────── */

.hhd-product-strip {
	margin: 2rem 0;
	padding: 1.25rem 1.25rem 1rem;
	background: #f7f8fa;
	border-radius: 8px;
	border: 1px solid #eaeaea;
}

.hhd-product-strip__head {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 1rem;
}

.hhd-product-strip__title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
	flex: 1;
	line-height: 1.3;
}

.hhd-product-strip__all {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--paletteColor1, #2e7d32);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.hhd-product-strip__all:hover {
	text-decoration: underline;
}

/* Scrollable list ----------------------------------------------------------- */

.hhd-product-strip__list {
	display: flex;
	gap: 0.875rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0;
	list-style: none;
	margin: 0;
	padding: 0 0 0.5rem; /* space for slim scrollbar */
	-webkit-overflow-scrolling: touch;
	/* slim scrollbar */
	scrollbar-width: thin;
	scrollbar-color: #d4d4d4 transparent;
}

.hhd-product-strip__list::-webkit-scrollbar {
	height: 3px;
}

.hhd-product-strip__list::-webkit-scrollbar-track {
	background: transparent;
}

.hhd-product-strip__list::-webkit-scrollbar-thumb {
	background: #d4d4d4;
	border-radius: 2px;
}

/* Card ---------------------------------------------------------------------- */

.hhd-product-strip__item {
	flex: 0 0 auto;
	width: clamp(150px, 44vw, 200px);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.15s ease;
}

.hhd-product-strip__item:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.09);
}

.hhd-product-strip__img {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #fafafa;
}

.hhd-product-strip__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.2s ease;
}

.hhd-product-strip__item:hover .hhd-product-strip__img img {
	transform: scale(1.04);
}

.hhd-product-strip__no-img {
	display: block;
	width: 100%;
	height: 100%;
	background: #f0f0f0;
}

.hhd-product-strip__body {
	padding: 0.625rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.3rem;
}

.hhd-product-strip__name {
	font-size: 0.78rem;
	font-weight: 500;
	margin: 0;
	line-height: 1.35;
	/* clamp to 2 lines */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hhd-product-strip__name a {
	color: inherit;
	text-decoration: none;
}

.hhd-product-strip__name a:hover {
	color: var(--paletteColor1, #2e7d32);
}

.hhd-product-strip__price {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.2;
}

/* WooCommerce price elements inside the strip */
.hhd-product-strip__price .woocommerce-Price-amount,
.hhd-product-strip__price ins .woocommerce-Price-amount {
	color: inherit;
}

.hhd-product-strip__price del {
	font-size: 0.75rem;
	font-weight: 400;
	opacity: 0.55;
}

.hhd-product-strip__btn {
	display: block;
	margin-top: auto;
	padding: 0.4rem 0.5rem;
	background: var(--paletteColor1, #2e7d32);
	color: #fff !important;
	text-align: center;
	text-decoration: none !important;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: background 0.15s ease;
	line-height: 1.4;
}

.hhd-product-strip__btn:hover {
	background: var(--paletteColor2, #1b5e20);
}

/* On larger screens — no scroll, grid layout -------------------------------- */

@media (min-width: 840px) {
	.hhd-product-strip__list {
		overflow-x: visible;
		flex-wrap: nowrap;
	}

	.hhd-product-strip__item {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
	}
}

/* ==========================================================================
   Blog archive — /blog and /category/* pages
   ========================================================================== */

.hhd-blog-wrap {
	padding-bottom: 3rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hhd-blog-hero {
	position: relative;
	/* Left = true accent colour, right = deep navy — pure left-to-right */
	background: linear-gradient(90deg, var(--hhd-accent-color, #2e7d32), #092f64);
	color: #fff;
	padding: 2.5rem 0 2rem;
	margin-bottom: 0;
	overflow: hidden;
	isolation: isolate;
}

/* Subtle pure-black scrim on the text side only — keeps accent colour visible */
.hhd-blog-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 60%);
	pointer-events: none;
}

.hhd-blog-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 960px;
}

.hhd-blog-hero__title {
	font-size: clamp(1.6rem, 4vw, 2.25rem);
	font-weight: 700;
	margin: 0 0 0.4rem;
	color: #fff;
	line-height: 1.2;
	text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}

.hhd-blog-hero__sub {
	margin: 0;
	font-size: 1rem;
	opacity: 0.95;
	line-height: 1.5;
	text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Decorative watermark icon — positioned right, large, semi-transparent */
.hhd-blog-hero__icon {
	position: absolute;
	right: -1rem;
	top: 50%;
	transform: translateY(-50%);
	z-index: 0;
	opacity: 0.12;
	pointer-events: none;
	display: flex;
}

.hhd-blog-hero__icon svg {
	width: 160px;
	height: 160px;
	fill: #fff;
}

/* ── Category tabs ────────────────────────────────────────────────────────── */

.hhd-blog-tabs {
	background: #fff;
	border-bottom: 1px solid #e5e5e5;
	position: sticky;
	top: 0;
	z-index: 10;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hhd-blog-tabs__inner {
	display: flex;
	gap: 0;
	overflow-x: auto;
	scrollbar-width: none;
	max-width: 1140px;
	padding: 0;
}

.hhd-blog-tabs__inner::-webkit-scrollbar {
	display: none;
}

.hhd-blog-tabs__tab {
	display: block;
	padding: 0.75rem 1.125rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #444;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
	flex-shrink: 0;
}

.hhd-blog-tabs__tab:hover {
	color: var(--paletteColor1, #2e7d32);
}

.hhd-blog-tabs__tab.is-active {
	color: var(--paletteColor1, #2e7d32);
	border-bottom-color: var(--paletteColor1, #2e7d32);
}

/* ── Post grid ────────────────────────────────────────────────────────────── */

.hhd-blog-grid-wrap {
	padding-top: 2rem;
	max-width: 1140px;
}

.hhd-blog-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

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

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

/* ── Post card ────────────────────────────────────────────────────────────── */

.hhd-blog-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.hhd-blog-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
	transform: translateY(-2px);
}

.hhd-blog-card__img-wrap {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f4f4f4;
}

.hhd-blog-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.hhd-blog-card:hover .hhd-blog-card__img {
	transform: scale(1.04);
}

.hhd-blog-card__no-img {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.hhd-blog-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1rem 1.125rem 1.125rem;
	gap: 0.35rem;
}

.hhd-blog-card__cat {
	font-size: 0.73rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--paletteColor1, #2e7d32);
	text-decoration: none;
}

.hhd-blog-card__cat:hover {
	text-decoration: underline;
}

.hhd-blog-card__title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.35;
}

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

.hhd-blog-card__title a:hover {
	color: var(--paletteColor1, #2e7d32);
}

.hhd-blog-card__excerpt {
	font-size: 0.875rem;
	color: #555;
	line-height: 1.5;
	margin: 0.1rem 0 0;
	flex: 1;
}

.hhd-blog-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.75rem;
	gap: 0.5rem;
}

.hhd-blog-card__date {
	font-size: 0.78rem;
	color: #888;
}

.hhd-blog-card__read {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--paletteColor1, #2e7d32);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.hhd-blog-card__read:hover {
	text-decoration: underline;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */

.hhd-blog-grid-wrap .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 2.5rem;
}

.hhd-blog-grid-wrap .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	border-radius: 4px;
	border: 1px solid #ddd;
	font-size: 0.875rem;
	font-weight: 600;
	color: #333;
	text-decoration: none;
	background: #fff;
	transition: background 0.15s ease, color 0.15s ease;
}

.hhd-blog-grid-wrap .page-numbers:hover,
.hhd-blog-grid-wrap .page-numbers.current {
	background: var(--paletteColor1, #2e7d32);
	color: #fff;
	border-color: transparent;
}

.hhd-blog-no-posts {
	padding: 2rem 0;
	color: #666;
	font-size: 1rem;
}

/* ==========================================================================
   Single blog post
   ========================================================================== */

.hhd-single-post {
	padding-bottom: 4rem;
}

/* ── Hero — full-width image with gradient overlay ────────────────────────── */

.hhd-single-post__hero {
	position: relative;
	width: 100%;
	min-height: 260px;
	max-height: 520px;
	aspect-ratio: 21 / 9;
	overflow: hidden;
	background: var(--paletteColor1, #2e7d32);
	display: flex;
	align-items: flex-end;
}

.hhd-single-post__hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	z-index: 0;
}

.hhd-single-post__hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.15) 45%,
		rgba(0, 0, 0, 0.72) 100%
	);
}

/* No image: lighter overlay so text still reads on the green bg */
.hhd-single-post__hero:not(.has-image) .hhd-single-post__hero-overlay {
	background: rgba(0, 0, 0, 0.25);
}

.hhd-single-post__hero-content {
	position: relative;
	z-index: 2;
	padding: 2rem 1.25rem;
	color: #fff;
	width: 100%;
	max-width: 860px;
}

@media (min-width: 600px) {
	.hhd-single-post__hero-content {
		padding: 2.5rem 2rem;
	}
}

.hhd-single-post__cat {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #fff;
	background: rgba(255, 255, 255, 0.22);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 3px;
	padding: 0.2em 0.65em;
	text-decoration: none;
	margin-bottom: 0.75rem;
	backdrop-filter: blur(4px);
}

.hhd-single-post__cat:hover {
	background: rgba(255, 255, 255, 0.32);
}

.hhd-single-post__title {
	font-size: clamp(1.4rem, 3.5vw, 2.25rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.625rem;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.hhd-single-post__meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.85);
}

.hhd-single-post__meta-sep {
	opacity: 0.6;
}

/* ── Post content ─────────────────────────────────────────────────────────── */

.hhd-single-post__content {
	max-width: 760px;
	padding-top: 2.25rem;
	font-size: 1.0625rem;
	line-height: 1.75;
	color: #222;
}

.hhd-single-post__content h2,
.hhd-single-post__content h3,
.hhd-single-post__content h4 {
	margin-top: 1.75rem;
	margin-bottom: 0.5rem;
	line-height: 1.3;
}

.hhd-single-post__content h2 { font-size: 1.4rem; }
.hhd-single-post__content h3 { font-size: 1.2rem; }
.hhd-single-post__content h4 { font-size: 1.05rem; }

.hhd-single-post__content p  { margin: 0 0 1rem; }
.hhd-single-post__content ul,
.hhd-single-post__content ol { margin: 0 0 1rem 1.5rem; }
.hhd-single-post__content li { margin-bottom: 0.35rem; }

.hhd-single-post__content a {
	color: var(--paletteColor1, #2e7d32);
	text-decoration: underline;
}

.hhd-single-post__content img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

/* ── Shop Popular strip ───────────────────────────────────────────────────── */

.hhd-single-post__strip {
	max-width: 760px;
	margin-top: 2.5rem;
}

/* ── Author box ───────────────────────────────────────────────────────────── */

.hhd-author-box {
	max-width: 760px;
	margin-top: 2.5rem;
	padding: 1.25rem;
	background: #f7f8fa;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	display: flex;
	gap: 1.125rem;
	align-items: flex-start;
}

.hhd-author-box__avatar {
	flex-shrink: 0;
}

.hhd-author-box__avatar-img,
.hhd-author-box__avatar img {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	background: #e0e0e0;
}

.hhd-author-box__info {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding-top: 0.1rem;
}

.hhd-author-box__label {
	font-size: 0.73rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #888;
	margin: 0;
}

.hhd-author-box__name {
	font-size: 1rem;
	font-weight: 700;
	color: #111;
	display: block;
}

.hhd-author-box__bio {
	font-size: 0.875rem;
	color: #555;
	line-height: 1.55;
	margin: 0.3rem 0 0;
}

/* ── Post navigation ──────────────────────────────────────────────────────── */

.hhd-single-post__nav {
	max-width: 760px;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e5e5e5;
}

.hhd-single-post__nav-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.hhd-single-post__nav-prev,
.hhd-single-post__nav-next {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-decoration: none;
	color: inherit;
}

.hhd-single-post__nav-next {
	text-align: right;
}

.hhd-single-post__nav-label {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--paletteColor1, #2e7d32);
}

.hhd-single-post__nav-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: #333;
	line-height: 1.35;
}

.hhd-single-post__nav-prev:hover .hhd-single-post__nav-title,
.hhd-single-post__nav-next:hover .hhd-single-post__nav-title {
	color: var(--paletteColor1, #2e7d32);
}

/* ── Back to blog ─────────────────────────────────────────────────────────── */

.hhd-single-post__back {
	max-width: 760px;
	margin-top: 2rem;
}

.hhd-single-post__back-link {
	font-size: 0.875rem;
	font-weight: 600;
	color: #555;
	text-decoration: none;
}

.hhd-single-post__back-link:hover {
	color: var(--paletteColor1, #2e7d32);
}

/* ── Author initial avatar ────────────────────────────────────────────────── */

.hhd-author-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--av-size, 72px);
	height: var(--av-size, 72px);
	border-radius: 50%;
	background: var(--av-bg, #2e7d32);
	color: #fff;
	font-size: calc(var(--av-size, 72px) * 0.42);
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
	user-select: none;
}

/* ── Author box link styles ───────────────────────────────────────────────── */

.hhd-author-box__avatar {
	text-decoration: none;
}

.hhd-author-box__name {
	text-decoration: none;
}

.hhd-author-box__name:hover strong,
.hhd-author-box__name:focus strong {
	color: var(--paletteColor1, #2e7d32);
}

.hhd-single-post__meta-author {
	color: inherit;
	text-decoration: none;
}

.hhd-single-post__meta-author:hover {
	text-decoration: underline;
}

/* ── Sub-category tabs ────────────────────────────────────────────────────── */

.hhd-blog-subtabs {
	background: #f4f4f4;
	border-bottom: 1px solid #ddd;
}

.hhd-blog-subtabs__inner {
	display: flex;
	align-items: center;
	gap: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 0;
}

.hhd-blog-subtabs__inner::-webkit-scrollbar {
	display: none;
}

.hhd-blog-subtabs__tab {
	flex-shrink: 0;
	padding: 0.55rem 1.1rem;
	font-size: 0.82rem;
	font-weight: 600;
	color: #555;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
	transition: color 0.15s, border-color 0.15s;
}

.hhd-blog-subtabs__tab:hover {
	color: var(--paletteColor1, #2e7d32);
}

.hhd-blog-subtabs__tab.is-active {
	color: var(--paletteColor1, #2e7d32);
	border-bottom-color: var(--paletteColor1, #2e7d32);
}

/* ── Author archive page ──────────────────────────────────────────────────── */

.hhd-author-page__header {
	background: var(--paletteColor1, #2e7d32);
	padding: 3rem 0 2.5rem;
}

.hhd-author-page__header-inner {
	display: flex;
	align-items: flex-start;
	gap: 1.75rem;
}

.hhd-author-page__avatar-wrap {
	flex-shrink: 0;
}

.hhd-author-page__meta {
	color: #fff;
}

.hhd-author-page__name {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	color: #fff;
	margin: 0 0 0.25rem;
	line-height: 1.15;
}

.hhd-author-page__role {
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.75);
	margin: 0 0 0.75rem;
}

.hhd-author-page__bio {
	font-size: 0.95rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
	max-width: 600px;
}

.hhd-author-page__posts {
	padding-top: 2.5rem;
	padding-bottom: 3rem;
}

.hhd-author-page__posts-heading {
	font-size: 1.15rem;
	font-weight: 700;
	color: #333;
	margin: 0 0 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--paletteColor1, #2e7d32);
	display: inline-block;
}

@media (max-width: 600px) {
	.hhd-author-page__header-inner {
		flex-direction: column;
		gap: 1rem;
	}
}
