/**
 * Front page only: announcement bar, brand mark, hero placeholder,
 * featured-product rows and gallery strip. Product card basics (image
 * ratio, price colour, button) come from shop.css, loaded as a dependency.
 */

.tb-brand {
	text-align: center;
	padding: 3.2rem 1.5rem 2.6rem;
	max-width: none;
}
.tb-brand-title,
.tb-brand-title a {
	font-size: clamp(2.4rem, 6vw, 4.2rem) !important;
	font-weight: 600;
}
.tb-brand-address {
	margin-top: 0.6rem !important;
}

.tb-hero-banner {
	width: 100%;
	max-width: none;
	aspect-ratio: 16 / 7;
	background: var(--wp--preset--color--oatmilk-dim);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	/* At the 16:7 ratio, the banner's own natural height (aspect-ratio x
	current width) grows well past what makes sense as a page opener on a
	wide desktop monitor, so it's capped — but only there; on a narrow
	phone that natural height is already short, so a flat cap would do
	nothing useful and isn't worth the complexity. --t is a 0-1 ratio of
	how far the current viewport width sits between 350px and 1800px
	(clamp()'d flat outside that range), squared so the blend eases in —
	the cap barely touches anything through phone/tablet/laptop widths
	and only really bites as it approaches 1800px, rather than a linear
	ramp that would start visibly shrinking the banner at ordinary laptop
	widths nobody complained about. Blends max-height from "the natural
	aspect-ratio height" (no visible cap at all, i.e. effectively auto)
	up to 25vh, so there's one smooth scale rather than a jump at some
	arbitrary breakpoint. Dividing two lengths (a length range by another
	length range) to get a plain 0-1 number is valid CSS calc() —
	confirmed directly against this environment's browser engine, not
	just against the spec. */
	--t: clamp(0, (100vw - 350px) / (1800px - 350px), 1);
	max-height: calc(43.75vw + (25vh - 43.75vw) * var(--t) * var(--t));
}
.tb-hero-banner .wp-block-image,
.tb-hero-banner img {
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.tb-section {
	padding: 4rem clamp(1.2rem, 4vw, 3rem) 0.5rem;
	max-width: none;
}
.tb-section-head {
	text-align: center;
	margin-bottom: 2.2rem;
	max-width: none;
}
.tb-section-head h2 {
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	font-weight: 500;
	font-style: italic;
}
.tb-section-head-underline {
	font-style: normal !important;
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--apricot);
	text-underline-offset: 8px;
}

/* Latest-releases grid: card design itself (.tb-shop-card and friends) is
shared with the shop archive grid — see shop.css, loaded here as a
dependency (inc/enqueue.php) specifically so the two stay identical. Only
this section's own layout (narrower, 2-column, centred) is home-specific. */
.tb-feature-grid .wc-block-product-template {
	max-width: 920px;
	margin: 0 auto;
	gap: 1rem;
}

/* "More from us" horizontal scroll row. WooCommerce's own block styles put
`.wc-block-product-template` in a two-class ".is-flex-container.is-flex-
container" selector that wins the specificity tie against a single-class
override, and set flex-wrap: wrap — that's what was silently turning this
into a wrapping grid instead of a scroller, so both need !important here. */
.tb-carousel-wrap {
	position: relative;
	max-width: 1100px;
	margin: 0 auto;
}
.tb-carousel .wc-block-product-template {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 1rem;
	overflow-x: auto;
	padding-bottom: 0.6rem;
	scrollbar-width: none;
}
.tb-carousel .wc-block-product-template::-webkit-scrollbar {
	display: none;
}
.tb-carousel .wc-block-product-template > li {
	flex: 0 0 220px !important;
	width: 220px !important;
}
.tb-carousel-next,
.tb-carousel-prev {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--wp--preset--color--juniper);
	color: var(--wp--preset--color--oatmilk);
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	cursor: pointer;
	font-size: 1.1rem;
}
.tb-carousel-next {
	right: -8px;
}
.tb-carousel-prev {
	left: -8px;
}
.tb-carousel-card {
	position: relative;
	aspect-ratio: 3 / 3.8;
	background: var(--wp--preset--color--oatmilk-dim);
	border: 1px solid var(--wp--preset--color--juniper-line);
	overflow: hidden;
}
/* Padding lives on the wrapper only, not the img too — the two used to
carry the same 1.2rem padding each, compounding into ~2.4rem of empty
space on every edge and making the bottle look tiny inside its card. */
.tb-carousel-card .wc-block-components-product-image {
	height: 100%;
	padding: 0.5rem;
}
.tb-carousel-card .wc-block-components-product-image img {
	height: 100%;
	width: 100%;
	object-fit: contain;
}
.tb-carousel-hover {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0.9rem 1rem 1rem;
	background: linear-gradient(to top, rgba(30, 43, 37, 0.92), rgba(30, 43, 37, 0));
	color: var(--wp--preset--color--oatmilk);
}
.tb-carousel-hover .tb-product-name {
	font-size: 0.92rem;
	font-weight: 500;
	margin: 0;
}
.tb-carousel-hover .tb-product-name a {
	color: inherit;
}
.tb-carousel-hover .tb-product-spec {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.64rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.8;
	margin: 0.15rem 0 0;
}
.tb-carousel-hover .tb-product-spec:empty {
	display: none;
}
.tb-carousel-hover .wc-block-components-product-summary {
	margin-top: 0.3rem;
	font-size: 0.7rem;
	line-height: 1.4;
	opacity: 0.85;
}

.tb-gallery-strip {
	width: 100%;
	max-width: none;
	margin-top: 4rem;
}
.tb-gallery-item {
	aspect-ratio: 3 / 4;
	background: var(--wp--preset--color--oatmilk-dim);
	overflow: hidden;
}
.tb-gallery-item .wp-block-image,
.tb-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

@media (max-width: 720px) {
	.tb-feature-grid .wc-block-product-template {
		grid-template-columns: 1fr !important;
	}
	.tb-gallery-strip {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}
