/**
 * Side cart drawer – ported from production (mweb-digiland-pro cart_sidebar / mini_cart / free_shipping_progress),
 * self-contained and scoped to #eyn-cart-sidebar.
 */
#eyn-cart-sidebar {
	--eyn-cart-main: #764300;
	--eyn-cart-accent: #c39052;
	--eyn-cart-price: #e2574c;
	position: fixed;
	top: 0;
	right: 0;
	width: 330px;
	max-width: 88vw;
	height: 100%;
	padding: 0;
	background: #fff;
	box-shadow: -6px 0 30px rgba(0, 0, 0, 0.08);
	z-index: 99999;
	font-family: var(--eyn-font, inherit);
	direction: rtl;
	text-align: right;
}

#eyn-cart-sidebar .cart_sidebar_wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
	width: 100%;
}

/* Head */
#eyn-cart-sidebar .cart_sidebar_head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 20px;
	margin: 0;
	border: 0;
	border-bottom: 1px solid #eaeaec;
	font-size: 12px;
	font-weight: 600;
	color: #454545;
	opacity: 1;
	position: relative;
}

#eyn-cart-sidebar .cart_sidebar_head strong {
	font-weight: 700;
	font-size: 13px;
}

#eyn-cart-sidebar .cart_sidebar_head .cart_count {
	float: none;
	display: inline-block;
	margin: 0;
	padding: 0 4px;
	min-width: 16px;
	height: 16px;
	line-height: 16px;
	border-radius: 3px;
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	background: var(--eyn-cart-accent);
	color: #fff;
}

#eyn-cart-sidebar .cart_sidebar_close {
	position: absolute;
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	color: #555;
}

#eyn-cart-sidebar .cart_sidebar_close svg {
	width: 20px;
	height: 20px;
	stroke: #555;
	fill: none;
}

#eyn-cart-sidebar .cart_sidebar_close:hover svg {
	stroke: #e2574c;
}

/* Body */
#eyn-cart-sidebar .widget_shopping_cart_content {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
}

#eyn-cart-sidebar .cart_list {
	flex: 1 1 auto;
	min-height: 0;
	height: auto;
	list-style: none;
	margin: 0;
	padding: 0 0 10px;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

#eyn-cart-sidebar .cart_list::-webkit-scrollbar { width: 3px; background: #eee; }
#eyn-cart-sidebar .cart_list::-webkit-scrollbar-thumb { background: #a7a7a7; border-radius: 4px; }

#eyn-cart-sidebar .cart_list .mini_cart_item {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 12px;
	position: relative;
	min-height: 0;
	margin: 0;
	padding: 14px 16px;
	border-bottom: 1px solid #eaeaec;
	font-size: 12px;
	text-align: right;
}

#eyn-cart-sidebar .cart_list .mini_cart_item:last-child { border-bottom: 0; }
#eyn-cart-sidebar .cart_list .mini_cart_item::before,
#eyn-cart-sidebar .cart_list .mini_cart_item::after { display: none; }

#eyn-cart-sidebar .mini_cart_item_right {
	position: relative;
	flex: 0 0 60px;
	max-width: 60px;
}

#eyn-cart-sidebar .mini_cart_item .mini_cart_thumb {
	display: block;
	width: 60px;
	height: 60px;
	min-height: 0;
	padding: 3px;
	border-radius: 7px;
	background: #f5f5f5;
	box-shadow: 0 0 10px -5px rgba(0, 0, 0, 0.15);
	overflow: hidden;
}

#eyn-cart-sidebar .mini_cart_item .mini_cart_thumb img {
	display: block;
	float: none;
	width: 100%;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	object-fit: contain;
	border-radius: 5px;
	box-shadow: none;
}

#eyn-cart-sidebar .mini_cart_item .remove {
	position: absolute;
	top: -6px;
	right: -6px;
	left: auto;
	z-index: 2;
	width: 16px;
	height: 16px;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	line-height: 1;
	border: 1px solid #fe6780;
	border-radius: 6px;
	background: #fff;
	color: #fe6780;
	text-decoration: none;
}

#eyn-cart-sidebar .mini_cart_item .remove:hover {
	background: #fe6780;
	color: #fff;
}

#eyn-cart-sidebar .mini_cart_item_left {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 2px;
}

#eyn-cart-sidebar .mini_cart_item .mini_cart_name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.8;
	color: #555;
	text-decoration: none;
}

#eyn-cart-sidebar .mini_cart_item .mini_cart_name:hover { color: var(--eyn-cart-main); }

#eyn-cart-sidebar .mini_cart_item dl.variation {
	margin: 0;
	font-size: 10px;
	color: #888;
}

#eyn-cart-sidebar .mini_cart_item dl.variation dt,
#eyn-cart-sidebar .mini_cart_item dl.variation dd {
	display: inline;
	margin: 0;
	float: none;
}

#eyn-cart-sidebar .mini_cart_item dl.variation dd p { display: inline; margin: 0; }

#eyn-cart-sidebar .mini_cart_item .quantity {
	display: block;
	padding: 0;
	font-size: 11px;
	color: #666;
}

