/* Carta del cliente — Welow Comanda (mobile-first, sin theme) */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Ningun elemento debe arrastrar la pagina de lado (iPad y moviles).
   'clip' y no 'hidden': hidden crea un contexto de scroll y dejaria
   de funcionar position:sticky (los chips de categoria, la cabecera
   de camarero). */
html, body { max-width: 100%; overflow-x: clip; }

:root {
	--wcm-primary: #111111;
	--wcm-accent: #e63946;
	--wcm-bg: #f7f7f5;
	--wcm-card: #ffffff;
	--wcm-text: #1c1c1c;
	--wcm-muted: #6b7075;
	--wcm-line: #e6e6e2;
	--wcm-radius: 14px;
}

html { -webkit-text-size-adjust: 100%; }

body {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	background: var(--wcm-bg);
	color: var(--wcm-text);
	line-height: 1.45;
	padding-bottom: 40px;
}

.wcm-loading { padding: 40px 16px; text-align: center; color: var(--wcm-muted); }

/* ---------- Cabecera ---------- */

.wcm-header {
	background: var(--wcm-primary);
	color: #fff;
	padding: 14px 16px 12px;
}

.wcm-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.wcm-brand { font-size: 1.15rem; font-weight: 700; letter-spacing: .01em; }

.wcm-brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }

.wcm-logo { max-height: 48px; max-width: 170px; display: block; }

/* Modo solo-logo: centrado y al doble de alto (cabecera no fija). */
.wcm-header-logo-only { padding: 18px 16px 14px; position: relative; }

.wcm-header-logo-only .wcm-header-row { justify-content: center; }

.wcm-header-logo-only .wcm-brand-wrap { flex-direction: column; gap: 6px; text-align: center; }

.wcm-header-logo-only .wcm-logo { max-height: 96px; max-width: 260px; }

.wcm-header-logo-only .wcm-lang {
	position: absolute;
	top: 12px;
	right: 12px;
}

.wcm-table-badge {
	display: inline-block;
	margin-top: 4px;
	font-size: .78rem;
	background: rgba(255, 255, 255, .16);
	border-radius: 999px;
	padding: 2px 10px;
}

.wcm-lang {
	background: rgba(255, 255, 255, .14);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 8px;
	padding: 5px 8px;
	font-size: .85rem;
}

.wcm-lang option { color: #111; }

/* ---------- Barra de herramientas ---------- */

.wcm-tools {
	display: flex;
	gap: 8px;
	padding: 10px 16px;
}

.wcm-search {
	flex: 1;
	border: 1px solid var(--wcm-line);
	border-radius: 10px;
	padding: 9px 12px;
	font-size: .95rem;
	background: var(--wcm-card);
	min-height: 44px; /* Táctil ≥ 44 px (accesibilidad, §19 Fase 6). */
}

.wcm-filter-btn {
	border: 1px solid var(--wcm-line);
	background: var(--wcm-card);
	border-radius: 10px;
	padding: 9px 12px;
	font-size: .9rem;
	cursor: pointer;
	white-space: nowrap;
	min-height: 44px;
}

.wcm-filter-btn.wcm-on { border-color: var(--wcm-accent); color: var(--wcm-accent); font-weight: 600; }

/* ---------- Panel de filtros ---------- */

.wcm-filters {
	margin: 0 16px 10px;
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-radius: var(--wcm-radius);
	padding: 12px 14px;
}

.wcm-filters h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--wcm-muted); margin: 6px 0; }

.wcm-filters label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: .85rem;
	background: var(--wcm-bg);
	border: 1px solid var(--wcm-line);
	border-radius: 999px;
	padding: 4px 10px;
	margin: 3px 4px 3px 0;
	cursor: pointer;
}

.wcm-filters label:has(input:checked) { border-color: var(--wcm-accent); color: var(--wcm-accent); font-weight: 600; }

.wcm-filters input { accent-color: var(--wcm-accent); }

