/*
 * Borbila child theme safety fixes.
 * Keep this file scoped so parent theme and plugin files stay untouched.
 */

/*
 * Homepage category loop carousel: prevent a full-size category image flash
 * before Elementor/Swiper finishes initializing the carousel.
 */
.elementor-126 .elementor-element.elementor-element-380fe22,
.elementor-126 .elementor-element.elementor-element-380fe22 .swiper,
.elementor-126 .elementor-element.elementor-element-380fe22 .elementor-loop-container {
	max-width: 100% !important;
	overflow: hidden !important;
	width: 100% !important;
}

.elementor-126 .elementor-element.elementor-element-380fe22 .swiper:not(.swiper-initialized) .swiper-wrapper {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 14px !important;
	overflow: hidden !important;
	width: 100% !important;
}

.elementor-126 .elementor-element.elementor-element-380fe22 .swiper:not(.swiper-initialized) .swiper-slide {
	flex: 0 0 calc((100% - 70px) / 6) !important;
	max-width: calc((100% - 70px) / 6) !important;
	min-width: 0 !important;
	overflow: hidden !important;
	width: calc((100% - 70px) / 6) !important;
}

.elementor-126 .elementor-element.elementor-element-380fe22 .swiper-slide img {
	aspect-ratio: 4 / 3 !important;
	display: block !important;
	height: auto !important;
	max-width: 100% !important;
	object-fit: cover !important;
	width: 100% !important;
}

@media (max-width: 1024px) {
	.elementor-126 .elementor-element.elementor-element-380fe22 .swiper:not(.swiper-initialized) .swiper-slide {
		flex-basis: calc((100% - 42px) / 4) !important;
		max-width: calc((100% - 42px) / 4) !important;
		width: calc((100% - 42px) / 4) !important;
	}
}

@media (max-width: 767px) {
	.elementor-126 .elementor-element.elementor-element-380fe22 .swiper:not(.swiper-initialized) .swiper-wrapper {
		gap: 4px !important;
	}

	.elementor-126 .elementor-element.elementor-element-380fe22 .swiper:not(.swiper-initialized) .swiper-slide {
		flex-basis: calc((100% - 8px) / 3) !important;
		max-width: calc((100% - 8px) / 3) !important;
		width: calc((100% - 8px) / 3) !important;
	}
}

.borbila-floating-whatsapp {
	align-items: center;
	bottom: 24px;
	display: inline-flex;
	gap: 10px;
	position: fixed;
	right: 22px;
	text-decoration: none !important;
	z-index: 99990;
}

.borbila-floating-whatsapp__icon {
	align-items: center;
	background: linear-gradient(135deg, #29d86d 0%, #12b955 52%, #059447 100%);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	box-shadow: 0 18px 34px rgba(18, 185, 85, 0.34), 0 7px 18px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.34);
	color: #fff;
	display: inline-flex;
	height: 58px;
	justify-content: center;
	position: relative;
	transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
	width: 58px;
}

.borbila-floating-whatsapp__icon::before {
	animation: borbila-whatsapp-pulse 2.4s ease-out infinite;
	border: 1px solid rgba(18, 185, 85, 0.42);
	border-radius: inherit;
	content: "";
	inset: -7px;
	position: absolute;
}

.borbila-floating-whatsapp__icon svg {
	display: block;
	fill: currentColor;
	height: 31px;
	width: 31px;
}

.borbila-floating-whatsapp__text {
	background: #101214;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	opacity: 0;
	padding: 12px 15px;
	pointer-events: none;
	transform: translateX(10px) scale(0.96);
	transform-origin: right center;
	transition: opacity 220ms ease, transform 220ms ease;
	white-space: nowrap;
}

.borbila-floating-whatsapp:hover .borbila-floating-whatsapp__icon,
.borbila-floating-whatsapp:focus-visible .borbila-floating-whatsapp__icon {
	box-shadow: 0 20px 42px rgba(18, 185, 85, 0.42), 0 9px 22px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.38);
	filter: saturate(1.08);
	transform: translateY(-3px) scale(1.04);
}

.borbila-floating-whatsapp:hover .borbila-floating-whatsapp__text,
.borbila-floating-whatsapp:focus-visible .borbila-floating-whatsapp__text {
	opacity: 1;
	transform: translateX(0) scale(1);
}

