/**
 * Página de prato dedicada (single mesato_menu_item).
 * Namespaced .mst-dish-*; usa as variáveis da marca (--mst-brand*) injetadas
 * pelo módulo Branding, com fallbacks neutros.
 */

.mst-dish {
	--mst-b: var(--mst-brand, #b0703e);
	--mst-b2: var(--mst-brand-2, #d99b6c);
	--mst-bd: var(--mst-brand-dark, #7a4c28);
	padding: 40px 20px 72px;
}

.mst-dish-inner {
	max-width: 980px;
	margin: 0 auto;
}

/* Voltar */
.mst-dish-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 22px;
	font-weight: 600;
	color: var(--mst-bd);
	text-decoration: none;
	transition: gap .18s ease, color .18s ease;
}
.mst-dish-back:hover { gap: 12px; color: var(--mst-b); }
.mst-dish-back svg { width: 18px; height: 18px; }

/* Cartão principal */
.mst-dish-card {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 0;
	border-radius: 22px;
	overflow: hidden;
	background: rgba(255, 255, 255, .62);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, .55);
	box-shadow: 0 18px 48px -22px rgba(0, 0, 0, .35);
}

/* Media */
.mst-dish-media-wrap {
	display: flex;
	flex-direction: column;
}
.mst-dish-media {
	position: relative;
	flex: 1;
	min-height: 340px;
	overflow: hidden;
	background: linear-gradient(135deg, var(--mst-b2), var(--mst-b));
}
.mst-dish-zoom img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mst-dish-ph {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, .85);
}
.mst-dish-ph svg { width: 64px; height: 64px; }
.mst-dish-flag {
	position: absolute;
	top: 14px;
	left: 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .42);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	backdrop-filter: blur(4px);
}
.mst-dish-flag svg { width: 14px; height: 14px; color: #ffd27a; }

/* Corpo */
.mst-dish-body {
	padding: 34px 34px 36px;
	display: flex;
	flex-direction: column;
}
.mst-dish-cat {
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--mst-b);
	margin-bottom: 6px;
}
.mst-dish-title {
	margin: 0 0 10px;
	font-size: clamp(26px, 4vw, 36px);
	line-height: 1.12;
	color: var(--mst-bd);
}
.mst-dish-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
.mst-dish-rating-n { font-size: 14px; color: #6b675f; }

.mst-dish-price {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 6px 0 16px;
}
.mst-dish-price span {
	font-size: 26px;
	font-weight: 800;
	color: var(--mst-b);
}
.mst-dish-tax { font-size: 12px; color: #8a857c; }

.mst-dish-desc {
	font-size: 16px;
	line-height: 1.6;
	color: #4a463f;
	margin: 0 0 18px;
}

.mst-dish-section { margin-bottom: 16px; }
.mst-dish-h {
	margin: 0 0 6px;
	font-size: 13px;
	letter-spacing: .08em;
	text-transform: uppercase;
	font-weight: 700;
	color: #8a857c;
}
.mst-dish-ingredients { margin: 0; font-size: 15px; line-height: 1.55; color: #4a463f; }

.mst-dish-allergens { display: flex; flex-wrap: wrap; gap: 7px; }
.mst-dish-allergens .mst-badge {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .05);
	font-size: 13px;
	color: #5b5750;
}

.mst-dish-pairing {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 15px;
	color: #4a463f;
	margin: 4px 0 18px;
}
.mst-dish-pairing svg { width: 18px; height: 18px; color: var(--mst-b); flex: 0 0 auto; }
.mst-dish-pairing-label { font-weight: 700; color: var(--mst-bd); }

.mst-dish-actions { margin-top: auto; padding-top: 6px; }
.mst-dish-actions .mst-cta { margin: 0; }
.mst-dish-actions .mst-add {
	width: 100%;
	justify-content: center;
	font-size: 16px;
	padding: 14px 22px;
}

.mst-dish-share { margin-top: 18px; }

/* Avaliações */
.mst-dish-reviews { margin-top: 40px; }
.mst-dish-h2 {
	font-size: clamp(20px, 3vw, 26px);
	color: var(--mst-bd);
	margin: 0 0 18px;
}

/* Responsivo */
@media (max-width: 760px) {
	.mst-dish-card { grid-template-columns: 1fr; }
	.mst-dish-media { min-height: 240px; }
	.mst-dish-body { padding: 26px 22px 28px; }
}

/* ---- Zoom (foto principal clicável) ---- */
.mst-dish-zoom {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	display: block;
}
.mst-dish-zoom-ic {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	opacity: 0;
	transition: opacity .18s ease;
	backdrop-filter: blur(4px);
}
.mst-dish-zoom-ic svg { width: 19px; height: 19px; }
.mst-dish-media:hover .mst-dish-zoom-ic,
.mst-dish-zoom:focus-visible .mst-dish-zoom-ic { opacity: 1; }

/* ---- Marca de água (logótipo) ---- */
.mst-dish-watermark {
	position: absolute;
	left: 14px;
	bottom: 14px;
	max-width: 92px;
	max-height: 46px;
	width: auto;
	height: auto;
	opacity: .72;
	filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .45));
	pointer-events: none;
	z-index: 2;
}

/* ---- Galeria (miniaturas) ---- */
.mst-dish-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px;
	background: rgba(0, 0, 0, .03);
}
.mst-dish-thumb {
	width: 74px;
	height: 60px;
	margin: 0;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 9px;
	overflow: hidden;
	cursor: zoom-in;
	background: none;
	transition: border-color .16s ease, transform .16s ease;
}
.mst-dish-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mst-dish-thumb:hover,
.mst-dish-thumb:focus-visible { border-color: var(--mst-b); transform: translateY(-2px); }

/* ---- Vídeo (YouTube) ---- */
.mst-dish-video { margin-top: 36px; }
.mst-dish-video-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 14px 40px -20px rgba(0, 0, 0, .4);
	background: #000;
}
.mst-dish-video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---- Link do vinho ---- */
.mst-dish-pairing-link {
	color: var(--mst-b);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color .16s ease;
}
.mst-dish-pairing-link:hover { border-bottom-color: var(--mst-b); }

/* ---- Form de avaliação: alinhar à largura da lista + reduzir gap ---- */
.mst-dish-reviews .mst-reviewform {
	max-width: none;
	width: 100%;
	margin: 18px 0 0;
}

/* ---- Lightbox ---- */
body.mst-lb-open { overflow: hidden; }
.mst-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	background: rgba(15, 10, 6, .92);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.mst-lightbox[hidden] { display: none; }
.mst-lb-img {
	max-width: 92vw;
	max-height: 86vh;
	border-radius: 10px;
	box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .7);
	animation: mst-lb-in .2s ease;
}
@keyframes mst-lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.mst-lb-close,
.mst-lb-nav {
	position: absolute;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	transition: background .16s ease;
}
.mst-lb-close:hover,
.mst-lb-nav:hover { background: rgba(255, 255, 255, .26); }
.mst-lb-close svg { width: 24px; height: 24px; }
.mst-lb-nav svg { width: 26px; height: 26px; }
.mst-lb-close { top: 20px; right: 20px; }
.mst-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.mst-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
	.mst-lb-img { animation: none; }
	.mst-dish-thumb { transition: border-color .16s ease; }
}

@media (max-width: 760px) {
	.mst-lb-close { top: 12px; right: 12px; }
	.mst-lb-prev { left: 8px; }
	.mst-lb-next { right: 8px; }
}