.wcm-filters img { width: 15px; height: 15px; }

/* ---------- Chips de categorías ---------- */

.wcm-chips {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 10px 16px;
	background: var(--wcm-bg);
	scrollbar-width: none;
	border-bottom: 1px solid var(--wcm-line);
}

.wcm-chips::-webkit-scrollbar { display: none; }

.wcm-chip {
	flex: 0 0 auto;
	border: 1px solid var(--wcm-line);
	background: var(--wcm-card);
	border-radius: 999px;
	padding: 7px 16px;
	font-size: .88rem;
	cursor: pointer;
	white-space: nowrap;
	min-height: 44px; /* Táctil ≥ 44 px. */
}

.wcm-chip.wcm-active { background: var(--wcm-primary); color: #fff; border-color: var(--wcm-primary); }

/* ---------- Secciones y tarjetas ---------- */

.wcm-section { padding: 6px 16px 2px; }

.wcm-section h2 {
	font-size: 1.05rem;
	margin: 14px 0 10px;
	letter-spacing: .01em;
}

.wcm-card {
	display: flex;
	gap: 12px;
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-radius: var(--wcm-radius);
	padding: 12px;
	margin-bottom: 10px;
	cursor: pointer;
}

.wcm-card-body { flex: 1; min-width: 0; }

.wcm-card h4 { font-size: .98rem; margin-bottom: 2px; }

.wcm-card p {
	font-size: .85rem;
	color: var(--wcm-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wcm-card-price { font-weight: 700; margin-top: 6px; font-size: .95rem; }

.wcm-card-price .wcm-from { font-weight: 400; font-size: .78rem; color: var(--wcm-muted); }

.wcm-card img.wcm-photo {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 10px;
	flex-shrink: 0;
}

.wcm-badges { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.wcm-badges img { width: 16px; height: 16px; opacity: .75; }

.wcm-tag {
	font-size: .68rem;
	text-transform: uppercase;
	letter-spacing: .03em;
	border-radius: 4px;
	padding: 1px 6px;
	background: #eef3ee;
	color: #33691e;
}

.wcm-tag.wcm-tag-picante { background: #fdecea; color: #c62828; }
.wcm-tag.wcm-tag-recomendado { background: #fff6e0; color: #9c6f00; }

.wcm-empty { padding: 30px 16px; text-align: center; color: var(--wcm-muted); }

/* ---------- Detalle de producto ---------- */

/* Con una capa abierta, el fondo se queda quieto: si no, arrastrando sobre la
   cabecera se movía la carta de detrás y parecían dos pantallas (v1.85). */
.wcm-capa-abierta, .wcm-capa-abierta body { overflow: hidden; height: 100%; }

.wcm-overlay {
	position: fixed;
	inset: 0;
	overscroll-behavior: contain;
	background: rgba(0, 0, 0, .45);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	z-index: 50;
}

.wcm-sheet {
	background: var(--wcm-card);
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	overflow-y: auto;
	border-radius: 18px 18px 0 0;
	padding: 18px 18px 26px;
}

.wcm-sheet img.wcm-photo-lg {
	width: 100%;
	max-height: 220px;
	object-fit: cover;
	border-radius: 12px;
	margin-bottom: 12px;
}

.wcm-sheet h3 { font-size: 1.2rem; margin-bottom: 4px; }

.wcm-sheet .wcm-desc { color: var(--wcm-muted); font-size: .92rem; margin-bottom: 10px; }

/* Ingredientes (v1.73): solo en la ficha del plato. */
.wcm-sheet .wcm-ingr { color: var(--wcm-muted); font-size: .86rem; line-height: 1.45; margin-bottom: 12px; }
.wcm-sheet .wcm-ingr span { font-weight: 700; color: var(--wcm-text); }

.wcm-sheet h5 {
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--wcm-muted);
	margin: 12px 0 6px;
}

.wcm-opt {
	display: flex;
	justify-content: space-between;
	padding: 7px 0;
	border-bottom: 1px dashed var(--wcm-line);
	font-size: .93rem;
}

.wcm-allergen-row { display: flex; flex-wrap: wrap; gap: 8px; }

.wcm-allergen-row span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: .8rem;
	color: var(--wcm-muted);
}

.wcm-allergen-row img { width: 16px; height: 16px; }

.wcm-close {
	display: block;
	width: 100%;
	margin-top: 16px;
	background: var(--wcm-primary);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 12px;
	font-size: .95rem;
	cursor: pointer;
}

/* ---------- Aviso solo lectura ---------- */

.wcm-notice {
	margin: 10px 16px 0;
	background: #fff8e6;
	border: 1px solid #f0dfad;
	color: #7a5d00;
	border-radius: 10px;
	padding: 9px 12px;
	font-size: .85rem;
}

/* ---------- Autocomanda (Fase 3) ---------- */


.wcm-notice-bill { background: #e8f4ff; border-color: #b6d9f7; color: #0b508c; }

.wcm-toast {
	position: fixed;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 90;
	background: #123c1c;
	color: #eaffef;
	border-radius: 10px;
	padding: 10px 16px;
	font-size: .88rem;
	max-width: 92vw;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}

.wcm-toast-error { background: #5c1212; color: #ffecec; }

/* La barra inferior vive en nav.css: la comparten la carta, Reservas
   y Dónde estamos (v1.75). */

/* Paneles carrito / cuenta */
.wcm-panel { padding: 14px 16px; }

.wcm-panel h2 { font-size: 1.1rem; margin-bottom: 12px; }

.wcm-line {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-radius: var(--wcm-radius);
	padding: 11px 12px;
	margin-bottom: 8px;
}

.wcm-line-main { flex: 1; min-width: 0; font-size: .93rem; }

.wcm-line-meta { color: var(--wcm-muted); font-size: .82rem; margin-top: 2px; }

.wcm-line-notes { color: #9c6f00; font-size: .82rem; margin-top: 2px; font-style: italic; }

.wcm-line-side { display: flex; align-items: center; gap: 10px; }

.wcm-line-price { font-weight: 700; font-size: .9rem; min-width: 62px; text-align: right; }

.wcm-line-remove { background: none; border: 0; color: #b3b3af; font-size: .95rem; cursor: pointer; }

.wcm-qty {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	border: 1px solid var(--wcm-line);
	border-radius: 999px;
	overflow: hidden;
}

.wcm-qty button {
	background: none;
	border: 0;
	width: 30px;
	height: 30px;
	font-size: 1.05rem;
	cursor: pointer;
	color: var(--wcm-accent);
}

.wcm-qty span { min-width: 22px; text-align: center; font-weight: 600; font-size: .92rem; }

.wcm-qty-lg { margin-bottom: 12px; }
.wcm-qty-lg button { width: 42px; height: 42px; font-size: 1.3rem; }
.wcm-qty-lg span { min-width: 34px; font-size: 1.05rem; }

.wcm-cart-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 4px;
	font-size: 1rem;
}

.wcm-cart-total strong { font-size: 1.15rem; }

.wcm-primary {
	display: block;
	width: 100%;
	background: var(--wcm-accent);
	color: #fff;
	border: 0;
	border-radius: 12px;
	padding: 14px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.wcm-primary:disabled { opacity: .6; }

.wcm-secondary {
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-radius: 10px;
	padding: 11px 14px;
	font-size: .92rem;
	cursor: pointer;
}

.wcm-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.wcm-actions .wcm-secondary { flex: 1; min-width: 150px; }

.wcm-paypref { display: grid; gap: 8px; margin: 8px 0 4px; }

.wcm-paywaiter-label { font-size: .8rem; color: var(--wcm-muted); margin-top: 4px; }

/* Resumen de líneas en el diálogo de la cuenta */
.wcm-bill-lines {
	margin-bottom: 10px;
	max-height: 32vh;
	overflow-y: auto;
}

.wcm-bill-line {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 5px 0;
	border-bottom: 1px dashed var(--wcm-line);
	font-size: .88rem;
}

.wcm-bill-line span:last-child { font-weight: 600; white-space: nowrap; }

/* Desglose de la cuenta en el diálogo de pago */
.wcm-bill-breakdown {
	background: var(--wcm-bg);
	border: 1px solid var(--wcm-line);
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 6px;
}

.wcm-bill-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: .92rem; }

.wcm-bill-total { border-top: 1px dashed var(--wcm-line); margin-top: 4px; padding-top: 7px; font-size: 1rem; }

.wcm-tips { display: flex; gap: 6px; flex-wrap: wrap; }

.wcm-tips .wcm-secondary { flex: 1 1 70px; min-height: 44px; }

.wcm-tips .wcm-tip-on { border-color: var(--wcm-accent); color: var(--wcm-accent); font-weight: 700; }

/* Líneas de desglose en Mi cuenta */
.wcm-bill-sub { padding: 4px 4px; font-size: .9rem; color: var(--wcm-muted); }

/* Cuenta */
.wcm-order {
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-radius: var(--wcm-radius);
	padding: 12px;
	margin-bottom: 10px;
}

.wcm-order-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.wcm-order-status {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	border-radius: 5px;
	padding: 2px 8px;
	background: #eef1f4;
	color: #48515a;
}

.wcm-os-aceptado, .wcm-os-en_curso { background: #e5f2ff; color: #0b508c; }
.wcm-os-completado { background: #e7f5e9; color: #1c6b2a; }
.wcm-os-rechazado { background: #fdecea; color: #c62828; }

.wcm-rejected { font-size: .84rem; color: #c62828; margin-bottom: 8px; }

.wcm-acc-line {
	display: flex;
	align-items: baseline;
	gap: 7px;
	padding: 6px 0;
	border-top: 1px dashed var(--wcm-line);
	font-size: .9rem;
}

.wcm-acc-qty { color: var(--wcm-muted); min-width: 24px; }

.wcm-acc-name { flex: 1; min-width: 0; }

.wcm-acc-name em { color: var(--wcm-muted); font-style: normal; font-size: .82rem; }

.wcm-acc-price { font-weight: 600; min-width: 58px; text-align: right; }

.wcm-acc-status {
	font-size: .7rem;
	text-transform: uppercase;
	letter-spacing: .03em;
	border-radius: 4px;
	padding: 1px 6px;
	background: #eef1f4;
	color: #48515a;
	white-space: nowrap;
}

.wcm-st-en_preparacion { background: #fff3dd; color: #915e00; }
.wcm-st-listo { background: #e7f5e9; color: #1c6b2a; font-weight: 700; }
.wcm-st-servido { background: #f0f0ee; color: #7a7a75; }

.wcm-cancelled { opacity: .5; text-decoration: line-through; }

/* Detalle: opciones seleccionables y notas */
.wcm-opt-pick { cursor: pointer; }

.wcm-opt-pick input { accent-color: var(--wcm-accent); margin-right: 6px; }

.wcm-notes {
	width: 100%;
	border: 1px solid var(--wcm-line);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: .92rem;
	margin: 4px 0 12px;
}

/* ---------- Módulos de crecimiento (v1.7) ---------- */

/* Upsell "¿Añadir algo más?" en el carrito */
.wcm-upsell { margin: 6px 0 4px; }

.wcm-upsell h5 {
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--wcm-muted);
	margin: 10px 0 8px;
}

.wcm-upsell-row {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 6px;
	scrollbar-width: none;
}

.wcm-upsell-row::-webkit-scrollbar { display: none; }

.wcm-upsell-item {
	flex: 0 0 auto;
	width: 118px;
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-radius: 12px;
	padding: 8px;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.wcm-upsell-item img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 8px;
	margin-bottom: 5px;
}

.wcm-upsell-name {
	display: block;
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.25;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.wcm-upsell-price { display: block; font-size: .78rem; color: var(--wcm-accent); font-weight: 700; margin-top: 3px; }

.wcm-dark .wcm-upsell-item { background: #2b2f34; }

/* Invitación a reseña de Google */
.wcm-review-card {
	margin: 14px 0;
	padding: 16px;
	text-align: center;
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-radius: var(--wcm-radius);
}

.wcm-review-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.wcm-review-text { margin: 0 0 14px; font-size: .92rem; color: var(--wcm-muted); }
.wcm-review-card .wcm-notes { margin: 4px 0 10px; }

/* Opinión privada (v2.00): opción aparte, discreta, para todos. */
.wcm-review-link {
	display: block;
	margin: 14px auto 0;
	padding: 6px 8px;
	background: none;
	border: 0;
	color: var(--wcm-muted);
	font: inherit;
	font-size: .88rem;
	text-decoration: underline;
	cursor: pointer;
}
.wcm-review-private { margin-top: 16px; text-align: left; }
.wcm-review-label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; }
.wcm-review-private .wcm-secondary { width: 100%; }
.wcm-review-done { margin: 14px 0 0; font-size: .92rem; color: var(--wcm-muted); }

/* Enlace fijo al pie de la carta (v2.00). */
.wcm-footer-review {
	display: inline-block;
	margin-bottom: 12px;
	padding: 8px 16px;
	border: 1px solid var(--wcm-line);
	border-radius: 999px;
	color: var(--wcm-text, inherit);
	font-weight: 600;
	text-decoration: none;
}

/* Aviso de cuenta pagada */
.wcm-notice-paid { background: #e7f5e9; border-color: #b6e0bd; color: #1c6b2a; text-align: center; }

.wcm-review-cta {
	display: inline-block;
	background: #fbbc04;
	color: #1a1a1a;
	font-weight: 700;
	text-decoration: none;
	border-radius: 10px;
	padding: 12px 18px;
	min-height: 44px;
}

/* Botón de pedido por WhatsApp */
.wcm-primary.wcm-wa { background: #25d366; color: #063b1e; }

/* ---------- Pie de carta ---------- */

.wcm-footer {
	margin: 26px 16px 10px;
	padding-top: 14px;
	border-top: 1px solid var(--wcm-line);
	text-align: center;
	font-size: .8rem;
	color: var(--wcm-muted);
}

.wcm-footer-note { margin-bottom: 6px; }

.wcm-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; }

.wcm-footer-links a { color: var(--wcm-muted); text-decoration: underline; }

/* ---------- Presentación configurable ---------- */

/* Cuadrícula de 2 columnas (estilo escaparate) */
.wcm-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
}

.wcm-card-grid {
	display: block;
	padding: 0 0 12px;
	overflow: hidden;
}

.wcm-card-grid .wcm-photo-top {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

.wcm-card-grid .wcm-card-body { padding: 10px 12px 0; }

.wcm-card-grid .wcm-card-price { margin: 0 0 3px; color: var(--wcm-accent); }

.wcm-card-grid h4 { text-transform: uppercase; letter-spacing: .02em; font-size: .92rem; }

/* Tema oscuro automático cuando el fondo configurado es oscuro */
.wcm-dark body,
.wcm-dark {
	--wcm-card: #23262a;
	--wcm-text: #e8eaed;
	--wcm-muted: #9aa1a9;
	--wcm-line: #34383d;
}

.wcm-dark .wcm-search,
.wcm-dark .wcm-filter-btn,
.wcm-dark .wcm-chip,
.wcm-dark .wcm-secondary,
.wcm-dark .wcm-notes {
	background: #2b2f34;
	color: var(--wcm-text);
	border-color: var(--wcm-line);
}

.wcm-dark .wcm-chips { background: var(--wcm-bg); border-color: var(--wcm-line); }
.wcm-dark .wcm-chip.wcm-active { background: var(--wcm-accent); border-color: var(--wcm-accent); color: #fff; }
.wcm-dark .wcm-sheet { background: #1d2024; }
.wcm-dark .wcm-filters { background: #23262a; }
.wcm-dark .wcm-filters label { background: #2b2f34; }
.wcm-dark .wcm-badges img,
.wcm-dark .wcm-menu-leyenda-item img { filter: invert(1) opacity(.8); }
.wcm-dark .wcm-tag { filter: saturate(.8) brightness(1.4); background: #2b2f34; }
.wcm-dark .wcm-notice { background: #3a3312; border-color: #57511f; color: #ffd977; }
.wcm-dark .wcm-notice-bill { background: #12293a; border-color: #1f4157; color: #9bd1ff; }
.wcm-dark .wcm-line, .wcm-dark .wcm-order { background: #23262a; border-color: var(--wcm-line); }

/* Detalle como página completa (foto grande, flecha atrás).
   Va POR DEBAJO de la navegación inferior (z-index 30 < 40): los botones
   Carta/Tu pedido/Mi cuenta siguen visibles y usables dentro del plato. */
.wcm-overlay-page { align-items: stretch; background: var(--wcm-bg); z-index: 30; }

.wcm-sheet-page {
	max-width: none;
	max-height: none;
	height: 100vh;
	height: 100dvh;
	border-radius: 0;
	/* Hueco inferior = altura del nav fijo, para que no tape el final. */
	padding: 0 0 96px;
	position: relative;
}

.wcm-sheet-page .wcm-photo-hero {
	width: 100%;
	max-height: 46vh;
	height: auto;
	border-radius: 0;
	margin: 0 0 14px;
}

.wcm-sheet-page h3 { font-size: 1.5rem; padding: 0 18px; }
.wcm-sheet-page .wcm-desc { font-size: 1rem; padding: 0 18px; }
.wcm-sheet-page .wcm-ingr { font-size: .92rem; padding: 0 18px; }
.wcm-sheet-page .wcm-card-price { font-size: 1.25rem; padding: 0 18px; color: var(--wcm-accent); }
.wcm-sheet-page h5, .wcm-sheet-page .wcm-opt, .wcm-sheet-page .wcm-allergen-row,
.wcm-sheet-page .wcm-qty-lg, .wcm-sheet-page .wcm-notes, .wcm-sheet-page .wcm-primary { margin-left: 18px; margin-right: 18px; }
.wcm-sheet-page .wcm-primary { width: calc(100% - 36px); }

.wcm-back {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 5;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 1.3rem;
	cursor: pointer;
}

@media (min-width: 640px) {
	#wcm-app { max-width: 640px; margin: 0 auto; }
	.wcm-overlay { align-items: center; }
	.wcm-sheet { border-radius: 18px; }
	.wcm-sheet-page { max-width: 640px; margin: 0 auto; }
	.wcm-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Para llevar (v1.10) */
.wcm-takeaway {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	margin-bottom: 12px;
	border: 1px solid var(--wcm-line);
	border-radius: 12px;
	background: var(--wcm-card);
	font-weight: 600;
	cursor: pointer;
}

.wcm-takeaway input { width: 20px; height: 20px; accent-color: var(--wcm-accent); }

/* Aviso "para llevar: la cuenta va con la entrega" */
.wcm-notice-takeaway { background: #fff4e5; border: 1px solid #f0d5ad; color: #8a5200; margin: 0 0 12px; }

/* Aviso dentro de la ventana de la cuenta: platos que aún no han llegado (v1.74). */
.wcm-notice-pending { margin: 0 0 12px; }

/* Aviso "pendiente de aprobación por sala" */
.wcm-notice-waiting { background: #fff3dd; border: 1px solid #eed9a9; color: #915e00; }

/* Logo/marca como enlace a la carta (páginas estáticas y SPA) */
.wcm-home-link { display: contents; color: inherit; text-decoration: none; }
.wcm-brand-wrap { cursor: pointer; }

/* Cabecera de "Mi cuenta" con refresco manual */
.wcm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.wcm-panel-head h2 { margin: 0; }
.wcm-refresh {
	border: 1px solid var(--wcm-line);
	background: var(--wcm-card);
	color: var(--wcm-muted);
	border-radius: 999px;
	padding: 7px 14px;
	font-size: .85rem;
	font-weight: 600;
	cursor: pointer;
	min-height: 38px;
	white-space: nowrap;
}
.wcm-refresh:disabled { opacity: .55; }

/* ---------- Menú del día (v1.76, redibujado en v1.78) ---------- */

/* La ficha del menú no lleva foto, y la flecha de volver está pensada para ir
   encima de una: sin imagen debajo se montaba sobre el título. */
.wcm-sheet-menu .wcm-back { background: rgba(0, 0, 0, .25); }
.wcm-sheet-menu.wcm-sheet-page h3 { padding-top: 58px; }

/* A página completa la hoja no tiene márgenes propios: los pone cada hijo.
   Sin esto, las líneas del menú se pegaban al borde izquierdo (v1.78). */
.wcm-sheet-page.wcm-sheet-menu h5,
.wcm-sheet-page.wcm-sheet-menu .wcm-menu-linea,
.wcm-sheet-page.wcm-sheet-menu .wcm-notice,
.wcm-sheet-page.wcm-sheet-menu .wcm-actions { padding-left: 18px; padding-right: 18px; }
.wcm-sheet-page.wcm-sheet-menu .wcm-notice { margin-left: 0; margin-right: 0; }

.wcm-sheet-menu h5 { margin: 20px 0 2px; }

/* Cada plato: el nombre manda, los alérgenos van debajo y en pequeño. Antes
   iban en la misma línea y todo pesaba igual (v1.78). */
.wcm-menu-linea {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0 10px;
	border-bottom: 1px solid var(--wcm-line);
}
.wcm-menu-linea:last-of-type { border-bottom: 0; }
.wcm-menu-plato { display: block; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.wcm-menu-linea .wcm-badges { margin-top: 6px; gap: 5px; }
.wcm-menu-linea .wcm-badges img { width: 14px; height: 14px; opacity: .6; }
.wcm-menu-supl { color: var(--wcm-muted); font-size: .85rem; white-space: nowrap; }

/* Tarjeta de la carta (mientras siga ahí). */
.wcm-menudia {
	display: block;
	width: calc(100% - 32px);
	margin: 14px 16px 4px;
	padding: 14px 16px;
	text-align: left;
	background: var(--wcm-card);
	border: 1px solid var(--wcm-accent);
	border-left: 5px solid var(--wcm-accent);
	border-radius: 12px;
	cursor: pointer;
	color: var(--wcm-text);
	font: inherit;
}

.wcm-menudia-fila { display: flex; align-items: baseline; gap: 10px; }
.wcm-menudia-fila h2 { font-size: 1.05rem; margin: 0; flex: 1; }
.wcm-menudia-precio { font-weight: 700; color: var(--wcm-accent); white-space: nowrap; }
.wcm-menudia p { color: var(--wcm-muted); font-size: .88rem; margin: 4px 0 0; }
.wcm-menudia-cta { display: inline-block; margin-top: 8px; font-size: .84rem; font-weight: 700; color: var(--wcm-accent); }

/* ---------- Páginas de menús (v1.79) ---------- */

.wcm-page { max-width: 640px; margin: 0 auto; padding: 18px 18px 8px; }

.wcm-menu-lista { display: grid; gap: 10px; }

.wcm-menu-boton {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-left: 5px solid var(--wcm-accent);
	border-radius: 12px;
	color: var(--wcm-text);
	text-decoration: none;
	font-weight: 700;
}

.wcm-menu-boton-nombre { font-size: 1.05rem; }
.wcm-menu-boton-precio { color: var(--wcm-accent); white-space: nowrap; }

.wcm-menu-pagina .wcm-menu-precio { font-size: 1.35rem; font-weight: 700; color: var(--wcm-accent); }
.wcm-menu-pagina .wcm-menu-incluye { color: var(--wcm-muted); margin: 2px 0 6px; }
/* El grupo manda a la izquierda y los platos van metidos hacia dentro, para
   que se vea de un golpe qué es primero y qué es segundo (v1.80). */
.wcm-menu-pagina .wcm-menu-grupo {
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	font-weight: 700;
	color: var(--wcm-accent);
	margin: 22px 0 2px;
}
.wcm-menu-pagina .wcm-menu-linea { padding-left: 16px; }

/* Los iconos de alérgeno, más grandes y menos apagados: a 14 px no se
   distinguía cuál era cuál (v1.80). */
.wcm-menu-pagina .wcm-badges { gap: 7px; margin-top: 7px; }
.wcm-menu-pagina .wcm-badges img { width: 22px; height: 22px; opacity: 1; }
.wcm-dark .wcm-menu-pagina .wcm-badges img,
.wcm-dark .wcm-menu-pagina .wcm-menu-leyenda-item img { filter: invert(1); }

/* Y al final, qué es cada icono. */
.wcm-menu-leyenda {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	padding: 10px 0 2px;
	color: var(--wcm-muted);
	font-size: .85rem;
}
.wcm-menu-leyenda-item { display: inline-flex; align-items: center; gap: 6px; }
.wcm-menu-leyenda-item img { width: 22px; height: 22px; opacity: 1; }

.wcm-menu-pagina .wcm-notice { margin: 18px 0 0; }

/* Acceso a los menús desde la carta: botón sobrio arriba (modo "botón") o
   una tarjeta por menú al final (modo "categoría"). */
.wcm-menus-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: calc(100% - 32px);
	margin: 12px 16px 2px;
	padding: 13px 16px;
	background: var(--wcm-card);
	border: 1px solid var(--wcm-line);
	border-left: 5px solid var(--wcm-accent);
	border-radius: 12px;
	color: var(--wcm-text);
	text-decoration: none;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.wcm-menus-btn span:last-child { color: var(--wcm-accent); font-size: .84rem; }

/* Iconos de alérgeno dentro de las opciones del menú (v1.82). */
.wcm-opt-alg { width: 16px; height: 16px; vertical-align: -3px; opacity: .8; }
.wcm-dark .wcm-opt-alg { filter: invert(1) opacity(.85); }

/* Botón de pedir en la página del menú (v1.82). */
.wcm-menu-pedir { text-align: center; text-decoration: none; margin-top: 18px; }

/* Versión en el pie, para saber siempre qué se está ejecutando (v1.83). */
.wcm-footer-ver { margin-top: 8px; font-size: .72rem; color: var(--wcm-muted); opacity: .75; }

/* Dos etiquetas en la cabecera de las páginas: la mesa y la pantalla (v1.85). */
.wcm-badge-pagina { opacity: .75; }

/* Sin conexión con el servidor (v2.02): aviso fijo arriba (abajo está la barra
   de la carta). Lo crea el sondeo fuera de lo que se redibuja. */
.wcm-sin-conexion {
	position: fixed;
	left: 50%;
	top: 12px;
	transform: translateX(-50%);
	z-index: 95;
	display: flex;
	align-items: center;
	gap: 12px;
	width: max-content;
	max-width: calc(100% - 24px);
	padding: 10px 14px;
	border-radius: 10px;
	background: #8a1f1f;
	color: #fff;
	font-size: 14px;
	line-height: 1.35;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
}
.wcm-sin-conexion button {
	flex: none;
	min-height: 36px;
	padding: 4px 12px;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