.borbila-floating-whatsapp:focus-visible {
	outline: 2px solid rgba(18, 185, 85, 0.5);
	outline-offset: 6px;
}

body.admin-bar .borbila-floating-whatsapp {
	bottom: 34px;
}

@keyframes borbila-whatsapp-pulse {
	0% {
		opacity: 0.5;
		transform: scale(0.88);
	}

	70%,
	100% {
		opacity: 0;
		transform: scale(1.35);
	}
}

.bbpf-wrap,
.bbpf-wrap * {
	box-sizing: border-box;
}

.bbpf-wrap {
	letter-spacing: 0;
	text-transform: none;
	width: 100%;
}

.bbpf-layout {
	align-items: start !important;
	display: grid !important;
	gap: 22px !important;
	grid-template-columns: minmax(245px, 315px) minmax(0, 1fr) !important;
	width: 100% !important;
}

.bbpf-sidebar {
	width: 100% !important;
}

.bbpf-form {
	display: grid !important;
	gap: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
}

.bbpf-title,
.bbpf-section-toggle,
.bbpf-section-toggle span {
	color: #111 !important;
	font-weight: 800 !important;
}

.bbpf-section {
	margin: 0 !important;
	width: 100% !important;
}

.bbpf-section-toggle {
	align-items: center !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	display: flex !important;
	flex-direction: row !important;
	justify-content: space-between !important;
	margin: 0 !important;
	padding: 0 !important;
	text-align: left !important;
	width: 100% !important;
}

.bbpf-section-toggle span {
	display: block !important;
	flex: 1 1 auto !important;
	min-width: 0 !important;
}

.bbpf-section-toggle b {
	display: block !important;
	flex: 0 0 28px !important;
	height: 28px !important;
	width: 28px !important;
}

.bbpf-search-row {
	align-items: center !important;
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) 43px !important;
	width: 100% !important;
}

.bbpf-search-row input {
	box-shadow: none !important;
	max-width: none !important;
	width: 100% !important;
}

.bbpf-search-button,
.bbpf-apply,
.bbpf-reset,
.bbpf-mobile-toggle,
.bbpf-mobile-close {
	box-shadow: none !important;
	font-family: inherit !important;
	font-weight: 800 !important;
	text-transform: none !important;
}

.bbpf-search-button {
	align-items: center !important;
	display: inline-flex !important;
	flex: 0 0 43px !important;
	height: 43px !important;
	justify-content: center !important;
	min-height: 43px !important;
	padding: 0 !important;
	width: 43px !important;
}

.bbpf-check {
	align-items: center !important;
	display: grid !important;
	gap: 9px !important;
	grid-template-columns: 16px minmax(0, 1fr) auto !important;
	margin: 0 !important;
	width: 100% !important;
}

.bbpf-check input {
	box-shadow: none !important;
	flex: none !important;
	height: 16px !important;
	margin: 0 !important;
	outline: 0 !important;
	width: 16px !important;
}

.bbpf-price-row,
.bbpf-actions {
	display: grid !important;
	width: 100% !important;
}

.bbpf-grid {
	align-items: stretch !important;
	display: grid !important;
	grid-template-columns: repeat(var(--bbpf-cols, 3), minmax(0, 1fr)) !important;
	width: 100% !important;
}

.bbpf-product {
	align-self: stretch !important;
	display: flex !important;
	height: 100% !important;
	min-width: 0 !important;
	width: 100% !important;
}

.bbpf-product > * {
	min-height: 100% !important;
	width: 100% !important;
}

/*
 * Elementor taxonomy carousels: prevent the brief reload-time flash where
 * Swiper has not initialized yet and each subject card renders as a full row.
 */
.elementor-widget-loop-carousel[data-widget_type="loop-carousel.product_taxonomy"] .swiper:not(.swiper-initialized) {
	overflow: hidden !important;
}

.elementor-widget-loop-carousel[data-widget_type="loop-carousel.product_taxonomy"] .swiper:not(.swiper-initialized) .swiper-wrapper {
	display: flex !important;
	gap: 10px !important;
	transform: none !important;
	width: 100% !important;
}

