/* MM Expandable Img 2.0 — estilos do carrossel de imagens (Melhores Marcas).
 * Tudo vive sob .mm-lb (prefixo próprio) para não brigar com o tema. A cor de destaque pode ser trocada no tema:
 *   :root { --mm-lb-destaque: #667eea; } */

/* 1) Mantém a contenção do texto alternativo de imagens quebradas ou em lazyload (patch do plugin 1.1, Motor V21.5 / V22.0). */
.mm-expandable-img {
	font-size: 0.70rem !important;
	line-height: 1.3 !important;
	color: #999 !important;
	text-align: center !important;
	overflow-wrap: break-word !important;
	word-break: break-word !important;
	overflow: hidden !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-in;
}

/* 2) As fotos da galeria do produto agora abrem no carrossel (antes abriam a imagem crua em outra aba). */
.mm-product-galeria a { cursor: zoom-in; display: block; border-radius: 8px; transition: transform .25s ease, box-shadow .25s ease; }
.mm-product-galeria a:hover,
.mm-product-galeria a:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.mm-product-galeria a:focus-visible { outline: 3px solid var(--mm-lb-destaque, #ff9900); outline-offset: 2px; }

/* 3) O carrossel */
html.mm-lb-aberto { overflow: hidden !important; }

.mm-lb {
	--mm-lb-d: var(--mm-lb-destaque, #ff9900);
	position: fixed; inset: 0; z-index: 2147483000;
	display: none; flex-direction: column;
	color: #fff; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-tap-highlight-color: transparent; overscroll-behavior: contain;
	opacity: 0; transition: opacity .22s ease;
}
.mm-lb.mm-lb--visivel { display: flex; }
.mm-lb.mm-lb--ativo { opacity: 1; }
.mm-lb *, .mm-lb *::before, .mm-lb *::after { box-sizing: border-box; }

.mm-lb__fundo { position: absolute; inset: 0; background: rgba(8, 10, 16, .97); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* barra de cima */
.mm-lb__topo {
	position: relative; z-index: 2; flex: 0 0 auto;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: calc(10px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-right, 0px)) 6px calc(14px + env(safe-area-inset-left, 0px));
	pointer-events: none;
}
.mm-lb__contador { pointer-events: auto; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 5px 12px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.mm-lb__contador[hidden] { display: none; }
.mm-lb__dica { flex: 1; text-align: center; font-size: 12px; opacity: .65; }

.mm-lb__btn {
	pointer-events: auto; appearance: none; border: 0; margin: 0; cursor: pointer; color: #fff;
	width: 44px; height: 44px; border-radius: 50%; padding: 0;
	background: rgba(255, 255, 255, .14); display: inline-flex; align-items: center; justify-content: center;
	transition: background .18s ease, transform .18s ease;
}
.mm-lb__btn:hover { background: rgba(255, 255, 255, .28); }
.mm-lb__btn:active { transform: scale(.94); }
.mm-lb__btn:focus-visible { outline: 3px solid var(--mm-lb-d); outline-offset: 2px; }
.mm-lb__btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.mm-lb__btn[hidden] { display: none; }

/* palco (onde a imagem aparece) */
.mm-lb__palco {
	position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow: hidden;
	display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none;
	margin: 0 calc(64px + env(safe-area-inset-right, 0px)) 0 calc(64px + env(safe-area-inset-left, 0px));
	cursor: zoom-in;
}
.mm-lb--zoom .mm-lb__palco { cursor: zoom-out; }
.mm-lb--arrastando .mm-lb__palco { cursor: grabbing; }
.mm-lb__img {
	display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
	border-radius: 6px; box-shadow: 0 12px 44px rgba(0, 0, 0, .55); background: #111;
	transform-origin: 50% 50%; will-change: transform; opacity: 0; transition: opacity .2s ease;
	-webkit-user-drag: none; pointer-events: none;
}
.mm-lb__img.mm-lb__img--ok { opacity: 1; }
.mm-lb--zoom .mm-lb__img { transition: opacity .2s ease; }
.mm-lb--ease .mm-lb__img { transition: opacity .2s ease, transform .22s ease; }

.mm-lb__carregando { position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--mm-lb-d); animation: mm-lb-gira .8s linear infinite; pointer-events: none; }
.mm-lb__carregando[hidden] { display: none; }
@keyframes mm-lb-gira { to { transform: rotate(360deg); } }
.mm-lb__erro { position: absolute; margin: 0; padding: 14px 18px; max-width: 80%; text-align: center; background: rgba(255, 255, 255, .1); border-radius: 10px; }
.mm-lb__erro[hidden] { display: none; }
.mm-lb__erro a { color: var(--mm-lb-d); }

/* setas */
.mm-lb__seta { position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px; }
.mm-lb__seta--ant { left: calc(8px + env(safe-area-inset-left, 0px)); }
.mm-lb__seta--prox { right: calc(8px + env(safe-area-inset-right, 0px)); }

/* rodapé: legenda + miniaturas */
.mm-lb__rodape { position: relative; z-index: 2; flex: 0 0 auto; padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.mm-lb__legenda { margin: 0 auto 8px; max-width: 900px; font-size: 13px; opacity: .85; min-height: 1.4em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-lb__tiras { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; -webkit-overflow-scrolling: touch; }
.mm-lb__tiras[hidden] { display: none; }
.mm-lb__tiras > .mm-lb__mini:first-child { margin-left: auto; }   /* centraliza sem cortar o começo quando a lista é maior que a tela */
.mm-lb__tiras > .mm-lb__mini:last-child { margin-right: auto; }
.mm-lb__mini { flex: 0 0 auto; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: #222; cursor: pointer; opacity: .55; transition: opacity .18s ease, border-color .18s ease, transform .18s ease; }
.mm-lb__mini:hover { opacity: .9; }
.mm-lb__mini[aria-current="true"] { opacity: 1; border-color: var(--mm-lb-d); transform: translateY(-2px); }
.mm-lb__mini:focus-visible { outline: 3px solid var(--mm-lb-d); outline-offset: 1px; }
.mm-lb__mini img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* uma imagem só: sem setas, contador nem miniaturas */
.mm-lb--unica .mm-lb__seta, .mm-lb--unica .mm-lb__tiras { display: none; }
.mm-lb--unica .mm-lb__palco { margin-left: 16px; margin-right: 16px; }

@media (max-width: 640px) {
	.mm-lb__palco { margin-left: 0; margin-right: 0; }
	.mm-lb__seta { width: 44px; height: 44px; margin-top: -22px; background: rgba(0, 0, 0, .45); }
	.mm-lb__seta--ant { left: 6px; } .mm-lb__seta--prox { right: 6px; }
	.mm-lb__mini { width: 46px; height: 46px; }
	.mm-lb__dica { display: none; }
}
@media (max-height: 520px) {
	.mm-lb__rodape .mm-lb__tiras, .mm-lb__legenda { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.mm-lb, .mm-lb__img, .mm-lb--ease .mm-lb__img, .mm-lb__btn, .mm-lb__mini, .mm-product-galeria a { transition: none !important; }
	.mm-lb__carregando { animation-duration: 2s; }
}
