/* Card model: cards become equal-height flex columns. */
.kkh-card {
	display: flex;
	flex-direction: column;
}

/* Product price in a kkh card: terracotta, so it reads apart from the
   green title links beside it. */
.kkh-card .kkh-product-price {
	margin: 0;
	text-align: center;
	color: var(--wp--preset--color--secondary);
	font-weight: 600;
}

.kkh-card .kkh-product-price del {
	opacity: 0.55;
	font-weight: 400;
}

.kkh-card .wp-block-post-featured-image,
.kkh-card img {
	width: 100%;
}

/* Book cards: a bookshop-window card. The cover rests on a panel washed
   in the brand green and gold; the button pins to the bottom and spans
   the card so equal-height cards line up. */
.kkh-card-book {
	position: relative;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kkh-card-book:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(43, 33, 25, 0.12);
}

.kkh-card-book > * {
	flex-shrink: 0;
}

.kkh-card-book .wp-block-post-featured-image {
	background: linear-gradient(165deg, rgba(47, 92, 69, 0.10), rgba(201, 154, 46, 0.16));
	border-radius: var(--wp--preset--border-radius--sm);
	padding: var(--wp--preset--spacing--30);
}

.kkh-card-book .wp-block-post-featured-image img {
	width: auto;
	max-width: 100%;
	margin: 0 auto;
	box-shadow: 0 10px 24px rgba(43, 33, 25, 0.26);
}

.kkh-book-facts {
	row-gap: 0.25rem;
	column-gap: 1rem;
	justify-content: center;
}

.kkh-card-book .kkh-meta-line {
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.kkh-card-book .wp-block-post-excerpt {
	margin-bottom: 0;
}

/* A fixed gap, never auto: on the tallest card an auto margin collapses
   to zero and the button rides into the excerpt text. */
.kkh-card-book .wp-block-buttons {
	margin-top: 0.75rem;
}

.kkh-card-book .wp-block-button__link {
	width: 100%;
}

/* Grid card sections collapse on smaller screens. */
@media (max-width: 781px) {
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr;
	}
}

/* Featured products: two columns on phones — the extra classes out-rank
   the block library's own ≤600px one-column collapse for this grid. */
@media (max-width: 781px) {
	.kkh-products-grid.wp-block-post-template[class].is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.kkh-products-grid .wp-block-button__link {
		padding: 0.4rem 0.75rem;
		font-size: 0.8125rem;
		white-space: nowrap;
	}
}

/* The inquiry button spans the card: core renders the wrapper block and
   the inner button div shrinks to its label, so the div must be widened
   for the anchor's 100% to mean the card. */
.kkh-products-grid .wp-block-buttons {
	text-align: center;
}

.kkh-products-grid .wp-block-button {
	width: 100%;
}

.kkh-products-grid .wp-block-button__link {
	width: 100%;
}

/* Homepage sections: top/bottom padding lives here because WordPress
   drops top/bottom-only padding declared in markup on root-level groups. */
.kkh-section {
	padding-bottom: var(--wp--preset--spacing--40);
}

/* Hide whole homepage sections that have no content yet. */
.kkh-section:has(.kkh-empty-state) {
	display: none;
}

/* CTA band: cream text on green, filled and outline cream buttons. */
.kkh-cta h2,
.kkh-cta p {
	color: var(--wp--preset--color--background);
}

.kkh-cta .wp-block-button__link {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--primary);
}

.kkh-cta .wp-block-button__link:hover,
.kkh-cta .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--background);
}

.kkh-cta .is-style-outline .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--wp--preset--color--background);
	color: var(--wp--preset--color--background);
}

.kkh-cta .is-style-outline .wp-block-button__link:hover,
.kkh-cta .is-style-outline .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--primary);
}

/* Single event title: wraps over multiple lines, so roomier leading. */
.kkh-single-event .wp-block-post-title {
	line-height: 1.5;
}

/* Single book: long titles (Burmese especially) wrap over several lines,
   so every heading level on the page gets roomier leading too. */
.kkh-single-book h1,
.kkh-single-book h2,
.kkh-single-book h3,
.kkh-single-book h4,
.kkh-single-book h5,
.kkh-single-book h6 {
	line-height: 1.6;
}

/* Single book / event meta rows. */
.kkh-meta-line {
	display: block;
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.kkh-meta-list .kkh-meta-line {
	color: var(--wp--preset--color--ink);
}

.kkh-meta-line .kkh-meta-label {
	color: var(--wp--preset--color--muted);
}

/* Fact-sheet icons; the negative offset keeps the glyph on the optical
   baseline of the text. */
.kkh-meta-icon {
	margin-right: 0.375rem;
}

.kkh-meta-icon svg {
	width: 0.9375rem;
	height: 0.9375rem;
	vertical-align: -0.15em;
	color: var(--wp--preset--color--primary);
}

/* Featured photos get the small radius everywhere; the template's
   border-radius attribute is dropped for this block, so the rounding
   lives here. */
.wp-block-post-featured-image {
	overflow: hidden;
	border-radius: var(--wp--preset--border-radius--sm);
}