.elementor-widget-loop-carousel[data-widget_type="loop-carousel.product_taxonomy"] .swiper:not(.swiper-initialized) .swiper-slide {
	flex: 0 0 calc((100% - 70px) / 8) !important;
	margin-right: 0 !important;
	max-width: calc((100% - 70px) / 8) !important;
	width: calc((100% - 70px) / 8) !important;
}

@media (max-width: 1024px) {
	.elementor-widget-loop-carousel[data-widget_type="loop-carousel.product_taxonomy"] .swiper:not(.swiper-initialized) .swiper-slide {
		flex-basis: calc((100% - 40px) / 5) !important;
		max-width: calc((100% - 40px) / 5) !important;
		width: calc((100% - 40px) / 5) !important;
	}
}

@media (max-width: 767px) {
	.elementor-widget-loop-carousel[data-widget_type="loop-carousel.product_taxonomy"] .swiper:not(.swiper-initialized) .swiper-wrapper {
		gap: 6px !important;
	}

	.elementor-widget-loop-carousel[data-widget_type="loop-carousel.product_taxonomy"] .swiper:not(.swiper-initialized) .swiper-slide {
		flex-basis: calc((100% - 12px) / 3) !important;
		max-width: calc((100% - 12px) / 3) !important;
		width: calc((100% - 12px) / 3) !important;
	}
}

/*
 * Product loop cards: let Elementor's Space Between setting work on the live
 * site by giving only the product-card templates a real full-height flex context.
 */
.elementor-loop-container .e-loop-item.elementor-189,
.elementor-widget-loop-grid .e-loop-item.elementor-189,
.elementor-widget-loop-carousel .swiper-slide.e-loop-item.elementor-189,
.digital-product-grid .e-loop-item.elementor-189,
.bbpf-wrap .bbpf-product > .e-loop-item.elementor-189,
.bbpf-wrap .bbpf-product > .e-loop-item.elementor-379 {
	align-self: stretch !important;
	display: flex !important;
	flex-direction: column !important;
	height: auto !important;
	min-height: 100% !important;
}

.elementor-loop-container .e-loop-item.elementor-189 > .e-con.digital-product-card,
.elementor-widget-loop-grid .e-loop-item.elementor-189 > .e-con.digital-product-card,
.elementor-widget-loop-carousel .swiper-slide.e-loop-item.elementor-189 > .e-con.digital-product-card,
.digital-product-grid .e-loop-item.elementor-189 > .e-con.digital-product-card,
.bbpf-wrap .bbpf-product > .e-loop-item.elementor-189 > .e-con.digital-product-card,
.bbpf-wrap .bbpf-product > .e-loop-item.elementor-379 > .e-con.digital-product-card {
	--container-widget-height: 100% !important;
	align-self: stretch !important;
	flex: 1 1 auto !important;
	height: 100% !important;
	min-height: 100% !important;
	width: 100% !important;
}

.elementor-loop-container .e-loop-item.elementor-189 .digital-product-card.e-con-boxed > .e-con-inner,
.elementor-widget-loop-grid .e-loop-item.elementor-189 .digital-product-card.e-con-boxed > .e-con-inner,
.elementor-widget-loop-carousel .e-loop-item.elementor-189 .digital-product-card.e-con-boxed > .e-con-inner,
.digital-product-grid .e-loop-item.elementor-189 .digital-product-card.e-con-boxed > .e-con-inner,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-189 .digital-product-card.e-con-boxed > .e-con-inner,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .digital-product-card.e-con-boxed > .e-con-inner {
	align-items: var(--align-items, center) !important;
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: var(--flex-direction, column) !important;
	height: 100% !important;
	justify-content: var(--justify-content, space-between) !important;
	min-height: 100% !important;
	width: 100% !important;
}

/*
 * Elementor product loop cards: keep buttons truly full width when the
 * Button widget is set to Justified/Full Width in Elementor.
 */
.elementor-loop-container .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
.elementor-widget-loop-grid .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
.elementor-widget-loop-carousel .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
.digital-product-grid .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now {
	--container-widget-align-self: stretch !important;
	--container-widget-flex-grow: 0 !important;
	--flex-basis: auto !important;
	align-self: stretch !important;
	flex: 0 0 auto !important;
	flex-basis: auto !important;
	max-width: 100% !important;
	min-width: 0 !important;
	width: var(--container-widget-width, var(--width, 100%)) !important;
}

