/* Mesquite Cart Popup v1.0.0 — brand: #0BB451 / #000 / Roboto */

/* ---- Turn off WooCommerce's other "added" UI ---- */
a.added_to_cart.wc-forward,
.woocommerce a.added_to_cart,
.wc-block-components-product-button a.added_to_cart { display: none !important; }

/* Loading state on single-product button */
.single_add_to_cart_button.mmcp-loading { position: relative; color: transparent !important; pointer-events: none; }
.single_add_to_cart_button.mmcp-loading::after {
	content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
	border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
	animation: mmcp-spin .7s linear infinite; opacity: 1;
}
@keyframes mmcp-spin { to { transform: rotate(360deg); } }

/* Scroll lock */
html.mmcp-lock, html.mmcp-lock body { overflow: hidden !important; }
html.mmcp-lock body { padding-right: var(--mmcp-sb, 0); }

/* ---- Popup ---- */
.mmcp {
	--g: #0BB451; --gd: #099944; --ink: #000; --mut: #5f6368; --line: #E6E6E6; --err: #D93025;
	position: fixed; inset: 0; z-index: 2147483000;
	display: flex; align-items: center; justify-content: center; padding: 20px;
	visibility: hidden; pointer-events: none;
	font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}
.mmcp *, .mmcp *::before, .mmcp *::after { box-sizing: border-box; }
.mmcp--open { visibility: visible; pointer-events: auto; }

.mmcp__overlay {
	position: absolute; inset: 0; background: rgba(0,0,0,.5);
	-webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
	opacity: 0; transition: opacity .25s ease;
}
.mmcp--open .mmcp__overlay { opacity: 1; }

.mmcp__dialog {
	position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow-y: auto;
	background: #fff; color: var(--ink); border-radius: 12px; border-top: 4px solid var(--g);
	box-shadow: 0 24px 60px rgba(0,0,0,.25); padding: 26px 26px 20px; outline: none;
	opacity: 0; transform: translateY(14px) scale(.97);
	transition: opacity .25s ease, transform .3s cubic-bezier(.2,.9,.3,1.15);
}
.mmcp--open .mmcp__dialog { opacity: 1; transform: none; }

.mmcp__x {
	position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; padding: 8px;
	display: inline-flex; align-items: center; justify-content: center;
	background: transparent; border: 0; border-radius: 50%; cursor: pointer; color: var(--ink);
	transition: background .2s ease, color .2s ease;
}
.mmcp__x svg { width: 18px; height: 18px; fill: currentColor; }
.mmcp__x:hover, .mmcp__x:focus-visible { background: #F2F2F2; color: var(--g); outline: none; }

.mmcp__head { display: flex; align-items: center; gap: 12px; padding-right: 40px; margin: 0 0 18px; }
.mmcp__badge {
	flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--g);
	display: inline-flex; align-items: center; justify-content: center;
	animation: mmcp-pop .45s cubic-bezier(.34,1.56,.64,1) both;
}
.mmcp__badge svg { width: 20px; height: 20px; fill: #fff; }
.mmcp__title { margin: 0 !important; padding: 0; font-family: inherit !important; font-size: 20px !important; line-height: 1.25 !important; font-weight: 700 !important; color: var(--ink) !important; text-transform: none !important; letter-spacing: 0 !important; }
@keyframes mmcp-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.mmcp__msg:empty { display: none; }
.mmcp__msg { margin: -6px 0 18px; font-size: 15px; line-height: 1.5; color: var(--mut); }

.mmcp__item { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.mmcp__thumb { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: #F5F5F5; display: block; }
.mmcp__thumb img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; margin: 0 !important; }
.mmcp__info { min-width: 0; flex: 1; }
.mmcp__name {
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--ink) !important; text-decoration: none !important;
	transition: color .2s ease;
}
.mmcp__name:hover { color: var(--g) !important; }
.mmcp__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 6px; font-size: 14px; color: var(--mut); }
.mmcp__price { font-weight: 700; color: var(--ink); }
.mmcp__price del { opacity: .55; font-weight: 400; margin-right: 4px; }
.mmcp__price ins { text-decoration: none; }

.mmcp__summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding: 4px 2px 16px; font-size: 14px; color: var(--mut); }
.mmcp__subtotal { color: var(--ink); font-size: 17px; font-weight: 700; }

.mmcp__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mmcp__btn {
	display: inline-flex !important; align-items: center; justify-content: center; text-align: center;
	min-height: 50px; padding: 14px 16px !important; border-radius: 6px !important;
	font-family: inherit !important; font-size: 14px !important; font-weight: 500 !important; line-height: 1.2 !important;
	text-transform: uppercase !important; letter-spacing: .6px !important; text-decoration: none !important;
	transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.mmcp__btn--cart { color: var(--ink) !important; background: #fff !important; border: 1px solid var(--ink) !important; }
.mmcp__btn--cart:hover, .mmcp__btn--cart:focus-visible { color: #fff !important; background: var(--ink) !important; outline: none; }
.mmcp__btn--checkout { color: #fff !important; background: var(--g) !important; border: 1px solid var(--g) !important; }
.mmcp__btn--checkout:hover, .mmcp__btn--checkout:focus-visible { background: var(--gd) !important; border-color: var(--gd) !important; box-shadow: 0 8px 20px rgba(11,180,81,.28); transform: translateY(-1px); outline: none; }

.mmcp__continue {
	display: block; width: 100%; margin: 12px 0 0; padding: 10px; background: transparent !important; border: 0 !important;
	font-family: inherit; font-size: 14px; font-weight: 500; color: var(--mut) !important; cursor: pointer;
	text-decoration: underline; text-underline-offset: 3px; box-shadow: none !important;
}
.mmcp__continue:hover, .mmcp__continue:focus-visible { color: var(--g) !important; outline: none; }

/* Error state */
.mmcp--error .mmcp__dialog { border-top-color: var(--err); }
.mmcp--error .mmcp__badge { background: var(--err); }
.mmcp--error .mmcp__actions { grid-template-columns: 1fr; }

/* Widescreen */
@media (min-width: 2400px) {
	.mmcp__dialog { max-width: 560px; padding: 32px 32px 24px; }
	.mmcp__title { font-size: 23px !important; }
}

/* Tablet & mobile: bottom sheet */
@media (max-width: 767px) {
	.mmcp { align-items: flex-end; padding: 0; }
	.mmcp__dialog {
		max-width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0;
		padding: 22px 18px calc(16px + env(safe-area-inset-bottom));
		transform: translateY(100%);
		transition: opacity .2s ease, transform .32s cubic-bezier(.2,.8,.2,1);
	}
	.mmcp__dialog::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: #DADADA; margin: -10px auto 14px; }
	.mmcp__title { font-size: 18px !important; }
	.mmcp__thumb { flex-basis: 64px; width: 64px; height: 64px; }
	.mmcp__actions { grid-template-columns: 1fr; }
	.mmcp__btn--checkout { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
	.mmcp *, .single_add_to_cart_button.mmcp-loading::after { animation: none !important; transition: none !important; }
}
