/*
 * 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);
	}
}

/*
 * Elementor WooCommerce Product Price widgets should fully respect the
 * typography selected in Elementor. WooCommerce wraps prices in nested
 * amount/ins/del/bdi elements, and those children can otherwise keep an
 * older generated size or weight in loop cards and product templates.
 */
.woocommerce .elementor-widget-woocommerce-product-price .price .amount,
.woocommerce .elementor-widget-woocommerce-product-price .price .amount bdi,
.woocommerce .elementor-widget-woocommerce-product-price .price ins,
.woocommerce .elementor-widget-woocommerce-product-price .price ins .amount,
.woocommerce .elementor-widget-woocommerce-product-price .price ins .amount bdi,
.woocommerce .elementor-widget-woocommerce-product-price .price del,
.woocommerce .elementor-widget-woocommerce-product-price .price del .amount,
.woocommerce .elementor-widget-woocommerce-product-price .price del .amount bdi {
	font-family: inherit !important;
	font-size: inherit !important;
	font-style: inherit !important;
	font-weight: inherit !important;
	letter-spacing: inherit !important;
	line-height: inherit !important;
	text-transform: inherit !important;
}

.woocommerce .elementor-widget-woocommerce-product-price .price ins {
	text-decoration: none;
}

@media (max-width: 767px) {
	.e-loop-item .elementor-widget-woocommerce-product-title .elementor-heading-title {
		-webkit-box-orient: vertical;
		display: -webkit-box !important;
		line-clamp: 2;
		-webkit-line-clamp: 2;
		line-height: 1.35 !important;
		max-width: 100% !important;
		min-height: 2.7em;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
		white-space: normal !important;
	}

	.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;
	}
}