.elementor-loop-container .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now .elementor-button,
.elementor-widget-loop-grid .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now .elementor-button,
.elementor-widget-loop-carousel .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now .elementor-button,
.digital-product-grid .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now .elementor-button,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now .elementor-button,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now .elementor-button,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now .elementor-button {
	display: flex !important;
	justify-content: center !important;
	max-width: 100% !important;
	width: 100% !important;
}

.bbpf-wrap .bbpf-product .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.borbila-variation-buy-now .elementor-widget-container,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.borbila-variation-buy-now .elementor-button-wrapper,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .digital-product-card .elementor-widget-button.borbila-variation-buy-now .elementor-widget-container,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .digital-product-card .elementor-widget-button.borbila-variation-buy-now .elementor-button-wrapper,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .elementor-widget-button.borbila-variation-buy-now .elementor-widget-container,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .elementor-widget-button.borbila-variation-buy-now .elementor-button-wrapper {
	display: block !important;
	max-width: 100% !important;
	width: 100% !important;
}

.bbpf-wrap .bbpf-product .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.borbila-variation-buy-now .elementor-button-content-wrapper,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .digital-product-card .elementor-widget-button.borbila-variation-buy-now .elementor-button-content-wrapper,
.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .elementor-widget-button.borbila-variation-buy-now .elementor-button-content-wrapper {
	justify-content: center !important;
	width: 100% !important;
}

@media (max-width: 767px) {
	.bbpf-wrap .bbpf-product .e-loop-item.elementor-189 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
	.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .digital-product-card .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
	.bbpf-wrap .bbpf-product .e-loop-item.elementor-189 .digital-product-card .elementor-widget-mobile__width-initial.elementor-align-justify.borbila-variation-buy-now,
	.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .digital-product-card .elementor-widget-mobile__width-initial.elementor-align-justify.borbila-variation-buy-now,
	.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .elementor-widget-button.elementor-align-justify.borbila-variation-buy-now,
	.bbpf-wrap .bbpf-product .e-loop-item.elementor-379 .elementor-widget-mobile__width-initial.elementor-align-justify.borbila-variation-buy-now {
		--container-widget-align-self: stretch !important;
		--container-widget-flex-grow: 0 !important;
		--flex-basis: auto !important;
		align-self: stretch !important;
		flex: 0 0 auto !important;
		max-width: 100% !important;
		width: var(--container-widget-width, var(--width, 100%)) !important;
	}
}

/*
 * Single Product mobile hardening: prevent hidden WooCommerce zoom clones and
 * Elementor inline icon lists from creating horizontal page overflow.
 */
.single-product .woocommerce-product-gallery__image .zoomImg {
	display: none !important;
}

.bbpf-mobile-toggle,
.bbpf-mobile-backdrop,
.bbpf-mobile-head {
	display: none !important;
}

@media (max-width: 1024px) {
	.bbpf-layout {
		grid-template-columns: minmax(225px, 275px) minmax(0, 1fr) !important;
	}
}

@media (max-width: 767px) {
	.borbila-floating-whatsapp {
		bottom: 18px;
		right: 16px;
	}

	.borbila-floating-whatsapp__icon {
		height: 54px;
		width: 54px;
	}

	.borbila-floating-whatsapp__icon svg {
		height: 29px;
		width: 29px;
	}

	.borbila-floating-whatsapp__text {
		font-size: 13px;
		padding: 11px 13px;
	}

	.single-product .elementor-icon-list--layout-inline .elementor-icon-list-items.elementor-inline-items {
		flex-wrap: wrap !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		max-width: 100% !important;
	}

	.bbpf-mobile-toggle {
		display: inline-flex !important;
	}

	.bbpf-mobile-backdrop {
		display: block !important;
	}

	.bbpf-mobile-head {
		display: flex !important;
	}

	.bbpf-layout {
		display: block !important;
	}

	.bbpf-sidebar {
		position: fixed !important;
		transform: translateX(-105%) !important;
	}

	.bbpf-filter-open .bbpf-sidebar {
		transform: translateX(0) !important;
	}

	.bbpf-columns-3,
	.bbpf-columns-4 {
		--bbpf-cols: 2;
	}
}
