/* Sabadino bridge for Elementor Pro Menu Cart. Intentionally scoped and JS-free. */
.elementor-widget-woocommerce-menu-cart {
	--bwc-ec-primary: #ef4056;
	--bwc-ec-icon: #fff;
	--bwc-ec-icon-bg: var(--bwc-ec-primary);
	--bwc-ec-badge: var(--bwc-ec-primary);
	--bwc-ec-icon-size: 24px;
	--bwc-ec-dropdown: 320px;
	--bwc-ec-ink: #17213c;
	--bwc-ec-muted: #7a849c;
	--bwc-ec-line: #e7eaf1;
	--bwc-ec-soft: #f7f8fc;
	direction: rtl;
}

.elementor-widget-woocommerce-menu-cart,
.elementor-widget-woocommerce-menu-cart button,
.elementor-widget-woocommerce-menu-cart a,
.elementor-widget-woocommerce-menu-cart p {
	font-family: var(--bwc-ec-font, Tahoma, Arial, sans-serif);
}

/* Header trigger. */
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button {
	position: relative;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	inline-size: 48px !important;
	block-size: 48px !important;
	min-inline-size: 48px !important;
	min-block-size: 48px !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, .42) !important;
	border-radius: 15px !important;
	background: var(--bwc-ec-icon-bg) !important;
	background: linear-gradient(145deg, color-mix(in srgb, var(--bwc-ec-icon-bg) 88%, #fff), var(--bwc-ec-icon-bg)) !important;
	box-shadow: 0 9px 24px color-mix(in srgb, var(--bwc-ec-primary) 28%, transparent) !important;
	color: var(--bwc-ec-icon) !important;
	text-decoration: none !important;
	transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button:hover,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button:focus-visible,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button[aria-expanded="true"] {
	transform: translateY(-2px);
	filter: saturate(1.06);
	box-shadow: 0 13px 30px color-mix(in srgb, var(--bwc-ec-primary) 36%, transparent) !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button .elementor-button-text {
	display: none !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button .elementor-button-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button svg {
	inline-size: var(--bwc-ec-icon-size) !important;
	block-size: var(--bwc-ec-icon-size) !important;
	fill: currentColor !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-button-icon-qty {
	position: absolute !important;
	inset-block-start: -13px !important;
	inset-inline-start: -14px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	inline-size: 20px !important;
	block-size: 20px !important;
	min-inline-size: 20px !important;
	padding: 0 4px !important;
	border: 2px solid #fff !important;
	border-radius: 999px !important;
	background: var(--bwc-ec-badge) !important;
	color: #fff !important;
	font-size: 10px !important;
	font-weight: 800 !important;
	line-height: 16px !important;
	box-shadow: 0 3px 9px rgba(23, 33, 60, .28);
}

.elementor-widget-woocommerce-menu-cart .elementor-button-icon-qty[data-counter="0"] {
	display: none !important;
}

/* Theme modes are added server-side to Elementor Pro's native widget. */
.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal .elementor-menu-cart__toggle_button.elementor-button,
.basket-woo-header-style-minimal .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button {
	inline-size: auto !important;
	block-size: calc(var(--bwc-ec-icon-size) + 10px) !important;
	min-inline-size: 0 !important;
	min-block-size: 34px !important;
	padding: 2px 4px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--bwc-ec-icon) !important;
	filter: none !important;
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal .elementor-menu-cart__toggle_button.elementor-button:hover,
.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal .elementor-menu-cart__toggle_button.elementor-button:focus-visible,
.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal .elementor-menu-cart__toggle_button.elementor-button[aria-expanded="true"],
.basket-woo-header-style-minimal .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button:hover,
.basket-woo-header-style-minimal .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button:focus-visible,
.basket-woo-header-style-minimal .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button[aria-expanded="true"] {
	transform: none !important;
	background: transparent !important;
	box-shadow: none !important;
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal .elementor-menu-cart__toggle_button .elementor-button-icon,
.basket-woo-header-style-minimal .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button .elementor-button-icon {
	direction: rtl;
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 4px;
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal .elementor-button-icon-qty,
.basket-woo-header-style-minimal .elementor-widget-woocommerce-menu-cart .elementor-button-icon-qty {
	position: static !important;
	display: inline-flex !important;
	order: -1;
	inline-size: auto !important;
	min-inline-size: 18px !important;
	block-size: 18px !important;
	min-block-size: 18px !important;
	padding: 0 5px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: var(--bwc-ec-badge) !important;
	box-shadow: none !important;
	font-size: 10px !important;
	line-height: 18px !important;
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal .elementor-button-icon-qty[data-counter="0"],
.basket-woo-header-style-minimal .elementor-widget-woocommerce-menu-cart .elementor-button-icon-qty[data-counter="0"] {
	display: none !important;
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-outline .elementor-menu-cart__toggle_button.elementor-button,
.basket-woo-header-style-outline .elementor-widget-woocommerce-menu-cart .elementor-menu-cart__toggle_button.elementor-button {
	inline-size: calc(var(--bwc-ec-icon-size) + 18px) !important;
	block-size: calc(var(--bwc-ec-icon-size) + 18px) !important;
	min-inline-size: 42px !important;
	min-block-size: 42px !important;
	border: 1px solid color-mix(in srgb, var(--bwc-ec-icon) 38%, transparent) !important;
	border-radius: 12px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--bwc-ec-icon) !important;
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-glass .elementor-menu-cart__toggle_button.elementor-button {
	border-color: rgba(255, 255, 255, .46) !important;
	background: color-mix(in srgb, var(--bwc-ec-icon-bg) 28%, transparent) !important;
	box-shadow: 0 8px 22px rgba(23, 33, 60, .12) !important;
	backdrop-filter: blur(12px);
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-contrast .elementor-menu-cart__toggle_button.elementor-button {
	border: 2px solid currentColor !important;
	border-radius: 8px !important;
	background: #111827 !important;
	box-shadow: none !important;
	color: #fff !important;
}

/* Compact dropdown surface instead of Elementor's large blank rectangle. */
.elementor-widget-woocommerce-menu-cart.elementor-menu-cart--cart-type-mini-cart .elementor-menu-cart__container {
	background: transparent !important;
}

.elementor-widget-woocommerce-menu-cart.elementor-menu-cart--cart-type-mini-cart .elementor-menu-cart__main {
	box-sizing: border-box !important;
	inline-size: min(var(--bwc-ec-dropdown), calc(100vw - 24px)) !important;
	block-size: auto !important;
	min-block-size: 0 !important;
	max-block-size: min(480px, calc(100vh - 72px)) !important;
	padding: 10px !important;
	border: 1px solid rgba(225, 229, 238, .95) !important;
	border-radius: 16px !important;
	background: rgba(255, 255, 255, .98) !important;
	box-shadow: 0 24px 65px rgba(24, 31, 59, .18), 0 6px 18px rgba(24, 31, 59, .08) !important;
	color: var(--bwc-ec-ink) !important;
	overflow: hidden !important;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal.elementor-menu-cart--cart-type-mini-cart .elementor-menu-cart__main {
	inline-size: min(var(--bwc-ec-dropdown), 320px, calc(100vw - 20px)) !important;
	padding: 9px !important;
	border-color: #e8eaf0 !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: 0 12px 34px rgba(24, 31, 59, .12) !important;
	backdrop-filter: none;
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-glass.elementor-menu-cart--cart-type-mini-cart .elementor-menu-cart__main {
	border-color: rgba(255, 255, 255, .62) !important;
	background: rgba(255, 255, 255, .86) !important;
	box-shadow: 0 25px 70px rgba(24, 31, 59, .2) !important;
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-contrast.elementor-menu-cart--cart-type-mini-cart .elementor-menu-cart__main {
	border: 2px solid #111827 !important;
	border-radius: 10px !important;
	box-shadow: 8px 8px 0 #111827 !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__close-button {
	position: relative !important;
	display: grid !important;
	place-items: center !important;
	align-self: flex-start !important;
	inline-size: 29px !important;
	block-size: 29px !important;
	min-block-size: 29px !important;
	margin: 0 0 6px !important;
	border: 1px solid var(--bwc-ec-line) !important;
	border-radius: 8px !important;
	background: var(--bwc-ec-soft) !important;
	color: var(--bwc-ec-muted) !important;
	transition: background .18s ease, color .18s ease, transform .18s ease !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__close-button:hover {
	background: color-mix(in srgb, var(--bwc-ec-primary) 9%, #fff) !important;
	color: var(--bwc-ec-primary) !important;
	transform: rotate(4deg);
}

.elementor-widget-woocommerce-menu-cart.bwc-ec-style-minimal .elementor-menu-cart__close-button {
	inline-size: 27px !important;
	block-size: 27px !important;
	min-block-size: 27px !important;
	border: 0 !important;
	border-radius: 9px !important;
	background: transparent !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__close-button::before,
.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__close-button::after {
	content: "" !important;
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	inset-block-start: auto !important;
	inset-inline-start: auto !important;
	inline-size: 14px !important;
	block-size: 2px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 2px;
	background: currentColor !important;
	transform-origin: center !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__close-button::before {
	transform: translate(-50%, -50%) rotate(45deg) !important;
}

.elementor-widget-woocommerce-menu-cart .elementor-menu-cart__close-button::after {
	transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content {
	box-sizing: border-box;
	inline-size: 100%;
	min-block-size: 0 !important;
	color: var(--bwc-ec-ink);
}

/* WooCommerce can return a truly empty fragment before its empty-message HTML. */
.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content:empty,
.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content:not(:has(*)),
.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__empty-message {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	inline-size: 100%;
	min-block-size: 108px !important;
	margin: 0 !important;
	padding: 12px !important;
	border: 1px dashed color-mix(in srgb, var(--bwc-ec-primary) 28%, #dfe3ec) !important;
	border-radius: 12px !important;
	background: linear-gradient(145deg, color-mix(in srgb, var(--bwc-ec-primary) 5%, #fff), #fafbfe) !important;
	color: var(--bwc-ec-ink) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1.9 !important;
	text-align: center !important;
}

.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content:empty::before,
.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content:not(:has(*))::before,
.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__empty-message::before {
	content: "";
	display: block;
	inline-size: 40px;
	block-size: 40px;
	margin-block-end: 7px;
	border-radius: 12px;
	background-color: color-mix(in srgb, var(--bwc-ec-primary) 10%, #fff);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23ef4056' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l-1 12H7L6 8Z'/%3E%3Cpath d='M9 9V6a3 3 0 0 1 6 0v3'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content:empty::after,
.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content:not(:has(*))::after {
	content: "سبد خرید شما خالی است";
	display: block;
	color: var(--bwc-ec-ink);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.9;
}

/* Product rows. */
.elementor-widget-woocommerce-menu-cart ul.woocommerce-mini-cart {
	max-block-size: 240px !important;
	margin: 0 0 8px !important;
	padding: 0 2px 0 6px !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	scrollbar-width: thin;
	scrollbar-color: #d7dbe6 transparent;
}

.elementor-widget-woocommerce-menu-cart ul.woocommerce-mini-cart::-webkit-scrollbar {
	inline-size: 5px;
}

.elementor-widget-woocommerce-menu-cart ul.woocommerce-mini-cart::-webkit-scrollbar-thumb {
	border-radius: 9px;
	background: #d7dbe6;
}

.elementor-widget-woocommerce-menu-cart li.woocommerce-mini-cart-item {
	position: relative !important;
	display: grid !important;
	grid-template-columns: 52px minmax(0, 1fr) !important;
	gap: 8px !important;
	min-block-size: 66px !important;
	margin: 0 0 7px !important;
	padding: 7px !important;
	border: 1px solid var(--bwc-ec-line) !important;
	border-radius: 11px !important;
	background: #fff !important;
	color: var(--bwc-ec-ink) !important;
}

.elementor-widget-woocommerce-menu-cart li.woocommerce-mini-cart-item > a:not(.remove) {
	grid-column: 1 / -1;
	display: grid !important;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 8px;
	align-items: center;
	color: var(--bwc-ec-ink) !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1.8 !important;
	text-decoration: none !important;
}

.elementor-widget-woocommerce-menu-cart li.woocommerce-mini-cart-item img {
	inline-size: 52px !important;
	block-size: 52px !important;
	margin: 0 !important;
	border-radius: 9px !important;
	object-fit: cover;
}

.elementor-widget-woocommerce-menu-cart li.woocommerce-mini-cart-item .quantity {
	grid-column: 2;
	margin-block-start: -24px;
	color: var(--bwc-ec-muted) !important;
	font-size: 10px !important;
	font-weight: 600;
}

.elementor-widget-woocommerce-menu-cart li.woocommerce-mini-cart-item a.remove {
	position: absolute !important;
	inset-block-start: 7px !important;
	inset-inline-start: 7px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	inline-size: 23px !important;
	block-size: 23px !important;
	border: 1px solid #fee2e2 !important;
	border-radius: 9px !important;
	background: #fff5f5 !important;
	color: #dc2626 !important;
	font-size: 15px !important;
	line-height: 1 !important;
	text-decoration: none !important;
}

.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__subtotal {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: 0 !important;
	padding: 9px 3px !important;
	border-block: 1px solid var(--bwc-ec-line) !important;
	color: var(--bwc-ec-muted) !important;
	font-size: 11px !important;
	line-height: 1.8 !important;
}

.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__subtotal .amount {
	color: var(--bwc-ec-ink) !important;
	font-size: 13px !important;
	font-weight: 800 !important;
}

.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__buttons {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
	margin: 8px 0 0 !important;
}

.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__buttons .button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-block-size: 38px !important;
	margin: 0 !important;
	padding: 0 12px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: #eef1f7 !important;
	box-shadow: none !important;
	color: var(--bwc-ec-ink) !important;
	font-size: 11px !important;
	font-weight: 800 !important;
	line-height: 1.4 !important;
	text-align: center;
	text-decoration: none !important;
}

.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__buttons .checkout {
	background: var(--bwc-ec-primary) !important;
	color: #fff !important;
	box-shadow: 0 9px 20px color-mix(in srgb, var(--bwc-ec-primary) 24%, transparent) !important;
}

@media (max-width: 520px) {
	.elementor-widget-woocommerce-menu-cart.elementor-menu-cart--cart-type-mini-cart .elementor-menu-cart__main {
		inline-size: calc(100vw - 20px) !important;
		max-block-size: calc(100vh - 76px) !important;
		padding: 12px !important;
		border-radius: 18px !important;
	}

	.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content:empty,
	.elementor-widget-woocommerce-menu-cart .widget_shopping_cart_content:not(:has(*)),
	.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__empty-message {
		min-block-size: 108px !important;
	}

	.elementor-widget-woocommerce-menu-cart .woocommerce-mini-cart__buttons {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elementor-widget-woocommerce-menu-cart *,
	.elementor-widget-woocommerce-menu-cart *::before,
	.elementor-widget-woocommerce-menu-cart *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
