/**
 * Menú Manager - Catálogo público
 * Estilo carta premium 2026: tipografía editorial, espacios generosos,
 * sin cards con bordes, dorado en precios, transiciones suaves.
 */

.mm-cat {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 24px 64px;
}

/* ============ HEADER MODO SINGLE ============ */
.mm-cat__header {
	text-align: center;
	margin-bottom: 48px;
	padding-bottom: 32px;
	position: relative;
}
.mm-cat__header::after {
	content: '';
	display: block;
	width: 60px;
	height: 1px;
	background: var(--mm-gold);
	margin: 28px auto 0;
}
.mm-cat__title {
	margin: 0;
	font-family: var(--mm-font-serif);
	font-size: clamp(32px, 5vw, 48px);
	font-weight: 500;
	color: var(--mm-text);
	letter-spacing: .02em;
	line-height: 1.1;
}

/* ============ TABS PRINCIPALES (cartas) ============ */
.mm-cat__tabs {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 56px;
	border-bottom: 1px solid var(--mm-border);
	padding-bottom: 0;
	position: relative;
}
.mm-cat__tab {
	background: transparent;
	border: none;
	padding: 16px 22px;
	font-family: var(--mm-font-serif);
	font-size: 17px;
	font-weight: 500;
	color: var(--mm-text-muted);
	cursor: pointer;
	transition: var(--mm-transition);
	position: relative;
	letter-spacing: .03em;
	font-variant: small-caps;
	text-transform: lowercase;
}
.mm-cat__tab::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 2px;
	background: var(--mm-gold);
	transition: width .4s cubic-bezier(.25,.1,.25,1);
}
.mm-cat__tab:hover { color: var(--mm-text-soft); }
.mm-cat__tab.is-active {
	color: var(--mm-gold);
}
.mm-cat__tab.is-active::after {
	width: 70%;
}

/* ============ SECCIÓN: una por carta ============ */
.mm-cat__section {
	display: none;
	animation: mm-cat-fade .5s cubic-bezier(.25,.1,.25,1);
}
.mm-cat__section.is-active { display: block; }

@keyframes mm-cat-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ============ SUBTABS (términos de taxonomía) ============ */
.mm-cat__subtabs {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
	margin-bottom: 48px;
}
.mm-cat__subtab {
	background: transparent;
	border: none;
	padding: 10px 20px;
	font-family: var(--mm-font-serif);
	font-size: 14px;
	font-weight: 500;
	color: var(--mm-text-muted);
	cursor: pointer;
	transition: var(--mm-transition);
	letter-spacing: .14em;
	text-transform: uppercase;
	position: relative;
}
.mm-cat__subtab:not(:last-child)::before {
	content: '·';
	position: absolute;
	right: -2px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--mm-text-dim);
	pointer-events: none;
}
.mm-cat__subtab:hover { color: var(--mm-text); }
.mm-cat__subtab.is-active {
	color: var(--mm-gold);
}

/* ============ CONTENT (loading state) ============ */
.mm-cat__content {
	min-height: 200px;
	position: relative;
}
.mm-cat__content.is-loading::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 5;
}
.mm-cat__content.is-loading::after {
	content: '';
	position: absolute;
	top: 60px;
	left: 50%;
	transform: translateX(-50%);
	width: 28px;
	height: 28px;
	border: 2px solid var(--mm-border);
	border-top-color: var(--mm-gold);
	border-radius: 50%;
	animation: mm-spin .8s linear infinite;
	z-index: 6;
}

/* ============ GRID DE PLATOS ============ */
.mm-cat__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px 56px;
	animation: mm-cat-fade .5s cubic-bezier(.25,.1,.25,1);
}

/* ============ PLATO (sin card, sin bordes) ============ */
.mm-dish {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 24px;
	align-items: start;
}
.mm-dish__media {
	width: 200px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 2px;
	background: var(--mm-surface-strong);
	position: relative;
}
.mm-dish__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .8s cubic-bezier(.25,.1,.25,1);
}
.mm-dish:hover .mm-dish__media img {
	transform: scale(1.05);
}

.mm-dish__body {
	display: flex;
	flex-direction: column;
	padding-top: 4px;
}
.mm-dish__title {
	margin: 0 0 12px;
	font-family: var(--mm-font-serif);
	font-size: 22px;
	font-weight: 500;
	color: var(--mm-text);
	letter-spacing: .02em;
	line-height: 1.2;
	text-transform: uppercase;
}
.mm-dish__desc {
	margin: 0 0 18px;
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--mm-text-soft);
	font-weight: 300;
}
.mm-dish__price {
	margin-top: auto;
	font-family: var(--mm-font-serif);
	font-size: 22px;
	font-weight: 500;
	color: var(--mm-gold);
	letter-spacing: .02em;
}

/* ============ MENSAJE VACÍO ============ */
.mm-cat__empty {
	padding: 80px 24px;
	text-align: center;
	font-family: var(--mm-font-serif);
	font-size: 18px;
	font-style: italic;
	color: var(--mm-text-muted);
	letter-spacing: .02em;
	line-height: 1.6;
	position: relative;
}
.mm-cat__empty::before,
.mm-cat__empty::after {
	content: '';
	display: block;
	width: 40px;
	height: 1px;
	background: var(--mm-gold-dark);
	margin: 16px auto;
	opacity: .5;
}

/* ============ ERROR ============ */
.mm-cat__error {
	padding: 40px 24px;
	text-align: center;
	color: var(--mm-danger);
	font-size: 14px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
	.mm-cat__grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

@media (max-width: 640px) {
	.mm-cat { padding: 20px 16px 40px; }

	.mm-cat__tabs {
		gap: 0;
		overflow-x: auto;
		justify-content: flex-start;
		flex-wrap: nowrap;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		margin-bottom: 32px;
	}
	.mm-cat__tabs::-webkit-scrollbar { display: none; }
	.mm-cat__tab {
		padding: 14px 16px;
		font-size: 14px;
		white-space: nowrap;
		flex-shrink: 0;
	}

	.mm-cat__subtabs {
		overflow-x: auto;
		justify-content: flex-start;
		flex-wrap: nowrap;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 8px;
		margin-bottom: 32px;
	}
	.mm-cat__subtabs::-webkit-scrollbar { display: none; }
	.mm-cat__subtab {
		padding: 8px 14px;
		font-size: 12px;
		white-space: nowrap;
		flex-shrink: 0;
	}
	.mm-cat__subtab:not(:last-child)::before { display: none; }

	.mm-dish {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.mm-dish__media {
		width: 100%;
		aspect-ratio: 16 / 10;
	}
	.mm-dish__title { font-size: 18px; }
	.mm-dish__price { font-size: 19px; }
	.mm-dish__desc { font-size: 13.5px; }

	.mm-cat__empty {
		padding: 48px 16px;
		font-size: 15px;
	}
}

/* ============ MOTION REDUCIDA (a11y) ============ */
@media (prefers-reduced-motion: reduce) {
	.mm-cat__section,
	.mm-cat__grid,
	.mm-dish__media img {
		animation: none !important;
		transition: none !important;
	}
}