#eyn-cart-sidebar .mini_cart_item .quantity .amount {
	display: inline-block;
	padding: 0 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--eyn-cart-price);
}

#eyn-cart-sidebar .woocommerce-Price-currencySymbol {
	font-size: 80%;
	font-weight: 400;
	filter: grayscale(1);
}

#eyn-cart-sidebar .cart_list .blockOverlay { opacity: 0.1 !important; }

/* Bottom */
#eyn-cart-sidebar .mini_cart_bottom {
	flex: 0 0 auto;
	position: static;
	width: 100%;
	padding: 0 0 16px;
	background: #fff;
	border-top: 1px solid #eaeaec;
	box-shadow: 0 -8px 20px -14px rgba(0, 0, 0, 0.15);
}

#eyn-cart-sidebar .woocommerce-mini-cart__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: auto;
	margin: 0;
	padding: 14px 20px 10px;
	border: 0;
	font-size: 12px;
	line-height: 1.6;
	color: #444;
}

#eyn-cart-sidebar .woocommerce-mini-cart__total::before,
#eyn-cart-sidebar .woocommerce-mini-cart__total::after { display: none; }

#eyn-cart-sidebar .woocommerce-mini-cart__total strong {
	float: none;
	font-weight: 700;
}

#eyn-cart-sidebar .woocommerce-mini-cart__total .amount {
	float: none;
	font-size: 13px;
	font-weight: 700;
	color: #333;
}

/* Free shipping progress */
#eyn-cart-sidebar .free_shipping_progress {
	margin: 4px 16px 6px;
	padding: 10px;
	border-radius: 5px;
	background: #f4f4f4;
}

#eyn-cart-sidebar .free_shipping_progress p {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	font-size: 11px;
	color: #444;
	text-align: right;
}

#eyn-cart-sidebar .free_shipping_progress p svg {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	stroke: var(--eyn-cart-main);
	fill: none;
}

#eyn-cart-sidebar .free_shipping_progress p b {
	color: var(--eyn-cart-main);
	font-weight: 600;
}

#eyn-cart-sidebar .free_shipping_progress p .amount { font-size: 12px; }

#eyn-cart-sidebar .free_shipping_progress p > span:not(.amount):not(.woocommerce-Price-amount) {
	margin-right: auto;
	display: inline-flex;
	align-items: center;
	height: 18px;
	padding: 0 8px 0 0;
	border-radius: 40px;
	background: #e4e4e4;
	color: #444;
	font-size: 10px;
	line-height: 18px;
	direction: ltr;
}

#eyn-cart-sidebar .free_shipping_progress p > span:not(.amount):not(.woocommerce-Price-amount)::before {
	content: '%';
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-right: 6px;
	border-radius: 50%;
	background: #f44336;
	color: #fff;
	text-align: center;
	line-height: 19px;
	font-size: 10px;
}

#eyn-cart-sidebar .free_shipping_progress .progress_shipping {
	display: block;
	width: 100%;
	height: 4px;
	margin-top: 10px;
	border-radius: 30px;
	background: #e2e2e2;
	overflow: hidden;
}

#eyn-cart-sidebar .free_shipping_progress .progress_shipping_bar {
	height: 100%;
	max-width: 100%;
	border-radius: 14px;
	background: var(--eyn-cart-accent);
	transition: width 0.6s ease;
}

/* Buttons */
#eyn-cart-sidebar .woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 8px 0 0 !important;
	padding: 0 16px;
}

#eyn-cart-sidebar .woocommerce-mini-cart__buttons::before,
#eyn-cart-sidebar .woocommerce-mini-cart__buttons::after { display: none; }

#eyn-cart-sidebar .woocommerce-mini-cart__buttons .button {
	display: block;
	float: none;
	width: 100%;
	margin: 0;
	padding: 9px 10px;
	border: 0;
	border-radius: 10px;
	background: var(--eyn-cart-main);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	text-align: center;
	text-decoration: none;
}

#eyn-cart-sidebar .woocommerce-mini-cart__buttons .button:hover {
	background: #5c3400;
	color: #fff;
}

/* Empty */
#eyn-cart-sidebar .woocommerce-mini-cart__empty-message {
	margin: 20px 15px;
	padding: 25px 10px;
	border-radius: 7px;
	background: rgba(0, 0, 0, 0.05);
	text-align: center;
	font-size: 13px;
	color: #666;
}

#eyn-cart-sidebar .woocommerce-mini-cart__empty-message svg {
	display: block;
	width: 40px;
	height: 40px;
	margin: 0 auto 10px;
	stroke: #999;
	fill: none;
	opacity: 0.4;
}

@media (max-width: 767px) {
	#eyn-cart-sidebar {
		width: 320px;
		max-width: 88vw;
	}

	#eyn-cart-sidebar .cart_list .mini_cart_item { padding: 12px 14px; }
	#eyn-cart-sidebar .free_shipping_progress { margin: 4px 14px 6px; }
	#eyn-cart-sidebar .woocommerce-mini-cart__buttons { padding: 0 14px; }
	#eyn-cart-sidebar .woocommerce-mini-cart__buttons .button { padding: 10px; font-size: 13px; }
}
