/**
 * Sitewide shopping-feature styling (Phase 4): the wishlist heart + quick
 * view trigger overlaid on any product card, the add-to-cart toast, and the
 * Quick View modal. Loaded on every page since product cards can appear on
 * the homepage, Shop grid, brand archives, and the Wishlist page alike.
 */

/* Wishlist heart + Quick View trigger, overlaid on a card's image ------- */

.mm-pcard-actions {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
}

.mm-wish-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1.5px solid var(--mm-mg);
	background: rgba(255, 255, 255, .92);
	color: var(--mm-t);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .15s;
	padding: 0;
}

.mm-wish-btn:hover { border-color: var(--mm-r); color: var(--mm-r); transform: scale(1.08); }
.mm-wish-btn.is-active { background: var(--mm-r); border-color: var(--mm-r); color: #fff; }
.mm-wish-btn.is-active span { text-shadow: none; }

.mm-qv-btn {
	border-radius: 16px;
	border: 1.5px solid var(--mm-mg);
	background: rgba(255, 255, 255, .92);
	color: var(--mm-t);
	font-family: var(--mm-fb);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	cursor: pointer;
	padding: 6px 10px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	opacity: 0;
	transform: translateY(-4px);
	transition: all .15s;
	white-space: nowrap;
}

.mm-pcard:hover .mm-qv-btn,
.mm-flash-card:hover .mm-qv-btn,
.mm-qv-btn:focus-visible {
	opacity: 1;
	transform: translateY(0);
}

.mm-qv-btn:hover { border-color: var(--mm-r); color: var(--mm-r); }

@media (hover: none) {
	/* Touch devices have no hover state to reveal it on — keep it visible. */
	.mm-qv-btn { opacity: 1; transform: none; }
}

/* Add-to-cart toast ------------------------------------------------------ */

.mm-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translate(-50%, 12px);
	background: var(--mm-t);
	color: #fff;
	font-family: var(--mm-fb);
	font-size: 13.5px;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 999px;
	box-shadow: var(--mm-sh-lg);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
	z-index: 9999;
}

.mm-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Quick View modal --------------------------------------------------------- */

.mm-qv-modal { position: fixed; inset: 0; z-index: 9998; }
.mm-qv-modal[hidden] { display: none; }

.mm-qv-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 22, 18, .6);
}

.mm-qv-dialog {
	position: relative;
	max-width: 780px;
	width: calc(100% - 40px);
	margin: 5vh auto;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--mm-cream-3);
	border-radius: 14px;
	box-shadow: var(--mm-sh-lg);
	padding: 32px;
}

.mm-qv-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid var(--mm-mg);
	background: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--mm-t);
}

.mm-qv-close:hover { border-color: var(--mm-r); color: var(--mm-r); }

.mm-qv-loading,
.mm-qv-error { text-align: center; padding: 48px 24px; color: var(--mm-tm); font-family: var(--mm-fb); }

.mm-qv-body { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

.mm-qv-media { border-radius: 10px; overflow: hidden; background: var(--mm-cream-2); }
.mm-single-pimg { height: 100%; min-height: 240px; display: flex; align-items: center; justify-content: center; font-size: 72px; }
.mm-single-pimg-photo { width: 100%; height: 100%; min-height: 240px; object-fit: cover; display: block; }

.mm-qv-name { font-family: var(--mm-fh); font-size: 26px; font-weight: 800; color: var(--mm-t); margin: 6px 0 10px; line-height: 1.15; }
.mm-qv-price { font-family: var(--mm-fh); font-size: 24px; font-weight: 800; color: var(--mm-r); margin: 10px 0; }
.mm-qv-desc { font-size: 13.5px; color: var(--mm-tm); line-height: 1.6; margin-bottom: 14px; }
.mm-qv-stock { font-size: 12.5px; font-weight: 700; margin-bottom: 14px; }
.mm-qv-instock { color: #1F7A3F; }
.mm-qv-outstock { color: var(--mm-r); }
.mm-qv-add { width: 100%; margin-bottom: 12px; }
.mm-qv-full-link { display: inline-block; font-size: 13px; font-weight: 700; color: var(--mm-t); text-decoration: none; }
.mm-qv-full-link:hover { color: var(--mm-r); }

body.mm-qv-open { overflow: hidden; }

@media (max-width: 640px) {
	.mm-qv-dialog { padding: 24px; }
	.mm-qv-body { grid-template-columns: 1fr; }
}
