/*
Theme Name: Borbila
Theme URI: https://borbila.com
Description: Child theme for Hello Elementor
Author: Borbila
Author URI: https://borbila.com/
Template: hello-elementor
Version: 1.0.1
Text Domain: borbila
*/

/* Custom CSS goes below */

a.added_to_cart,
.added_to_cart.wc-forward,
a.wc-forward.added_to_cart {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
}

.borbila-mobile-menu-actions {
	display: none;
}

.woocommerce a.button.add_to_cart_button,
.woocommerce button.single_add_to_cart_button,
.woocommerce .ajax_add_to_cart {
	position: relative;
}

.woocommerce a.button.add_to_cart_button.loading,
.woocommerce button.single_add_to_cart_button.loading,
.woocommerce .ajax_add_to_cart.loading {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: wait;
}

.woocommerce a.button.add_to_cart_button.loading::after,
.woocommerce button.single_add_to_cart_button.loading::after,
.woocommerce .ajax_add_to_cart.loading::after {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid #c77d7d;
	border-right-color: transparent;
	border-radius: 50%;
	animation: borbila-cart-spin 0.7s linear infinite;
	position: static;
	margin: 0;
}

@keyframes borbila-cart-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 767px) {
	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions {
		display: grid;
		gap: 14px;
		padding: 18px 16px 16px;
		margin-top: 10px;
		border-top: 1px solid #f1e4e4;
	}

	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__whatsapp {
		display: flex;
		align-items: center;
		gap: 14px;
		padding: 14px 16px;
		border: 1px solid var(--borbila-mm-whatsapp-border, #ececec);
		border-radius: 18px;
		background: var(--borbila-mm-whatsapp-bg, #ffffff);
		color: var(--borbila-mm-whatsapp-text, #131313);
		box-shadow: 0 12px 28px rgba(19, 19, 19, 0.05);
		text-decoration: none;
		transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
	}

	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__whatsapp:hover,
	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__whatsapp:focus {
		background: var(--borbila-mm-whatsapp-bg-hover, #fdf3f8);
		transform: translateY(-1px);
	}

	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__whatsapp:hover .borbila-mobile-menu-actions__icon,
	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__whatsapp:focus .borbila-mobile-menu-actions__icon {
		filter: brightness(0.98);
	}

	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 46px;
		height: 46px;
		flex: 0 0 46px;
		border-radius: 50%;
		background: var(--borbila-mm-whatsapp-icon-bg, #fef4f9);
		color: var(--borbila-mm-whatsapp-icon-color, #c72c77);
		font-size: 24px;
		box-shadow: 0 10px 20px rgba(199, 44, 119, 0.16);
	}

	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__text {
		color: var(--borbila-mm-whatsapp-text, #131313);
		font-size: 17px;
		font-weight: 700;
		letter-spacing: 0.01em;
		line-height: 1.4;
		word-break: break-word;
	}

	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__account {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 58px;
		padding: 0 22px;
		border-radius: 16px;
		background: var(--borbila-mm-account-bg, #c72c77);
		color: var(--borbila-mm-account-text, #ffffff) !important;
		border: 1px solid var(--borbila-mm-account-border, #c72c77);
		font-size: 17px;
		font-weight: 700;
		text-decoration: none;
		box-shadow: 0 16px 30px rgba(199, 44, 119, 0.24);
		transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
		-webkit-appearance: none;
		appearance: none;
	}

	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__account:hover,
	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__account:focus {
		color: var(--borbila-mm-account-text, #ffffff) !important;
		background: var(--borbila-mm-account-bg-hover, #131313) !important;
		background-color: var(--borbila-mm-account-bg-hover, #131313) !important;
		border-color: var(--borbila-mm-account-bg-hover, #131313) !important;
		transform: translateY(-1px);
	}

	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__account:active,
	.elementor-nav-menu--dropdown .borbila-mobile-menu-actions__account:visited {
		background: var(--borbila-mm-account-bg, #c72c77) !important;
		background-color: var(--borbila-mm-account-bg, #c72c77) !important;
		color: var(--borbila-mm-account-text, #ffffff) !important;
	}
}

@media (max-width: 767px) {
	/* Keep mobile product-loop action buttons aligned across Elementor and filter cards. */
	.elementor-widget-loop-grid .elementor-loop-container.elementor-grid {
		align-items: stretch;
	}

	.elementor-widget-loop-grid .elementor-loop-container .e-loop-item.product,
	.elementor-widget-loop-carousel .elementor-loop-container .e-loop-item.product,
	.sgpf .products > li.product.sgpf-product-card {
		height: 100%;
	}

	.elementor-widget-loop-grid .elementor-loop-container .e-loop-item.product > .e-con,
	.elementor-widget-loop-carousel .elementor-loop-container .e-loop-item.product > .e-con {
		height: 100%;
		min-height: 100%;
	}

	.elementor-widget-loop-grid .elementor-loop-container .e-loop-item.product > .e-con > .e-con-inner,
	.elementor-widget-loop-carousel .elementor-loop-container .e-loop-item.product > .e-con > .e-con-inner {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		height: 100%;
		min-height: 100%;
	}

	.elementor-widget-loop-grid .e-loop-item.product .elementor-widget-theme-post-featured-image,
	.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-theme-post-featured-image {
		width: 100%;
	}

	.elementor-widget-loop-grid .e-loop-item.product .elementor-widget-woocommerce-product-title,
	.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-woocommerce-product-title {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 34px;
		margin: 0 !important;
		padding: 0 !important;
		text-align: center !important;
	}

	.elementor-widget-loop-grid .e-loop-item.product .elementor-widget-woocommerce-product-title .elementor-heading-title,
	.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-woocommerce-product-title .elementor-heading-title {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
		line-height: 1.25 !important;
		text-align: center !important;
	}

	.elementor-widget-loop-grid .e-loop-item.product .elementor-widget-woocommerce-product-rating,
	.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-woocommerce-product-rating {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 18px;
		margin: 0 !important;
		padding: 0 !important;
	}

	.elementor-widget-loop-grid .e-loop-item.product .elementor-widget-woocommerce-product-price,
	.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-woocommerce-product-price {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 24px;
		margin: 0 !important;
		padding: 0 !important;
		text-align: center !important;
	}

	.elementor-widget-loop-grid .e-loop-item.product .elementor-widget-woocommerce-product-price .price,
	.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-woocommerce-product-price .price {
		line-height: 1.25 !important;
	}

	.elementor-widget-loop-grid .e-loop-item.product .elementor-widget-button:not(.elementor-absolute),
	.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-button:not(.elementor-absolute) {
		width: 100% !important;
		max-width: 100% !important;
		margin: auto 0 0 !important;
		margin-block-start: auto !important;
		margin-block-end: 0 !important;
		padding: 0 !important;
	}

	.elementor-widget-loop-grid .e-loop-item.product > .e-con > .e-con-inner > .e-con:has(.elementor-widget-button:not(.elementor-absolute)),
	.elementor-widget-loop-carousel .e-loop-item.product > .e-con > .e-con-inner > .e-con:has(.elementor-widget-button:not(.elementor-absolute)) {
		width: 100%;
		margin: auto 0 0 !important;
		margin-block-start: auto !important;
		margin-block-end: 0 !important;
		padding: 0 !important;
	}

	.elementor-widget-loop-grid .e-loop-item.product .elementor-widget-button:not(.elementor-absolute) .elementor-button,
	.elementor-widget-loop-carousel .e-loop-item.product .elementor-widget-button:not(.elementor-absolute) .elementor-button,
	.sgpf .sgpf-product-card__button {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 38px !important;
		min-height: 38px !important;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
		line-height: 1.1 !important;
		box-sizing: border-box;
	}

	.sgpf .sgpf-product-card__body {
		display: flex;
		flex-direction: column;
		height: 100%;
	}

	.sgpf .sgpf-product-card__title {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 42px;
		margin-bottom: 6px !important;
	}

	.sgpf .sgpf-product-card__title a {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	.sgpf .sgpf-product-card__rating {
		min-height: 18px;
	}

	.sgpf .sgpf-product-card__price {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-wrap: wrap;
		min-height: 24px;
		margin-bottom: 12px !important;
	}

	.sgpf .sgpf-product-card__button {
		margin-top: auto !important;
	}
}
