/*
 * Product Filter Grid - filter bar, grid and cards.
 *
 * Figma node 20725:11234 ("Our Products"). Every value below is read out of that
 * node, not invented:
 *
 *   filter row   horizontal, gap 16; pills radius 100px, padding 12px/24px,
 *                1px border, Inter Medium 18px/32px
 *   active pill  #DD9F49 fill, #020810 text (frame 20725:11240)
 *   idle pill    transparent fill, 1px #969FB7 border, #969FB7 text
 *   grid         3 columns, column gap 30, row gap 25
 *   card         420x412, radius 16px, image scaled to FILL, vertical gradient
 *                rgba(0,0,0,0) -> #000000 over it, content pushed to the bottom
 *                (justify-content flex-end / align-items flex-start), padding 32px
 *   card title   Literata Medium 28px/40px, #FFFFFF
 *
 * The kit tokens (--bc-*) are used with literal fallbacks so the widget keeps the
 * brand if the theme is switched. Every value is also a custom property so the
 * Elementor style controls can override it without fighting specificity.
 */

.bcp-products {
	--bcp-tab-color: #969fb7;
	--bcp-tab-border: #969fb7;
	--bcp-tab-active-bg: #dd9f49;
	--bcp-tab-active-color: #020810;
	--bcp-title-color: #ffffff;
	--bcp-gap-x: 30px;
	--bcp-gap-y: 25px;
	--bcp-card-radius: 1rem;
	--bcp-card-height: 25.75rem;
}

/* Head row (optional heading + "view all" link) */
.bcp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	margin-block-end: 1.5rem;
}

.bcp-heading {
	margin: 0;
	font-family: var(--bc-font-heading, Georgia, "Times New Roman", serif);
	font-weight: 400;
	font-size: clamp(1.75rem, 3vw, 3rem);
	line-height: 1.25;
	color: var(--bc-ink, #020810);
}

.bcp-viewall {
	font-family: var(--bc-font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
	font-size: 1rem;
	color: var(--bc-ink, #020810);
	text-decoration: none;
}

.bcp-viewall:hover {
	text-decoration: underline;
}

/* Filter bar - Figma gap 16 above the grid's 30px.
   The pills are centred: in Figma they sit in frame 20725:11239 (865 wide) inside a
   1320 frame whose counterAxisAlign is CENTER, so the row is centred as a group
   rather than starting at the left gutter. Wrapped lines centre too. */
.bcp-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin-block-end: 30px;
}

/* Pill - Figma frame 20725:11240: radius 100, padding 12/24, 1px border,
   inline-flex centred, Inter Medium 18px on a 32px line. */
.bcp-tab {
	appearance: none;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: 0.25rem;
	min-width: 0;
	padding: 0.75rem 1.5rem;
	border: 1px solid var(--bcp-tab-border);
	border-radius: 100px;
	background-color: transparent;
	color: var(--bcp-tab-color);
	font-family: var(--bc-font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
	font-weight: 500;
	font-size: 1.125rem;
	line-height: 2rem;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.bcp-tab.is-active {
	border-color: var(--bcp-tab-active-bg);
	background-color: var(--bcp-tab-active-bg);
	color: var(--bcp-tab-active-color);
}

/* Hover is not specified in Figma - this is the theme's own convention, kept so
   the pills stay in the brand's ink colour. */
.bcp-tab:not(.is-active):hover {
	border-color: var(--bc-ink, #020810);
	color: var(--bc-ink, #020810);
}

.bcp-tab:focus-visible {
	outline: 2px dashed currentColor;
	outline-offset: 3px;
	background-color: transparent;
}

.bcp-count {
	font-size: 0.875rem;
	opacity: 0.7;
}

/* Grid - 3 columns, 30px column gap, 25px row gap (Figma 20725:11252/11253). */
.bcp-grid {
	display: grid;
	grid-template-columns: repeat(var(--bcp-cols, 3), minmax(0, 1fr));
	gap: var(--bcp-gap-y) var(--bcp-gap-x);
}

@media (max-width: 1024px) {
	.bcp-grid {
		grid-template-columns: repeat(var(--bcp-cols-tablet, 2), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.bcp-grid {
		grid-template-columns: repeat(var(--bcp-cols-mobile, 1), minmax(0, 1fr));
	}
}

/* Card - the image is the card's background layer and the title sits on top.
   .bcp-card is the positioning context so the media fills it whether or not the
   card is wrapped in a link. */
.bcp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	min-width: 0;
	min-height: var(--bcp-card-height);
	margin: 0;
	padding: 2rem;
	border-radius: var(--bcp-card-radius);
	overflow: hidden;
	background-color: #1a1a1a;
}

.bcp-card.is-hidden {
	display: none;
}

.bcp-card__link {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	padding: 2rem;
	color: inherit;
	text-decoration: none;
}

.bcp-card__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.bcp-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Figma stack: IMAGE then GRADIENT_LINEAR, stops #000000 at 0 opacity -> #000000
   at 1 opacity, rotated so the fade runs to the bottom. Measured from the
   exported card: luma 10.7 at the bottom against 74 at the top. This is what
   keeps the white title legible over any photo. */
.bcp-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
}

/* Card title - Figma text node 20725:11256: Literata Medium 28px on a 40px line,
   #FFFFFF, margin 0. */
.bcp-card__title {
	position: relative;
	z-index: 1;
	margin: 0;
	font-family: var(--bc-font-heading, Georgia, "Times New Roman", serif);
	font-weight: 500;
	font-size: 1.75rem;
	line-height: 2.5rem;
	color: var(--bcp-title-color);
}

/* Figma's mobile variant of the same tile is 320px. */
@media (max-width: 767px) {
	.bcp-card {
		--bcp-card-height: 20rem;
	}
}

.bcp-empty {
	font-family: var(--bc-font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
	color: var(--bc-ink, #020810);
}
