/* ===================================================================
   MINI CART — social proof + free shipping bar + "You might also like"
   Style: b7al zerowastestore.com — cards horizontal, "+" dayer fo9
   tswira, kolchi round.
=================================================================== */

:root {
	--wdl-radius: 14px;
	--wdl-radius-sm: 10px;
	--wdl-upsell-bg: #f4f6fb;
	--wdl-proof-bg: #eaf7ee;
	--wdl-proof-dot: #22a565;
}

/* -------------------------------------------------------------------
   1. Social proof strip
------------------------------------------------------------------- */

.wdl-social-proof {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 11px 14px;
	border-radius: var(--wdl-radius);
	background-color: var(--wdl-proof-bg);
	color: #1d1d1f;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
}

.wdl-social-proof strong {
	font-weight: 700;
}

.wdl-social-proof__dot {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--wdl-proof-dot);
	box-shadow: 0 0 0 0 rgba(34, 165, 101, 0.6);
	animation: wdl-pulse 2.2s infinite;
}

@keyframes wdl-pulse {
	70% {
		box-shadow: 0 0 0 7px rgba(34, 165, 101, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(34, 165, 101, 0);
	}
}

/* -------------------------------------------------------------------
   2. Free shipping progress bar
------------------------------------------------------------------- */

.wdl-ship-bar {
	margin-bottom: 18px;
	padding: 14px 16px;
	border-radius: var(--wdl-radius);
	background-color: var(--wd-form-bg, #f5f7f8);
}

.wdl-ship-bar__text {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--wd-title-color, #242424);
}

.wdl-ship-bar__text .amount {
	font-weight: 700;
}

.wdl-ship-bar__track {
	position: relative;
	height: 6px;
	border-radius: 6px;
	overflow: hidden;
	background-color: rgba(0, 0, 0, 0.08);
}

.wdl-ship-bar__fill {
	display: block;
	height: 100%;
	border-radius: 6px;
	background-color: var(--wd-primary-color, #a1cfde);
	transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.wdl-ship-bar--done .wdl-ship-bar__fill {
	background-color: var(--wdl-proof-dot);
}

/* -------------------------------------------------------------------
   3. "You might also like" — cards
------------------------------------------------------------------- */

.wdl-upsell {
	margin: 12px 0 4px;
	padding: 14px 12px 12px;
	background-color: var(--wdl-upsell-bg);
	border-radius: var(--wdl-radius);
}

.wdl-upsell__title {
	margin: 0 0 11px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wd-title-color, #242424);
}

/* 3 cards banin bzabt — o l client kay9der yscrolli l imen */
.wdl-upsell__grid {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 10px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 2px;
	/* Scrollbar mkhebbya — l scroll kaykhdem b l jebd (souri) o b l swipe */
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
}

.wdl-upsell__grid.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

/* Scrollbar mkhebbya bsifa kamla */
.wdl-upsell__grid::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

/* Mnin kanjebdo b l souri, l links ma ykhdmoch */
.wdl-upsell__grid.is-dragging a {
	pointer-events: none;
}

.wdl-upsell__card {
	/* 3 f l 3ard: (100% - 2 gaps dyal 10px) / 3 */
	flex: 0 0 calc((100% - 20px) / 3);
	min-width: 0;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	border-radius: var(--wdl-radius);
	overflow: hidden;
	background-color: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
	transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.wdl-upsell__card:hover {
	box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
	transform: translateY(-2px);
}

.wdl-upsell__card.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* --- media + "+" button overlay --- */

.cart-widget-side .wdl-upsell .wdl-upsell__media,
.wdl-upsell__media {
	position: relative !important;
	/* Machi murabba3 — a9sar bach l card ma tweliCh ktana */
	aspect-ratio: 5 / 4;
	overflow: hidden;
	background-color: #f2f2f4;
}

/* L <a> kayghatti l media KAMLA (position absolute = mdmoun 100%,
   makayn 7etta rule dyal Woodmart/Woo li y9der ykhessro) */
.cart-widget-side .wdl-upsell .wdl-upsell__thumb,
.wdl-upsell__thumb {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	line-height: 0 !important;
}

.cart-widget-side .wdl-upsell .wdl-upsell__thumb img,
.cart-widget-side .wdl-upsell img.wdl-upsell__img,
.wdl-upsell__thumb img {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	min-width: 100% !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
	opacity: 1 !important;
}

/* Ila Woodmart lazy 7ell class wd-lazy-fade, khellih baynn */
.wdl-upsell__thumb img.wd-lazy-fade {
	opacity: 1 !important;
}

.cart-widget-side .wdl-upsell .wdl-upsell__add,
.wdl-upsell__add {
	position: absolute !important;
	top: 8px !important;
	inset-inline-end: 8px !important;
	inset-inline-start: auto !important;
	bottom: auto !important;
	z-index: 3;
	/* CIRCLE m9addem: kanqeffdo l 9yas mn kol jiha bach walo ma ymeddo */
	width: 30px !important;
	height: 30px !important;
	min-width: 30px !important;
	max-width: 30px !important;
	min-height: 30px !important;
	max-height: 30px !important;
	flex: 0 0 30px !important;
	aspect-ratio: 1 / 1 !important;
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	overflow: hidden !important;
	cursor: pointer;
	text-decoration: none;
	background-color: #fff !important;
	color: var(--wd-title-color, #242424) !important;
	box-shadow: 0 2px 8px rgba(16, 24, 40, 0.18);
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

.wdl-upsell__add:hover {
	background-color: var(--wd-primary-color, #a1cfde) !important;
	color: #fff !important;
}

.wdl-upsell__add:active {
	transform: scale(0.9);
}

.wdl-upsell__add-icon {
	font-size: 20px;
	line-height: 1;
	font-weight: 300;
	margin-top: -2px;
}

.wdl-upsell__add.is-added {
	background-color: var(--wdl-proof-dot) !important;
	color: #fff !important;
}

.wdl-upsell__add.is-added .wdl-upsell__add-icon {
	font-size: 0;
}

.wdl-upsell__add.is-added .wdl-upsell__add-icon::before {
	content: "\2713";
	font-size: 17px;
}

/* Spinner */
.wdl-upsell__add.is-loading .wdl-upsell__add-icon {
	font-size: 0;
}

.wdl-upsell__add.is-loading::after {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid rgba(0, 0, 0, 0.15);
	border-top-color: var(--wd-title-color, #242424);
	border-radius: 50%;
	animation: wdl-spin 0.6s linear infinite;
}

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

/* --- card text --- */

.wdl-upsell__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 9px 9px 10px;
}

.cart-widget-side .wdl-upsell .wdl-upsell__name,
.wdl-upsell__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3 !important;
	color: var(--wd-entities-title-color, #333);
	text-decoration: none;
	/* MAX 2 LINES — ma yfotch */
	display: -webkit-box !important;
	-webkit-line-clamp: 2 !important;
	line-clamp: 2 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
	max-height: 2.6em !important;
	word-break: break-word;
}

.wdl-upsell__name:hover {
	color: var(--wd-primary-color, #a1cfde);
}

.wdl-upsell__price {
	font-size: 14px;
	font-weight: 700;
	color: var(--wd-title-color, #242424);
	line-height: 1;
}

.wdl-upsell__price .amount {
	color: inherit;
	font-size: inherit;
}

.wdl-upsell__price del {
	font-weight: 400;
	font-size: 87%;
	opacity: 0.5;
}

.wdl-upsell__price ins {
	text-decoration: none;
}

/* ===================================================================
   4. SIDE CART KBAR (Shoptimizer-like)
=================================================================== */

.cart-widget-side,
.wd-side-cart,
.woodmart-side-cart {
	width: 460px !important;
	max-width: 94vw !important;
}

@media (max-width: 768px) {
	.cart-widget-side,
	.wd-side-cart,
	.woodmart-side-cart {
		width: 94vw !important;
		max-width: 94vw !important;
	}
}

/* --- Items: rows wass3in, tswar kbar, text kbar --- */

.cart-widget-side .woocommerce-mini-cart-item,
.cart-widget-side .mini_cart_item {
	padding: 14px 4px !important;
}

.cart-widget-side .mini_cart_item .cart-item-image,
.cart-widget-side .mini_cart_item .cart-item-image img {
	width: 78px !important;
	max-width: 78px !important;
	height: auto !important;
}

.cart-widget-side .mini_cart_item .wd-entities-title {
	font-size: 16px !important;
	line-height: 1.3 !important;
	font-weight: 600;
}

.cart-widget-side .mini_cart_item .quantity,
.cart-widget-side .mini_cart_item .amount {
	font-size: 15px !important;
}

.cart-widget-side .woocommerce-mini-cart__total {
	padding-block: 14px !important;
	font-size: 17px;
}

.cart-widget-side .woocommerce-mini-cart__total .amount {
	font-size: 20px !important;
	font-weight: 700;
}

/* --- ACTIONS: Subtotal + buttons DIMA F L TE7T (sticky) --- */

.cart-widget-side .wdl-cart-actions {
	padding: 14px 0 4px;
	background-color: #fff;
}

.cart-widget-side .wdl-cart-actions .woocommerce-mini-cart__total {
	margin: 0 0 10px !important;
	padding: 0 !important;
	font-size: 15px;
}

.cart-widget-side .wdl-cart-actions .woocommerce-mini-cart__total .amount {
	font-size: 18px !important;
	font-weight: 700;
}

/* --- Buttons: hajm 3adi dyal l site --- */

.cart-widget-side .woocommerce-mini-cart__buttons,
.cart-widget-side .buttons {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 10px;
	margin: 0 !important;
	padding: 0 !important;
}

.cart-widget-side .woocommerce-mini-cart__buttons > a,
.cart-widget-side .buttons > a {
	display: inline-flex !important;
	flex: 1 1 0;
	min-width: 0;
	margin: 0 !important;
	/* Nafs l hajm dyal l buttons dyal l site */
	min-height: var(--btn-height, 42px);
	padding: 8px 14px !important;
	font-size: var(--btn-font-size, 14px) !important;
	font-weight: var(--btn-font-weight, 500);
	line-height: 1.2;
	text-align: center;
	border-radius: 50px !important;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
}

/* Footer: blasa mn l jnab */
.cart-widget-side .shopping-cart-widget-footer {
	display: flex;
	flex-direction: column;
	padding-inline: 2px;
	padding-bottom: 0;
}

/* -------------------------------------------------------------------
   5. Round-ha kolchi f side cart + khelli blasa l cart items
------------------------------------------------------------------- */

/* LAYOUT dyal l panel:
     [ social proof      ]  <- thabet f l fo9
     [ products          ]  <- kayscrolli
     [ You might also    ]  <- kayscrolli m3a l products
     [ Subtotal          ]  <- THABET f l te7t
     [ View Cart | Check ]  <- THABET f l te7t                       */

.cart-widget-side .widget_shopping_cart_content {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	overflow: hidden !important;
}

/* L zone li kayscrolli: products + You might also like */
.cart-widget-side .shopping-cart-widget-body {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	max-height: none !important;
	overflow-y: auto !important;
	/* Ma bghinach scrollbar ofoqi f l panel */
	overflow-x: hidden !important;
	overscroll-behavior: contain;
}

.cart-widget-side .shopping-cart-widget-body .wd-scroll-content,
.cart-widget-side .cart_list {
	overflow-x: hidden !important;
}

.cart-widget-side .shopping-cart-widget-body .wd-scroll-content {
	max-height: none !important;
	height: auto !important;
	overflow: visible !important;
}

/* L footer: DIMA f l te7t, ma kayscrollich */
.cart-widget-side .shopping-cart-widget-footer {
	flex: 0 0 auto !important;
	margin-top: auto;
}

/* 7AYED L KHTOT: l border dyal akhir product 9bel l upsell, o l border
   dyal l liste kamla — l upsell 3endo background dyalo, ma khassoch khtot. */
.cart-widget-side .woocommerce-mini-cart-item:has( + li.wdl-upsell-li ),
.cart-widget-side .cart_list > li:last-child,
.cart-widget-side li.wdl-upsell-li,
.cart-widget-side li.wdl-upsell-li + li,
.cart-widget-side .shopping-cart-widget-body .wd-scroll-content,
.cart-widget-side .cart_list {
	border-bottom: 0 !important;
	border-top: 0 !important;
	box-shadow: none !important;
}

/* L upsell f l liste: 7ayd l style dyal <li> */
.cart-widget-side li.wdl-upsell-li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
}

.cart-widget-side li.wdl-upsell-li::before,
.cart-widget-side li.wdl-upsell-li::after {
	content: none !important;
}

.cart-widget-side .woocommerce-mini-cart-item .cart-item-image img {
	border-radius: var(--wdl-radius-sm);
}

.cart-widget-side :is(.button, .btn, .checkout) {
	border-radius: 50px;
}



/* ===================================================================
   MOBILE — buttons o payment icons sghar chwiya
=================================================================== */

@media (max-width: 768px) {
	.cart-widget-side .woocommerce-mini-cart__buttons,
	.cart-widget-side .buttons {
		gap: 8px;
	}

	.cart-widget-side .woocommerce-mini-cart__buttons > a,
	.cart-widget-side .buttons > a {
		min-height: 42px;
		padding: 8px 10px !important;
		font-size: 14px !important;
	}

	/* Cards chwiya sghar bach l 3 ybanou mrta7in */
	.wdl-upsell {
		padding: 12px 10px 10px;
	}

	.wdl-upsell__title {
		font-size: 15px;
		margin-bottom: 10px;
	}

	.wdl-upsell__name {
		font-size: 12px;
		max-height: 2.6em !important;
	}

	.wdl-upsell__price {
		font-size: 13px;
	}

	.wdl-upsell__add {
		width: 28px !important;
		height: 28px !important;
		min-width: 28px !important;
		max-width: 28px !important;
		min-height: 28px !important;
		max-height: 28px !important;
		flex: 0 0 28px !important;
	}

	.wdl-upsell__add-icon {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wdl-ship-bar__fill,
	.wdl-upsell__card,
	.wdl-upsell__add,
	.wdl-social-proof__dot {
		transition: none;
		animation: none;
	}

	.wdl-upsell__add.is-loading::after {
		animation: none;
	}
}
