/**
 * Products-by-category block ([bcs_products] + the Elementor widget).
 * Scoped under .bcs-pr; brand tokens come from assets/design/tokens.css.
 */

.bcs-pr {
	--bcs-pr-cols: 4;
	--bcs-pr-gap: 28px;
	font-family: var(--font-body, inherit);
	color: var(--fg-1, #1d1d1f);
	max-width: 1320px;
	margin: 0 auto;
	padding: 10px 20px 26px;
	box-sizing: border-box;
}

.bcs-pr * { box-sizing: border-box; }

/* Some themes reset [hidden]; the panes and arrows rely on it. */
.bcs-pr [hidden] { display: none !important; }

/* ---- section header ---- */
.bcs-pr-head { margin-bottom: 26px; }

.bcs-pr-title {
	font-family: var(--font-display, inherit);
	font-weight: 900;
	font-size: clamp(24px, 3vw, 34px);
	margin: 0 0 10px;
	line-height: 1.15;
}

.bcs-pr-rule { height: 6px; background: #ececef; border-radius: 3px; }

.bcs-pr-sub {
	margin: 12px 0 0;
	font-size: 15px;
	color: var(--fg-2, #3a3a3f);
}

/* ---- category bar ---- */
.bcs-pr-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
	position: relative;
	z-index: 3;
}

.bcs-pr-pick { position: relative; }

.bcs-pr-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
	cursor: pointer;
}

/**
 * The dropdown is built from <button> elements, so theme / Elementor-kit button
 * styles (`.elementor-kit-N button`, `body button`, …) otherwise paint them as
 * pills. Beat them on specificity and force the properties that matter — the
 * menu is meant to be plain text on no background.
 */
.bcs-pr .bcs-pr-toggle,
.bcs-pr .bcs-pr-opt {
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	font-family: inherit;
	font-weight: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	min-height: 0;
	width: auto;
	line-height: 1.35;
	transition: none;
}

.bcs-pr-current {
	font-family: var(--font-display, inherit);
	font-weight: 900;
	font-size: clamp(18px, 2.1vw, 23px);
	line-height: 1.2;
}

.bcs-pr-static { display: inline-block; padding: 4px 0; }

.bcs-pr-caret { font-size: 13px; opacity: .75; transition: transform .15s; }
.bcs-pr-toggle[aria-expanded="true"] .bcs-pr-caret { transform: rotate(180deg); }

/* Plain list — no panel, no fill. */
.bcs-pr-menu {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	min-width: 170px;
	margin: 0;
	padding: 2px 0 0;
	list-style: none;
	z-index: 20;
}

.bcs-pr-menu li { margin: 0; }

.bcs-pr .bcs-pr-opt {
	display: block;
	text-align: left;
	padding: 5px 0;
	font-size: 15.5px;
	cursor: pointer;
	white-space: nowrap;
}

.bcs-pr .bcs-pr-opt:hover,
.bcs-pr .bcs-pr-opt:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Current category: weight only, no highlight block. */
.bcs-pr .bcs-pr-opt.is-on { font-weight: 700 !important; }

.bcs-pr .bcs-pr-all {
	font-size: 14.5px;
	font-weight: 600;
	color: inherit;
	background: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

/* ---- carousel ---- */
.bcs-pr-rail { position: relative; }

.bcs-pr-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--bcs-pr-cols) - 1) * var(--bcs-pr-gap)) / var(--bcs-pr-cols));
	gap: var(--bcs-pr-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.bcs-pr-track::-webkit-scrollbar { display: none; }

/* Equal-height cards: the image sits at the top, price + button at the bottom,
   so every card in the row lines up no matter how long the text is. */
.bcs-pr-card {
	scroll-snap-align: start;
	min-width: 0;
	display: flex;
	flex-direction: column;
	/* Grid items stretch to the tallest card in the row by default, so the
	   auto margin below reliably pushes the buy block to the bottom. */
	align-self: stretch;
}

.bcs-pr-buy { margin-top: auto; padding-top: 10px; }

.bcs-pr-media {
	display: block;
	flex: none;
	aspect-ratio: 4 / 3;
	border-radius: var(--r-lg, 16px);
	overflow: hidden;
	background: #f2f2f4;
	box-shadow: var(--sh-card, 0 2px 10px rgba(17, 17, 17, .10));
}

.bcs-pr-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}

.bcs-pr-card:hover .bcs-pr-media img { transform: scale(1.04); }

/* Themes style h3 + links globally; keep the card typography ours, and clamp
   the text so a long title can't make one card taller than its neighbours. */
.bcs-pr .bcs-pr-name {
	margin: 14px 0 0 !important;
	font-family: inherit;
	font-size: 15.5px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: normal;
	text-transform: none;
	color: inherit !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bcs-pr .bcs-pr-name a {
	color: inherit !important;
	text-decoration: none !important;
	font: inherit;
}

.bcs-pr .bcs-pr-name a:hover { text-decoration: underline !important; }

.bcs-pr .bcs-pr-desc {
	margin: 6px 0 0 !important;
	font-size: 14px !important;
	line-height: 1.45 !important;
	color: var(--fg-3, #6b6b70) !important;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bcs-pr .bcs-pr-price {
	margin: 0 0 8px;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: inherit;
}

.bcs-pr-price del { font-weight: 400; opacity: .55; margin-right: 6px; }
.bcs-pr-price ins { text-decoration: none; }

/* ---- arrows ---- */
/* Also <button>s — pin the round look so theme button styles can't reshape them. */
.bcs-pr .bcs-pr-nav {
	background: rgba(255, 255, 255, .92) !important;
	border: 0 !important;
	border-radius: 50% !important;
	color: #1d1d1f !important;
	padding: 0 !important;
	min-height: 0;
	text-transform: none;
	letter-spacing: normal;
}

.bcs-pr-nav {
	position: absolute;
	/* Centred on the image, not the whole card — JS measures it. */
	top: var(--bcs-pr-navtop, 38%);
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, .92);
	box-shadow: var(--sh-pop, 0 8px 26px rgba(17, 17, 17, .16));
	color: #1d1d1f;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bcs-pr-nav:hover { background: #fff; }
.bcs-pr-prev { left: -14px; }
.bcs-pr-next { right: -14px; }
.bcs-pr-nav[hidden] { display: none; }

.bcs-pr-foot { height: 6px; background: #ececef; border-radius: 3px; margin-top: 30px; }

/* ---- responsive ---- */
@media (max-width: 1024px) {
	.bcs-pr { --bcs-pr-cols: 3; }
}

@media (max-width: 780px) {
	.bcs-pr { --bcs-pr-cols: 2; --bcs-pr-gap: 20px; }
	.bcs-pr-prev { left: -6px; }
	.bcs-pr-next { right: -6px; }
}

@media (max-width: 520px) {
	.bcs-pr { --bcs-pr-cols: 1.25; padding: 8px 16px 20px; }
}
