/* Product Section widget (blocksy-child) */

/* Flexbox Container: the widget has no intrinsic width (grid minmax(0, 1fr)),
   so without this it collapses to 0 when the container is in Row direction.
   Same pattern as Elementor core widgets (Divider, Spacer...). */
.e-con > .elementor-widget-bc_product_section,
.e-con-inner > .elementor-widget-bc_product_section {
	width: var(--container-widget-width, 100%);
	min-width: 0;
	--flex-grow: var(--container-widget-flex-grow);
}

.bc-ps__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 24px;
}

.bc-ps__title {
	margin: 0;
}

.bc-ps__subtitle {
	margin: 6px 0 0;
	opacity: 0.75;
}

.bc-ps__view-all {
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.bc-ps__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bc-ps__item {
	margin: 0;
	min-width: 0;
}

.bc-ps__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.bc-ps__media {
	position: relative;
	display: block;
	overflow: hidden;
}

.bc-ps__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.bc-ps--zoom-yes .bc-ps__card:hover .bc-ps__media img {
	transform: scale(1.06);
}

/* Second image on hover */
.bc-ps__media .bc-ps__hover-image {
	position: absolute;
	inset: 0;
	height: 100%;
	opacity: 0;
	transition: opacity 0.5s ease, transform 0.6s ease;
	pointer-events: none;
}

.bc-ps__media img:not(.bc-ps__hover-image) {
	transition: opacity 0.5s ease, transform 0.4s ease;
}

@media (hover: hover) {
	.bc-ps__card:hover .bc-ps__media .bc-ps__hover-image {
		opacity: 1;
	}

	.bc-ps__card:hover .bc-ps__media:has(.bc-ps__hover-image) img:not(.bc-ps__hover-image) {
		opacity: 0;
	}

	.elementor-widget:not(.bc-ps--zoom-yes) .bc-ps__card:hover .bc-ps__media .bc-ps__hover-image {
		transform: scale(1.03);
	}
}

.bc-ps__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 8px;
	border-radius: 3px;
	background: #e53935;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}

.bc-ps__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 14px 4px 4px;
}

.bc-ps__cat {
	font-size: 12px;
	text-transform: uppercase;
	opacity: 0.7;
}

.bc-ps__cat a {
	color: inherit;
	text-decoration: none;
}

.bc-ps__name {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
}

.bc-ps__name a {
	display: -webkit-box;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.bc-ps__rating .star-rating {
	float: none;
	margin: 0;
	font-size: 12px;
}

.bc-ps__price {
	font-weight: 700;
}

.bc-ps__price del {
	margin-right: 6px;
	font-weight: 400;
	opacity: 0.55;
}

.bc-ps__price ins {
	text-decoration: none;
}

/* Push the button to the bottom so all cards have the same height */
.bc-ps__actions {
	margin-top: auto;
	padding-top: 8px;
}

.bc-ps__actions .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.bc-ps--btn-full-yes .bc-ps__actions .button {
	width: 100%;
}

.bc-ps__actions .added_to_cart {
	display: block;
	margin-top: 6px;
	font-size: 13px;
}

.bc-ps__empty {
	margin: 0;
}
