/* Menu Flipbook – front end */
.mmf-wrap {
	--mmf-accent: #c0392b;
	--mmf-bg: #2b2b2b;
	position: relative;
	width: 100%;
	box-sizing: border-box;
	background: var(--mmf-bg);
	padding: 16px 12px 8px;
	border-radius: 6px;
	color: #fff;
}
/* Full width: CSS breakout as a no-JS fallback; public.js then measures it exactly. */
.mmf-wrap.mmf-align-full { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); border-radius: 0; padding-left: 0; padding-right: 0; }
.mmf-wrap *, .mmf-wrap *::before, .mmf-wrap *::after { box-sizing: border-box; }
.mmf-stage { width: 100%; display: flex; justify-content: center; }
.mmf-book { width: 100%; max-height: var(--mmf-max-h, 85vh); }
/* Page-flip sizes itself to this container (autoSize is off). */
.mmf-book .stf__wrapper { height: 100%; padding-bottom: 0 !important; }
.mmf-page { background: #fff; overflow: hidden; }
.mmf-page-inner { position: relative; width: 100%; height: 100%; }
.mmf-page-inner img { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; }

/* Hotspots */
.mmf-hotspot {
	position: absolute;
	margin: 0; padding: 0;
	background: transparent;
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	appearance: none; -webkit-appearance: none;
	transition: background .15s, border-color .15s;
}
.mmf-hotspot:hover, .mmf-hotspot:focus-visible {
	background: color-mix(in srgb, var(--mmf-accent) 22%, transparent);
	border-color: var(--mmf-accent);
	outline: none;
}
.mmf-hotspots-always .mmf-hotspot { border-color: color-mix(in srgb, var(--mmf-accent) 55%, transparent); }
.mmf-hotspots-hidden .mmf-hotspot:hover { background: transparent; border-color: transparent; }
.mmf-hotspots-hidden .mmf-hotspot:focus-visible { border-color: var(--mmf-accent); }

/* Themes (e.g. Hello Elementor) paint button:focus/:hover/:active solid; keep hotspots see-through. */
.mmf-wrap button.mmf-hotspot,
.mmf-wrap button.mmf-hotspot:focus,
.mmf-wrap button.mmf-hotspot:active { background-color: transparent !important; color: inherit !important; box-shadow: none !important; outline: none !important; }
.mmf-wrap button.mmf-hotspot:hover,
.mmf-wrap button.mmf-hotspot:focus-visible { background-color: color-mix(in srgb, var(--mmf-accent) 22%, transparent) !important; border-color: var(--mmf-accent) !important; }
.mmf-hotspots-hidden.mmf-wrap button.mmf-hotspot:hover { background-color: transparent !important; border-color: transparent !important; }

/* Controls */
.mmf-controls { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 0 4px; }
.mmf-btn {
	min-width: 40px; height: 40px; padding: 0 12px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 24px; line-height: 1;
	color: #fff; background: rgba(255,255,255,.12);
	border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
	cursor: pointer;
}
.mmf-btn:hover, .mmf-btn:focus-visible { background: var(--mmf-accent); border-color: var(--mmf-accent); outline: none; }
.mmf-indicator { min-width: 110px; text-align: center; font-size: 14px; opacity: .9; }

.mmf-wrap:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 12px; border-radius: 0; }
.mmf-wrap:fullscreen .mmf-book { max-height: calc(100vh - 80px); }

.mmf-notice { padding: 12px; background: #fff8e5; border: 1px solid #f0c36d; border-radius: 4px; }

/* Popup */
html.mmf-lock { overflow: hidden; }
.mmf-overlay {
	position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2147483000;
	display: flex; align-items: center; justify-content: center;
	padding: 16px; background: rgba(0,0,0,.65);
	-webkit-transform: none; transform: none; box-sizing: border-box;
}
@supports (height: 100dvh) { .mmf-overlay { height: 100dvh; } }
.mmf-overlay[hidden] { display: none; }
.mmf-dialog {
	position: relative; display: block; visibility: visible; opacity: 1; width: min(860px, 100%); max-width: 100%; min-height: 80px; max-height: 92vh; overflow: auto; -webkit-overflow-scrolling: touch;
	background: #fff; color: #222; border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0,0,0,.4);
	font-family: inherit; line-height: 1.5;
}
.mmf-dialog:focus { outline: none; }
.mmf-close {
	position: absolute; top: 8px; right: 8px; z-index: 2;
	width: 38px; height: 38px; padding: 0;
	font-size: 28px; line-height: 1; color: #222;
	background: rgba(255,255,255,.9); border: 1px solid #ddd; border-radius: 50%; cursor: pointer;
}
.mmf-close:hover, .mmf-close:focus-visible { background: var(--mmf-accent, #c0392b); color: #fff; border-color: transparent; outline: none; }
.mmf-loading { padding: 48px 24px; text-align: center; margin: 0; }
.mmf-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.mmf-product.mmf-no-image { grid-template-columns: 1fr; }
.mmf-product-media { background: #f3f3f3; min-height: 240px; }
.mmf-product-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mmf-product-info { padding: 28px 28px 24px; }
.mmf-product-title { margin: 0 40px 8px 0; font-size: 1.6rem; line-height: 1.25; color: #111; }
.mmf-product-price { margin: 0 0 12px; font-size: 1.3rem; font-weight: 700; color: var(--mmf-accent, #c0392b); }
.mmf-product-price del { font-weight: 400; color: #777; margin-right: 6px; }
.mmf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.mmf-chips li { margin: 0; padding: 2px 10px; font-size: .8rem; background: #f1f1f1; border-radius: 999px; }
.mmf-product-desc { margin: 0 0 14px; }
.mmf-product-desc p { margin: 0 0 .6em; }
.mmf-attrs { margin: 0 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .92rem; }
.mmf-attrs dt { font-weight: 600; }
.mmf-attrs dd { margin: 0; }
.mmf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.mmf-add {
	padding: 10px 22px; font-size: 1rem; font-weight: 600; color: #fff;
	background: var(--mmf-accent, #c0392b); border: 0; border-radius: 6px; cursor: pointer;
}
.mmf-add:hover:not([disabled]), .mmf-add:focus-visible { filter: brightness(1.1); }
.mmf-add[disabled] { opacity: .7; cursor: default; }
.mmf-more { color: #222; text-decoration: underline; }
.mmf-soldout { color: #777; }
.mmf-cart-msg { min-height: 1.5em; margin: 10px 0 0; font-size: .92rem; }
.mmf-viewcart { font-weight: 600; }

@media (max-width: 640px) {
	.mmf-product { grid-template-columns: 1fr; }
	.mmf-product-media { max-height: 240px; min-height: 0; }
	.mmf-product-info { padding: 18px 18px 20px; }
	.mmf-product-title { font-size: 1.3rem; }
	.mmf-indicator { min-width: 90px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	.mmf-hotspot { transition: none; }
}

/* Prevent the full-bleed book from widening the page (which pushes fixed popups off-screen on phones). */
html.mmf-has-full, html.mmf-has-full body { overflow-x: clip; }
@media (max-width: 640px) {
	.mmf-overlay { align-items: flex-end; padding: 0; }
	.mmf-dialog { width: 100%; max-height: 88vh; border-radius: 14px 14px 0 0; }
}
@supports (height: 100dvh) { @media (max-width: 640px) { .mmf-dialog { max-height: 88dvh; } } }
