/**
 * Category Featured — scoped to .bje-cf so nothing here leaks into the
 * rest of the (Woodmart) site. Colors are CSS custom properties on the
 * section wrapper only — override them from a child theme/Woodmart
 * custom CSS if you want a different palette, no need to edit this file.
 */
.bje-cf {
	--bje-gold: #d9a441;
	--bje-gold-soft: #e8c268;
	--bje-gold-bright: #f0d573;
	--bje-cream: #f4e6c8;
	--bje-cream-light: #faefd6;
	--bje-brown: #2e1608;
	--bje-brown-2: #3a2408;
	--bje-amber: #b07423;
	--bje-radius: 8px;

	background: linear-gradient(180deg, var(--bje-cream-light), var(--bje-cream));
	padding: 30px 0;
	overflow-x: hidden;
}
.bje-cf-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}
.bje-cf * { box-sizing: border-box; }

/* Section heading */
.bje-cf-head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 0 0 26px;
	flex-wrap: wrap;
}
.bje-cf-head h2 {
	font-size: clamp(19px, 2.4vw, 24px);
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bje-brown);
	text-align: center;
	margin: 0;
}
.bje-cf-rule { height: 1px; width: 56px; background: var(--bje-gold); }
.bje-cf-star { color: var(--bje-gold); font-size: 14px; }

/* Row: full-width header bar on top, carousel below */
.bje-cf-row { margin-bottom: 22px; }
.bje-cf-row:last-child { margin-bottom: 0; }

.bje-cf-row-header {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	background-color: var(--bje-cream-light);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border: 1px solid var(--bje-gold);
	border-radius: var(--bje-radius);
	padding: 5px 18px;
	margin-bottom: 14px;
	text-decoration: none;
	overflow: hidden;
	transition: box-shadow .25s ease;
}
.bje-cf-row-header:hover { box-shadow: 0 6px 18px rgba(150, 110, 40, .18); }

/* When a header background image is set (with or without the badge/name
   overlaid on top), the aspect-ratio is set inline per row (render.php
   reads each image's own real dimensions) instead of one fixed ratio
   here — different rows can upload differently shaped images, and
   forcing one shared ratio makes background-size:cover crop/zoom
   mismatched images aggressively. This class just switches off any
   fixed height so the inline aspect-ratio can take over. Flex/
   align-items are inherited from .bje-cf-row-header so any overlaid
   content still centers correctly in the resulting box. */
.bje-cf-row-header-bg { height: auto; }

/* Desktop-only crop override for this specific row's image (2118px
   wide) — shorter than its native 2118/146 ratio, so the box sits a
   bit less tall on desktop. !important is required since the ratio is
   otherwise set inline per-row by PHP (see render.php), which normal
   stylesheet specificity can't beat. NOTE: since this is pinned to a
   2118px-wide image specifically, re-check this value if a differently
   sized image ever replaces it. */
@media (min-width: 761px) {
	.bje-cf-row-header-bg { aspect-ratio: 2118 / 115 !important; }
}

.bje-cf-badge {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
	background: var(--bje-cream);
	border: 2px solid var(--bje-gold);
	color: var(--bje-gold);
	font-size: 13px;
	font-weight: 700;
}
.bje-cf-row-lotus { flex: 0 0 auto; color: var(--bje-gold); }
.bje-cf-row-name {
	flex: 0 0 auto;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--bje-brown);
	white-space: nowrap;
}
.bje-cf-row-rule {
	flex: 1;
	min-width: 24px;
	height: 0;
	border-top: 1px dashed var(--bje-gold);
	margin: 0 6px;
}
.bje-cf-row-link {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--bje-amber);
	white-space: nowrap;
}
.bje-cf-row-header:hover .bje-cf-row-link { color: var(--bje-gold); }
.bje-cf-row-link svg {
	border: 1px solid var(--bje-gold);
	border-radius: 50%;
	padding: 3px;
	box-sizing: content-box;
}

/* Carousel — nav buttons float over the track's left/right edges
   (over the first/last product card) instead of taking their own
   column, so the product cards get the extra width. */
.bje-cf-carousel { position: relative; width: 100%; }
.bje-cf-viewport { width: 100%; overflow: hidden; }
.bje-cf-track {
	display: flex;
	width: 100%;
	min-width: 0;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	scroll-behavior: smooth;
	padding: 2px 0;
}
.bje-cf-track::-webkit-scrollbar { display: none; }
.bje-cf-track:focus-visible { outline: 2px solid var(--bje-gold); outline-offset: 3px; }

