/* Black Antler Blocks — frontend styles. Colours pull from theme.json presets. */

.ba-section-heading {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--x-large, 2rem);
	margin: 0 0 var(--wp--preset--spacing--50, 1.5rem);
}

/* --- Buttons --- */
.ba-btn {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 600;
	text-decoration: none;
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	line-height: 1.2;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.ba-btn--accent {
	background: var(--wp--preset--color--accent, #ff9800);
	color: var(--wp--preset--color--hero, #1a202c);
}
.ba-btn--accent:hover {
	background: var(--wp--preset--color--warning, #f5a524);
	color: var(--wp--preset--color--hero, #1a202c);
}
.ba-btn--ghost {
	background: transparent;
	color: var(--wp--preset--color--base, #fff);
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}
.ba-btn--ghost:hover {
	color: var(--wp--preset--color--accent, #ff9800);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--accent, #ff9800);
}

/* --- Hero --- */
.ba-hero {
	padding: clamp(3rem, 8vw, 7rem) var(--wp--preset--spacing--50, 1.5rem);
}
.ba-hero--dark {
	background: var(--wp--preset--color--hero, #1a202c);
	color: var(--wp--preset--color--base, #fff);
}
.ba-hero--light {
	background: var(--wp--preset--color--base-2, #f2f2f2);
	color: var(--wp--preset--color--contrast, #333);
}
.ba-hero__inner {
	max-width: 760px;
	margin-inline: auto;
	text-align: center;
}
.ba-hero__heading {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 700;
	font-size: clamp(2.25rem, 1.4rem + 4vw, 4rem);
	line-height: 1.08;
	margin: 0 0 1rem;
}
.ba-hero__sub {
	font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
	opacity: 0.92;
	margin: 0 0 2rem;
}
.ba-hero__actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* --- Shared grids --- */
.ba-catgrid,
.ba-prodgrid {
	padding-block: clamp(2.5rem, 5vw, 4rem);
}
.ba-catgrid__grid,
.ba-prodgrid__grid {
	display: grid;
	grid-template-columns: repeat(var(--ba-cols, 3), minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* --- Category tile --- */
.ba-cattile {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--wp--preset--color--contrast, #333);
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--base-3, #ededed);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ba-cattile:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(26, 32, 44, 0.14);
}
.ba-cattile__media {
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--base-2, #f2f2f2);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.ba-cattile__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ba-cattile__placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--wp--preset--color--base-2, #f2f2f2), var(--wp--preset--color--base-3, #ededed));
}
.ba-cattile__title {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 600;
	padding: 1rem 1rem 0.25rem;
}
.ba-cattile__count {
	font-size: 0.85rem;
	color: var(--wp--preset--color--contrast-3, #718096);
	padding: 0 1rem 1rem;
}

/* --- Product card --- */
.ba-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--base-3, #ededed);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ba-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(26, 32, 44, 0.14);
}
.ba-card__media {
	aspect-ratio: 1 / 1;
	background: var(--wp--preset--color--base-2, #f2f2f2);
	display: block;
}
.ba-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ba-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
}
.ba-card__title {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 600;
	color: var(--wp--preset--color--contrast, #333);
	text-decoration: none;
	line-height: 1.3;
}
.ba-card__title:hover {
	color: var(--wp--preset--color--info, #1159af);
}
.ba-card__price {
	font-weight: 700;
	color: var(--wp--preset--color--contrast, #333);
}
.ba-card__price ins {
	text-decoration: none;
	color: var(--wp--preset--color--danger, #b82105);
}
.ba-card__price del {
	color: var(--wp--preset--color--contrast-3, #718096);
	font-weight: 400;
	margin-inline-end: 0.4rem;
}
.ba-card__cta {
	margin-top: auto;
	text-align: center;
}

/* --- Stock pill --- */
.ba-stock-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	align-self: flex-start;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
}
.ba-stock-pill::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: currentColor;
}
.ba-stock-pill--success { color: var(--wp--preset--color--success, #13612e); background: rgba(19, 97, 46, 0.1); }
.ba-stock-pill--warning { color: var(--wp--preset--color--danger, #b82105); background: rgba(245, 165, 36, 0.18); }
.ba-stock-pill--danger  { color: var(--wp--preset--color--danger, #b82105); background: rgba(184, 33, 5, 0.1); }

/* --- Archive grid: force 3 columns (override Woo flex), responsive --- */
.wp-block-woocommerce-product-collection .wc-block-product-template,
.wp-block-woocommerce-product-collection .wc-block-product-template.is-flex-container {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50, 1.5rem);
}
@media (max-width: 1024px) {
	.wp-block-woocommerce-product-collection .wc-block-product-template,
	.wp-block-woocommerce-product-collection .wc-block-product-template.is-flex-container {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 520px) {
	.wp-block-woocommerce-product-collection .wc-block-product-template,
	.wp-block-woocommerce-product-collection .wc-block-product-template.is-flex-container {
		grid-template-columns: 1fr;
	}
}

/* --- Price filter: keep it compact (was rendering oversized) --- */
.ba-filters .wp-block-woocommerce-product-filter-price,
.ba-shop-filters .wp-block-woocommerce-product-filter-price {
	font-size: 0.85rem;
}
.ba-filters .wp-block-woocommerce-product-filter-price input,
.ba-shop-filters .wp-block-woocommerce-product-filter-price input {
	max-width: 5.5rem;
	padding: 0.3rem 0.45rem;
	font-size: 0.85rem;
}
.ba-filters .wc-block-components-price-slider,
.ba-shop-filters .wc-block-components-price-slider {
	margin: 0.5rem 0 0;
}
.ba-filters .wc-block-components-price-slider__range,
.ba-shop-filters .wc-block-components-price-slider__range {
	min-height: 1rem;
}

/* --- Archive product cards (product-collection) — match homepage card look --- */
.wp-block-woocommerce-product-collection .wc-block-product {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--base-3, #ededed);
	border-radius: 12px;
	padding: 0.85rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wp-block-woocommerce-product-collection .wc-block-product:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(26, 32, 44, 0.14);
}
.wp-block-woocommerce-product-collection .wc-block-product img {
	border-radius: 8px;
}
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-post-title {
	margin: 0.35rem 0 0;
	line-height: 1.3;
}
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-post-title a {
	color: var(--wp--preset--color--contrast, #333);
	text-decoration: none;
}
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-post-title a:hover {
	color: var(--wp--preset--color--info, #1159af);
}
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-woocommerce-product-button {
	margin-top: auto;
}
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link,
.wp-block-woocommerce-product-collection .wc-block-product .wc-block-components-product-button .wp-block-button__link {
	display: block;
	text-align: center;
	width: 100%;
	background: var(--wp--preset--color--accent, #ff9800);
	color: var(--wp--preset--color--hero, #1a202c);
	border-radius: 6px;
}
.wp-block-woocommerce-product-collection .wc-block-product .wp-block-woocommerce-product-button .wp-block-button__link:hover {
	background: var(--wp--preset--color--warning, #f5a524);
}
/* Stock indicator → pill, matching homepage */
.wc-block-components-product-stock-indicator {
	align-self: flex-start;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.18rem 0.55rem;
	border-radius: 999px;
}
.wc-block-components-product-stock-indicator--in-stock {
	color: var(--wp--preset--color--success, #13612e);
	background: rgba(19, 97, 46, 0.1);
}
.wc-block-components-product-stock-indicator--low-stock {
	color: var(--wp--preset--color--danger, #b82105);
	background: rgba(245, 165, 36, 0.18);
}
.wc-block-components-product-stock-indicator--out-of-stock {
	color: var(--wp--preset--color--danger, #b82105);
	background: rgba(184, 33, 5, 0.1);
}

/* --- Hero carousel --- */
.ba-carousel {
	position: relative;
	overflow: hidden;
}
.ba-carousel__track {
	display: flex;
	transition: transform 0.5s cubic-bezier( 0.4, 0, 0.2, 1 );
}
.ba-carousel__slide {
	position: relative;
	flex: 0 0 100%;
	min-width: 100%;
	min-height: clamp( 360px, 52vw, 620px );
	display: flex;
	align-items: center;
	background: var(--wp--preset--color--hero, #1a202c);
	background-size: cover;
	background-position: center;
	padding: clamp( 2.5rem, 6vw, 6rem ) var(--wp--preset--spacing--50, 1.5rem );
}
.ba-carousel__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient( 90deg, rgba(26,32,44,0.9) 0%, rgba(26,32,44,0.65) 50%, rgba(26,32,44,0.4) 100% );
}
.ba-carousel__slide.is-dark .ba-carousel__overlay {
	background: radial-gradient( circle at 22% 50%, rgba(255,152,0,0.12), transparent 60% );
}
.ba-carousel__content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1320px;
	margin-inline: auto;
	color: #fff;
}
.ba-carousel__eyebrow {
	text-transform: uppercase;
	letter-spacing: 2px;
	font-weight: 700;
	font-size: 0.8rem;
	color: var(--wp--preset--color--accent, #ff9800);
	margin: 0 0 0.6rem;
}
.ba-carousel__heading {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 700;
	font-size: clamp( 2.25rem, 1.5rem + 4vw, 4.25rem );
	line-height: 1.05;
	margin: 0 0 0.85rem;
	max-width: 720px;
}
.ba-carousel__sub {
	font-size: clamp( 1rem, 0.9rem + 0.5vw, 1.25rem );
	opacity: 0.92;
	margin: 0 0 1.75rem;
	max-width: 560px;
}
.ba-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 2;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.15 );
	color: #fff;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	backdrop-filter: blur( 4px );
	transition: background 0.15s ease;
}
.ba-carousel__arrow:hover {
	background: var(--wp--preset--color--accent, #ff9800);
	color: var(--wp--preset--color--hero, #1a202c);
}
.ba-carousel__arrow--prev { left: 1rem; }
.ba-carousel__arrow--next { right: 1rem; }
.ba-carousel__dots {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	transform: translateX( -50% );
	z-index: 2;
	display: flex;
	gap: 0.5rem;
}
.ba-carousel__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	background: rgba( 255, 255, 255, 0.4 );
	cursor: pointer;
	transition: background 0.15s ease, width 0.15s ease;
}
.ba-carousel__dot.is-active {
	background: var(--wp--preset--color--accent, #ff9800);
	width: 26px;
	border-radius: 6px;
}
@media (max-width: 600px) {
	.ba-carousel__arrow { display: none; }
}

/* --- Blog grid --- */
.ba-bloggrid {
	padding-block: clamp(2.5rem, 5vw, 4rem);
}
.ba-bloggrid__grid {
	display: grid;
	grid-template-columns: repeat(var(--ba-cols, 3), minmax(0, 1fr));
	gap: var(--wp--preset--spacing--60, 2rem);
}
.ba-post-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid var(--wp--preset--color--base-3, #ededed);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ba-post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(26, 32, 44, 0.14);
}
.ba-post-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--base-2, #f2f2f2);
}
.ba-post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ba-post-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--wp--preset--color--hero, #1a202c), var(--wp--preset--color--hero-2, #2d3748));
}
.ba-post-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.25rem;
}
.ba-post-card__cat {
	align-self: flex-start;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--wp--preset--color--accent, #ff9800);
	text-decoration: none;
}
.ba-post-card__title {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast, #333);
	text-decoration: none;
}
.ba-post-card__title:hover {
	color: var(--wp--preset--color--info, #1159af);
}
.ba-post-card__excerpt {
	margin: 0;
	color: var(--wp--preset--color--contrast-2, #4a5568);
	font-size: 0.95rem;
	line-height: 1.6;
}
.ba-post-card__date {
	font-size: 0.8rem;
	color: var(--wp--preset--color--contrast-3, #718096);
}
@media (max-width: 781px) {
	.ba-bloggrid__grid {
		grid-template-columns: 1fr;
	}
}

/* --- Brand banner (brand archive hero) --- */
.ba-brandbanner {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 420px;
	padding: clamp(3rem, 7vw, 6rem) var(--wp--preset--spacing--50, 1.5rem);
	background: var(--wp--preset--color--hero, #1a202c);
	background-size: cover;
	background-position: center;
	color: var(--wp--preset--color--base, #fff);
	overflow: hidden;
}
.ba-brandbanner--placeholder {
	min-height: 280px;
}
.ba-brandbanner__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient( 90deg, rgba(26, 32, 44, 0.92) 0%, rgba(26, 32, 44, 0.7) 55%, rgba(26, 32, 44, 0.45) 100% );
}
.ba-brandbanner--dark .ba-brandbanner__overlay {
	background: radial-gradient( circle at 20% 50%, rgba(255, 152, 0, 0.12), transparent 60% );
}
.ba-brandbanner__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1320px;
	margin-inline: auto;
}
.ba-brandbanner__logo {
	display: inline-flex;
	background: #fff;
	padding: 0.85rem 1.1rem;
	border-radius: 12px;
	margin-bottom: 1.25rem;
}
.ba-brandbanner__logo img {
	max-height: 56px;
	width: auto;
	display: block;
}
.ba-brandbanner__eyebrow {
	text-transform: uppercase;
	letter-spacing: 2px;
	font-weight: 700;
	font-size: 0.8rem;
	color: var(--wp--preset--color--accent, #ff9800);
	margin: 0 0 0.5rem;
}
.ba-brandbanner__name {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-weight: 700;
	font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);
	line-height: 1.05;
	margin: 0 0 0.75rem;
	color: #fff;
}
.ba-brandbanner__tagline {
	max-width: 620px;
	font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
	opacity: 0.92;
	margin: 0 0 1.5rem;
}
.ba-brandbanner__meta {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}
.ba-brandbanner__count {
	font-weight: 600;
	color: var(--wp--preset--color--base-2, #f2f2f2);
}

/* --- Brand archive editorial body --- */
.ba-brand-story {
	max-width: 820px;
	margin-inline: auto;
}
.ba-brand-story p {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--wp--preset--color--contrast-2, #4a5568);
}

/* --- Mobile --- */
@media (max-width: 781px) {
	.ba-catgrid__grid,
	.ba-prodgrid__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 480px) {
	.ba-prodgrid__grid {
		grid-template-columns: 1fr;
	}
}
