/* Multyg cart + mini-cart. Shares the checkout design language. */

/* ================= free-gift progress (cart page + mini-cart) ================= */
.mg-gift-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 1px solid #d9cfe0;
	border-radius: 12px;
	background: linear-gradient(180deg, #faf6fc, #fff 70%);
}
.mg-gift-bar.is-unlocked {
	border-color: #bfe6cc;
	background: linear-gradient(180deg, #f2fbf5, #fff 70%);
}
.mg-gift-icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #7b2d8e;
	color: #fff;
}
.mg-gift-bar.is-unlocked .mg-gift-icon { background: #1a7f37; }
.mg-gift-icon svg { width: 22px; height: 22px; }
.mg-gift-text { flex: 1; min-width: 0; }
.mg-gift-text p { margin: 0 0 7px; font-size: 13.5px; line-height: 1.4; }
.mg-gift-track {
	display: block;
	height: 7px;
	border-radius: 999px;
	background: #eee6f1;
	overflow: hidden;
}
.mg-gift-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: #7b2d8e;
	transition: width 0.4s ease;
}
.mg-gift-bar.is-unlocked .mg-gift-fill { background: #1a7f37; }

/* compact variant inside the mini-cart drawer */
.widget_shopping_cart .mg-gift-bar,
.shoptimizer-mini-cart-wrap .mg-gift-bar {
	gap: 10px;
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 10px;
}
.widget_shopping_cart .mg-gift-icon,
.shoptimizer-mini-cart-wrap .mg-gift-icon { width: 32px; height: 32px; }
.widget_shopping_cart .mg-gift-icon svg,
.shoptimizer-mini-cart-wrap .mg-gift-icon svg { width: 18px; height: 18px; }
.widget_shopping_cart .mg-gift-text p,
.shoptimizer-mini-cart-wrap .mg-gift-text p { font-size: 12px; margin-bottom: 5px; }
.widget_shopping_cart .mg-gift-track,
.shoptimizer-mini-cart-wrap .mg-gift-track { height: 5px; }

/* ================= tick strip ================= */
.woocommerce-cart .mg-ticks {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 2px 0 16px;
}
.mg-tick {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: #a39daa;
}
.mg-tick.is-active { color: #191919; }
.mg-tick-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #e4dfe8;
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
}
.mg-tick.is-active .mg-tick-dot { background: #7b2d8e; }
.mg-tick-line {
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: #e4dfe8;
}

/* ================= layout: items left, totals right ================= */
.woocommerce-cart:not(.cart-empty-page) .site-main { max-width: 1200px; margin: 0 auto; }
@media (min-width: 993px) {
	.shoptimizer-cart-wrapper {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 400px;
		gap: 28px;
		align-items: start;
	}
	.shoptimizer-cart-wrapper .woocommerce-cart-form { grid-column: 1; }
	.shoptimizer-cart-wrapper .cart-collaterals {
		grid-column: 2;
		position: sticky;
		top: 24px;
		float: none !important;
		width: auto !important;
	}
}

/* items card */
.woocommerce-cart form.woocommerce-cart-form { width: 100%; }
.woocommerce-cart form.woocommerce-cart-form table.cart {
	width: 100%; /* fill the column up to the totals box */
	background: #fff;
	border: 1px solid #e6e3e8;
	border-radius: 14px;
	padding: 6px 18px;
	border-collapse: separate;
	margin-bottom: 0;
}
.woocommerce-cart table.cart td.product-name { width: 100%; }
.woocommerce-cart table.cart thead { display: none; }
.woocommerce-cart table.cart td, .woocommerce-cart table.cart th {
	border: none;
	border-bottom: 1px solid #f0edf2;
	padding: 14px 8px;
	background: none;
	font-size: 14px;
}
.woocommerce-cart table.cart td.product-thumbnail { width: 72px; }
.woocommerce-cart table.cart td.product-thumbnail img {
	width: 64px;
	max-width: 64px;
	border-radius: 9px;
	border: 1px solid #e6e3e8;
}
.woocommerce-cart table.cart td.product-name a {
	font-weight: 500;
	font-size: 14px;
	line-height: 1.4;
	color: #191919;
}
.woocommerce-cart table.cart td.product-subtotal { font-weight: 600; }
.woocommerce-cart table.cart a.remove {
	color: #a09aa5 !important;
	font-size: 18px;
	font-weight: 400;
}
.woocommerce-cart table.cart a.remove:hover { color: #d63638 !important; background: none !important; }

/* coupon row */
.woocommerce-cart table.cart td.actions {
	border-bottom: none;
	padding: 14px 8px;
}
.woocommerce-cart table.cart td.actions .coupon {
	display: flex;
	gap: 8px;
	float: none;
	width: 100%;
	max-width: 380px;
}
.woocommerce-cart table.cart td.actions .coupon input#coupon_code {
	flex: 1;
	min-width: 0;
	height: 42px;
	width: auto;
	padding: 0 12px;
	font-size: 14px;
	border: 1px solid #d3ccd8;
	border-radius: 9px;
}
.woocommerce-cart table.cart td.actions .coupon button[name="apply_coupon"] {
	height: 42px;
	padding: 0 16px;
	border: 1px solid #7b2d8e;
	border-radius: 9px;
	background: #fff !important;
	color: #7b2d8e !important;
	font-size: 13.5px;
	font-weight: 600;
}
.woocommerce-cart table.cart td.actions .coupon button[name="apply_coupon"]:hover {
	background: #f7f0f9 !important;
}

/* the cart-summary widget area (testimonial list) duplicates the reviews block */
.woocommerce-cart .woocommerce-cart-form .cart-summary { display: none; }

/* totals card */
.woocommerce-cart .cart_totals {
	background: #fff;
	border: 1px solid #e6e3e8;
	border-radius: 14px;
	padding: 18px;
	width: 100% !important;
}
.woocommerce-cart .cart_totals h2 { display: none; }
.woocommerce-cart .cart_totals table.shop_table {
	border: none;
	margin-bottom: 6px;
	background: none;
}
.woocommerce-cart .cart_totals table.shop_table tr,
.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
	border: none;
	background: none !important; /* theme tints tfoot rows gray */
	font-size: 14px;
}
.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td {
	border-bottom: 1px solid #f0edf2;
	padding: 10px 0;
}
.woocommerce-cart .cart_totals table.shop_table tr.order-total th,
.woocommerce-cart .cart_totals table.shop_table tr.order-total td {
	border-bottom: none;
	font-size: 17px;
	font-weight: 700;
}
.woocommerce-cart .cart_totals tr.shipping,
.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals {
	display: none; /* delivery is chosen at checkout; the note row explains */
}
.woocommerce-cart .cart_totals tr.mg-cart-ship-note td {
	border-bottom: none;
	padding-top: 0;
	font-size: 12px;
	color: #8a8a8a;
	text-align: left;
}
.woocommerce-cart .wc-proceed-to-checkout {
	padding: 0;
	margin: 12px 0 0;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	background: #7b2d8e !important;
	border-radius: 12px;
	font-weight: 700;
	margin-bottom: 0;
	transition: background 0.15s;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
	background: #5e1f6e !important;
}

/* trust under the CTA */
.mg-cart-trust { margin-top: 12px; text-align: center; }
.mg-cart-secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0 0 8px;
	font-size: 12.5px;
	color: #6d6d6d;
}
.mg-cart-secure svg { width: 14px; height: 14px; color: #1a7f37; }
.mg-cart-pays { margin: 0; }
.mg-cart-pays i {
	display: inline-block;
	margin: 0 3px 4px 0;
	padding: 2px 9px;
	border: 1px solid #e6e3e8;
	border-radius: 999px;
	background: #fff;
	font-size: 11px;
	font-style: normal;
	font-weight: 600;
	color: #555;
}

/* reviews band below the cart (markup from mg_trust_reviews_html) */
.mg-cart-reviews-band {
	clear: both;
	margin: 2.5rem 0 1rem;
	padding-top: 2rem;
	border-top: 1px solid #f0edf2;
}
.mg-cart-reviews-band .mg-reviews-head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 16px;
	font-size: 14px;
	font-weight: 700;
	color: #333;
}
.mg-cart-reviews-band .mg-stars { display: inline-flex; gap: 1px; }
.mg-cart-reviews-band .mg-stars svg { width: 16px; height: 16px; color: #f5a623; }
.mg-cart-reviews-band .mg-reviews {
	display: grid;
	grid-template-columns: auto;
}
@media (min-width: 768px) {
	.mg-cart-reviews-band .mg-reviews {
		grid-template-columns: repeat(3, 1fr);
		gap: 14px;
	}
	.mg-cart-reviews-band .mg-reviews-head,
	.mg-cart-reviews-band .mg-reviews-all { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	.mg-cart-reviews-band .mg-reviews-head {
		flex-direction: column;
		justify-content: center;
		text-align: center;
		gap: 5px;
	}
}
.mg-cart-reviews-band .mg-review {
	margin: 0 0 10px;
	padding: 14px 16px;
	border: 1px solid #eeebf0;
	border-radius: 12px;
	background: #fbfafc;
	font-style: normal;
}
.mg-cart-reviews-band .mg-review p {
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.55;
	color: #4a4a4a;
}
.mg-cart-reviews-band .mg-review footer { font-size: 12px; font-weight: 600; color: #6d6d6d; }
.mg-cart-reviews-band .mg-review footer i {
	margin-left: 8px;
	font-style: normal;
	font-weight: 600;
	color: #1a7f37;
	font-size: 11px;
}

/* mobile: compact item rows like the checkout drawer:
   line 1 [thumb][name]  ·  line 2 [qty stepper ...... subtotal], remove pinned top-right */
@media (max-width: 992px) {
	.woocommerce-cart form.woocommerce-cart-form table.cart,
	.woocommerce-cart form.woocommerce-cart-form table.cart tbody {
		display: block;
		width: 100%;
	}
	.woocommerce-cart table.cart tbody tr.cart_item {
		display: grid;
		grid-template-columns: 64px minmax(0, 1fr) auto;
		grid-template-areas:
			"thumb name name"
			"thumb qty subtotal";
		column-gap: 12px;
		row-gap: 2px;
		align-items: start; /* name + stepper cluster top-aligned with the image */
		position: relative;
		padding: 12px 0;
		border-bottom: 1px solid #f0edf2;
	}
	.woocommerce-cart table.cart tbody tr.cart_item:last-of-type { border-bottom: none; }
	/* theme's m-cart forces a taller min-height on rows; the grid stretched into it */
	.m-cart table.cart tr.woocommerce-cart-form__cart-item,
	.woocommerce-cart table.cart tr.woocommerce-cart-form__cart-item {
		min-height: 95px;
	}
	.woocommerce-cart table.cart tbody tr.cart_item td {
		display: block;
		width: auto;
		padding: 0 !important;
		border: none !important;
	}
	.woocommerce-cart table.cart tbody tr.cart_item td[data-title]::before {
		display: none !important; /* "Quantity:" / "Subtotal:" label rows */
	}
	.woocommerce-cart table.cart td.product-thumbnail {
		grid-area: thumb;
		width: 64px !important;
	}
	.woocommerce-cart table.cart td.product-thumbnail img {
		width: 64px;
		max-width: 64px;
		margin: 0;
		display: block;
	}
	.woocommerce-cart table.cart td.product-name {
		grid-area: name;
		min-width: 0;
		width: auto !important;
		padding-right: 28px !important; /* room for the remove icon */
	}
	.woocommerce-cart table.cart td.product-name a {
		padding-right: 0;
		display: block;
	}
	.woocommerce-cart table.cart td.product-price { display: none !important; }
	.woocommerce-cart table.cart td.product-quantity {
		grid-area: qty;
		justify-self: start;
	}
	.woocommerce-cart table.cart td.product-quantity .quantity {
		margin: 0;
	}
	.woocommerce-cart table.cart td.product-subtotal {
		grid-area: subtotal;
		width: auto !important;
		text-align: right;
		font-weight: 600;
	}
	.woocommerce-cart table.cart td.product-remove {
		position: absolute !important;
		top: 12px;
		right: 0;
		width: auto;
	}
	.woocommerce-cart table.cart td.actions {
		display: block;
		width: 100%;
	}

	/* coupon row alignment (theme's m-cart flex rules fight the flex coupon) */
	.woocommerce-cart table.cart td.actions {
		display: block;
		width: 100%;
		padding: 14px 0 6px;
	}
	.woocommerce-cart table.cart td.actions::before { display: none; }
	.woocommerce-cart table.cart td.actions .coupon {
		max-width: 100%;
		display: flex;
		flex-wrap: nowrap;
		align-items: stretch;
	}
	.woocommerce-cart table.cart td.actions .coupon input#coupon_code {
		flex: 1 1 auto;
		width: auto !important;
		min-width: 0;
		margin: 0;
	}
	.woocommerce-cart table.cart td.actions .coupon button[name="apply_coupon"] {
		flex: 0 0 auto;
		width: auto !important; /* theme forces 100% width on mobile cart buttons */
		max-width: 45%;
		white-space: nowrap;
		margin: 0;
	}
	/* breathing room between the items card and the totals card */
	.woocommerce-cart form.woocommerce-cart-form {
		margin-bottom: 16px;
	}
}

/* ================= empty cart recommendations ================= */
/* the template prints Return-to-shop AFTER the hook output; reorder so the
   button stays with the empty-cart message and the grids come last */
.woocommerce-cart .entry-content > .woocommerce:has(.mg-empty-recs) {
	display: flex;
	flex-direction: column;
}
.mg-empty-recs { order: 99; margin-top: 2.5rem; clear: both; }
.woocommerce-cart p.return-to-shop { margin: 1rem 0 0; }
.mg-empty-recs h2 {
	text-align: center;
	font-size: clamp(1.125rem, 3vw, 1.5rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 2rem 0 1.25rem;
}

/* theme blockquote decorations skew the quote cards; neutralize everywhere we render them */
.mg-review,
.mg-review::before,
.mg-review::after {
	content: none !important;
	quotes: none;
}
blockquote.mg-review {
	margin: 0 0 10px !important;
	border-left: none !important;
	font-style: normal !important;
}
blockquote.mg-review p::before,
blockquote.mg-review p::after { content: none !important; }
.mg-cart-reviews-band .mg-review { display: flex; flex-direction: column; }
.mg-cart-reviews-band .mg-review p { flex: 1; }

.mg-reviews-all {
	margin: 6px 0 0;
	text-align: center;
	font-size: 13.5px;
}
.mg-reviews-all a {
	color: #7b2d8e;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.mg-reviews-sep { margin: 0 8px; color: #b9b3bf; }

/* payment seals widget image under the CTA: muted so the purple CTA stays loudest */
.cart-custom-field img.mg-payment-seals,
.cart-field img.mg-payment-seals {
	display: block;
	margin: 10px auto 0;
	max-width: 94%;
	height: auto;
	filter: grayscale(1) opacity(0.75);
	transition: filter 0.2s;
}
.cart-custom-field img.mg-payment-seals:hover,
.cart-field img.mg-payment-seals:hover {
	filter: none;
}

/* the mini-cart drawer opens above the floating WhatsApp button (z 99999) */
.shoptimizer-mini-cart-wrap {
	z-index: 100001 !important;
}

/* the off-canvas drawer (fixed, parked off the right edge) inflates the mobile
   layout viewport, pushing right edges off-screen. Clip in-flow overflow, and
   remove the parked drawer from rendering entirely (fixed boxes escape the clip). */
html {
	overflow-x: clip;
}
body:not(.drawer-open) .shoptimizer-mini-cart-wrap {
	display: none;
}

/* ================= sticky mobile checkout ================= */
.mg-cart-sticky { display: none; }
@media (max-width: 992px) {
	.mg-cart-sticky.is-visible {
		display: flex;
		align-items: center;
		gap: 12px;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid #e6e3e8;
		box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
	}
	.mg-cart-sticky-total {
		font-size: 15px;
		font-weight: 700;
		white-space: nowrap;
	}
	.mg-cart-sticky-btn {
		flex: 1;
		padding: 13px;
		border-radius: 10px;
		background: #7b2d8e;
		color: #fff !important;
		text-align: center;
		font-size: 15px;
		font-weight: 700;
		text-decoration: none;
	}
}