/* !important throughout: Woodmart ships a global reset targeting every
   <button> on the site — :is(.btn,.button,button,[type=submit],[type=button])
   — which has the exact same specificity as a plain .bje-cf-nav class
   selector. Depending on stylesheet load order that reset can win,
   stomping position:absolute (buttons fall into normal flow instead of
   overlaying the carousel edges) and border-radius (circle becomes a
   plain square). !important makes this rule win unconditionally
   regardless of where Woodmart's CSS loads. */
.bje-cf-nav {
	position: absolute !important;
	top: 50% !important;
	left: auto;
	right: auto;
	z-index: 2 !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	max-width: 34px !important;
	max-height: 34px !important;
	margin: 0 !important;
	padding: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	box-sizing: border-box !important;
	line-height: 1 !important;
	font-size: 0 !important;
	border-radius: 50% !important;
	background: var(--bje-cream-light) !important;
	border: 1px solid var(--bje-gold) !important;
	color: var(--bje-amber) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0 !important;
	outline: none !important;
	box-shadow: 0 2px 10px rgba(150, 110, 40, .25);
	transition: background .2s ease, color .2s ease, transform .15s ease;
	transform: translateY(-50%);
}
.bje-cf-prev { left: 4px; }
.bje-cf-next { right: 4px; }
.bje-cf-nav:hover { background: var(--bje-gold); color: #fff; transform: translateY(-50%) scale(1.06); }
.bje-cf-nav:active { transform: translateY(-50%) scale(.92); }

/* Product cards */
.bje-cf-card {
	flex: 0 0 auto;
	scroll-snap-align: start;
	text-align: center;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #d9ad66;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 3px 10px rgba(150, 110, 40, .12);
	transition: transform .3s ease, box-shadow .3s ease;
	width: calc((100% - (var(--bje-cf-visible, 4) - 1) * 14px) / var(--bje-cf-visible, 4) - 1px);
}
.bje-cf-card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(150, 110, 40, .28); }
.bje-cf-card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 1 / 1; background: #f7efdd; }
.bje-cf-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bje-cf-card:hover .bje-cf-card-media img { transform: scale(1.07); }
.bje-cf-sale-flag {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #a8261e;
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 3px;
}
.bje-cf-card-wish {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: var(--bje-amber);
	display: flex;
	align-items: center;
	justify-content: center;
}
.bje-cf-card-body { padding: 10px 10px 12px; text-align: center; flex: 1; }
.bje-cf-card-name { display: block; font-size: 12.5px; font-weight: 500; color: var(--bje-brown-2); line-height: 1.35; min-height: 34px; }
.bje-cf-card:hover .bje-cf-card-name { color: var(--bje-amber); }
.bje-cf-card-price { font-size: 13.5px; font-weight: 700; color: var(--bje-amber); margin-top: 4px; display: block; }
.bje-cf-card-price del { opacity: .55; font-weight: 500; margin-right: 5px; }
.bje-cf-card-price ins { text-decoration: none; }

@media (max-width: 1080px) {
	.bje-cf-card { width: calc((100% - (var(--bje-cf-visible-tablet, 3) - 1) * 14px) / var(--bje-cf-visible-tablet, 3) - 1px); }
}
@media (max-width: 760px) {
	/* Wrap onto two lines instead of squeezing everything (and hiding
	   the lotus, shrinking the link to just an icon) onto one thin,
	   hard-to-read line: badge + lotus + name on line 1, the dashed
	   rule dropped, "View Collection" right-aligned on line 2. */
	.bje-cf-row-header {
		flex-wrap: wrap;
		padding: 12px 16px;
		gap: 10px 10px;
	}
	.bje-cf-badge { width: 34px; height: 34px; font-size: 13px; }
	.bje-cf-row-lotus { width: 18px; height: 18px; }
	.bje-cf-row-name { font-size: 16px; line-height: 1.25; flex: 1; min-width: 0; white-space: normal; }
	.bje-cf-row-rule { display: none; }
	.bje-cf-row-link { width: 100%; justify-content: flex-end; font-size: 13px; }
	.bje-cf-row-link svg { padding: 3px; width: 13px; height: 13px; }

	.bje-cf-nav { width: 28px !important; height: 28px !important; min-width: 28px !important; min-height: 28px !important; max-width: 28px !important; max-height: 28px !important; }
	.bje-cf-card { width: calc((100% - (var(--bje-cf-visible-mobile, 2) - 1) * 10px) / var(--bje-cf-visible-mobile, 2) - 1px); }
	/* Push the first/last card clear of the overlaid nav buttons so
	   their border isn't hidden underneath — a small one-time offset,
	   doesn't affect the per-card width formula above. */
	.bje-cf-card:first-child { margin-left: 40px; }
	.bje-cf-card:last-child { margin-right: 40px; }
}
