/*
 * PaezAI Restaurante · carta pública.
 * Colores: se pueden ajustar desde Bricks o el tema definiendo, en :root,
 * --paezai-rest-accent, --paezai-rest-ink, --paezai-rest-bg y --paezai-rest-card.
 * Texto mínimo 14 px y botones de al menos 44 px de alto.
 */
.pzr,
.pzr-float,
.pzr-badge {
	--pzr-accent: var(--paezai-rest-accent, #b4461f);
	--pzr-accent-ink: var(--paezai-rest-accent-ink, #ffffff);
	--pzr-ink: var(--paezai-rest-ink, #231a14);
	--pzr-muted: var(--paezai-rest-muted, #6a5b50);
	--pzr-line: var(--paezai-rest-line, #e7dccd);
	--pzr-bg: var(--paezai-rest-bg, #fbf7f1);
	--pzr-card: var(--paezai-rest-card, #ffffff);
	--pzr-ok: #1f7a4a;
	--pzr-bad: #b3261e;
	--pzr-radius: 14px;
	--pzr-sticky-top: var(--paezai-rest-sticky-top, 0px);
	color: var(--pzr-ink);
	font-size: 16px;
	line-height: 1.45;
	box-sizing: border-box;
}
.pzr *,
.pzr *::before,
.pzr *::after,
.pzr-badge,
.pzr-float *,
.pzr-float *::before,
.pzr-float *::after { box-sizing: border-box; }

.pzr[data-pzr] { max-width: 1120px; margin: 0 auto; padding: 0 16px 120px; }
:where(.pzr, .pzr-float) button { font: inherit; color: inherit; cursor: pointer; }
.pzr.is-kitchen-closed .pzr-add:not(:disabled) { background: #cfc6bb; }
.pzr [hidden], .pzr-float[hidden] { display: none !important; }
.pzr .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pzr button:focus-visible, .pzr a:focus-visible, .pzr input:focus-visible, .pzr select:focus-visible, .pzr textarea:focus-visible,
.pzr-float button:focus-visible, .pzr-float input:focus-visible, .pzr-float select:focus-visible, .pzr-float textarea:focus-visible {
	outline: 3px solid var(--pzr-accent); outline-offset: 2px;
}

/* Estado de cocina */
.pzr-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; background: var(--pzr-card); border: 1px solid var(--pzr-line); }
.pzr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pzr-muted); flex: none; }
.pzr-status.is-open .pzr-dot { background: var(--pzr-ok); box-shadow: 0 0 0 4px rgba(31, 122, 74, .18); }
.pzr-status.is-closed .pzr-dot { background: var(--pzr-bad); }
.pzr-status.is-closed { color: var(--pzr-bad); }
.pzr-facts-line { margin: 6px 0 0; color: var(--pzr-muted); font-size: 15px; }

.pzr-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 0 8px; }
.pzr-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; color: var(--pzr-muted); font-size: 15px; }
.pzr-facts li { display: inline-flex; align-items: center; gap: 6px; }
.pzr-ico { flex: none; }
.pzr-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.pzr-mode { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--pzr-line); background: var(--pzr-card); font-weight: 600; font-size: 15px; }
.pzr-mode[aria-pressed="true"] { background: var(--pzr-ink); color: #fff; border-color: var(--pzr-ink); }
.pzr-mode small { font-weight: 500; opacity: .8; margin-left: 4px; font-size: 14px; }

/* Barra fija: categorías + búsqueda */
.pzr-sticky { position: sticky; top: var(--pzr-sticky-top); z-index: 20; background: var(--pzr-bg); margin: 0 -16px; padding: 8px 16px 10px; border-bottom: 1px solid var(--pzr-line); }
.pzr-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.pzr-cats::-webkit-scrollbar { display: none; }
.pzr-cats a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--pzr-line); background: var(--pzr-card); color: var(--pzr-ink); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.pzr-cats a.is-active { background: var(--pzr-accent); border-color: var(--pzr-accent); color: var(--pzr-accent-ink); }
.pzr-search { display: block; margin-top: 8px; }
.pzr-search input { width: 100%; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--pzr-line); border-radius: 999px; background: var(--pzr-card); font-size: 16px; color: var(--pzr-ink); }

/* Secciones y filas */
.pzr-sec { padding-top: 28px; scroll-margin-top: calc(var(--pzr-sticky-top) + 130px); }
.pzr-sec__title { margin: 0 0 14px; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15; }
.pzr-sec--daily { margin-top: 18px; padding: 18px 18px 8px; border: 1.5px dashed var(--pzr-accent); border-radius: var(--pzr-radius); background: var(--pzr-card); }
.pzr-sec--daily .pzr-sec__title { color: var(--pzr-accent); }
.pzr-list { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .pzr-list { grid-template-columns: 1fr 1fr; gap: 14px 18px; } }

.pzr-dish { position: relative; display: block; }
.pzr-dish[hidden] { display: none; }
.pzr-dish__main { display: flex; justify-content: space-between; align-items: stretch; gap: 14px; width: 100%; min-height: 108px; padding: 14px 64px 14px 14px; text-align: left; background: var(--pzr-card); border: 1px solid var(--pzr-line); border-radius: var(--pzr-radius); transition: border-color .15s, box-shadow .15s; }
.pzr-dish__main:hover { border-color: var(--pzr-accent); box-shadow: 0 4px 18px rgba(35, 26, 20, .08); }
.pzr-dish__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.pzr-dish__name { font-weight: 700; font-size: 17px; line-height: 1.25; }
.pzr-dish__desc { color: var(--pzr-muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pzr-dish__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: auto; padding-top: 4px; }
.pzr-price { font-weight: 800; font-size: 17px; }
.pzr-was { color: var(--pzr-muted); font-size: 15px; }
.pzr-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: #f1e8dc; color: #4a3b30; font-size: 14px; font-weight: 600; line-height: 1.4; }
.pzr-tag--vegetarian, .pzr-tag--vegan { background: #e1f1e6; color: #17603a; }
.pzr-tag--spicy { background: #fbe3dc; color: #9b2c12; }
.pzr-tag--gluten_free, .pzr-tag--dairy_free { background: #e6edf7; color: #284a7a; }
.pzr-tag--chef, .pzr-tag--new, .pzr-tag--popular { background: #fff0c9; color: #6b4a00; }
.pzr-tag--out { background: #ece7e1; color: #5d5047; }
.pzr-tag--custom { background: transparent; color: var(--pzr-muted); padding-left: 0; }
.pzr-dish__img { flex: none; width: 104px; height: 104px; border-radius: 12px; overflow: hidden; background: #efe6da; align-self: center; }
.pzr-dish__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) { .pzr-dish__img { width: 124px; height: 124px; } }
.pzr-add { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--pzr-accent); color: var(--pzr-accent-ink); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(35, 26, 20, .22); }
.pzr-add:hover:not(:disabled) { filter: brightness(1.08); }
.pzr-add:disabled { background: #cfc6bb; color: #fff; box-shadow: none; cursor: not-allowed; }
.pzr-dish.is-out .pzr-dish__main { opacity: .72; }
.pzr-dish.is-out .pzr-dish__img img { filter: grayscale(1); }
.pzr-empty { margin: 28px 0; padding: 18px; text-align: center; color: var(--pzr-muted); background: var(--pzr-card); border-radius: var(--pzr-radius); border: 1px solid var(--pzr-line); }

/* Barra de pedido */
.pzr-bar { position: fixed; left: 0; right: 0; bottom: var(--paezai-rest-bottom, 0px); z-index: var(--paezai-rest-z, 9990); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--pzr-bg) 70%, rgba(251, 247, 241, 0)); pointer-events: none; }
.pzr-bar__btn { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 560px; min-height: 56px; margin: 0 auto; padding: 0 20px; border: 0; border-radius: 999px; background: var(--pzr-ink); color: #fff; font-weight: 700; font-size: 17px; box-shadow: 0 8px 26px rgba(35, 26, 20, .35); }
.pzr-bar__count { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--pzr-accent); color: var(--pzr-accent-ink); font-size: 15px; }

/* Capa: panel de plato y pedido */
.pzr-overlay { position: fixed; inset: 0; z-index: calc(var(--paezai-rest-z, 9990) + 5); display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 14, 10, .55); }
.pzr-panel { position: relative; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: var(--pzr-card); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); outline: 0; }
@media (min-width: 700px) { .pzr-overlay { align-items: center; } .pzr-panel { border-radius: 22px; max-height: 88vh; } }
.pzr-panel__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 8px; flex: 1; }
.pzr-panel__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--pzr-ink); font-size: 24px; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.pzr-panel__photo { margin: 0 -20px 14px; height: 200px; background: #efe6da; border-radius: 22px 22px 0 0; overflow: hidden; }
.pzr-panel__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pzr-panel__head { padding: 20px 0 10px; }
.pzr-panel__photo + .pzr-panel__head { padding-top: 0; }
.pzr-panel__title { margin: 0 44px 6px 0; font-size: 24px; line-height: 1.2; }
.pzr-panel__desc { margin: 0 0 8px; color: var(--pzr-muted); font-size: 16px; }
.pzr-panel__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pzr-panel__allergens { margin: 6px 0 0; font-size: 14px; color: var(--pzr-muted); }

.pzr-group { margin: 16px 0; padding: 14px; border: 1px solid var(--pzr-line); border-radius: 12px; }
.pzr-group.is-invalid { border-color: var(--pzr-bad); background: #fff6f5; }
.pzr-group__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.pzr-group__title { margin: 0; font-size: 17px; font-weight: 700; }
.pzr-group__rule { font-size: 14px; color: var(--pzr-muted); white-space: nowrap; }
.pzr-group__rule.is-req { color: var(--pzr-accent); font-weight: 700; }
.pzr-opt { color: var(--pzr-ink); display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; cursor: pointer; border-top: 1px solid var(--pzr-line); }
.pzr-opt:first-of-type { border-top: 0; }
.pzr-opt input[type="radio"], .pzr-opt input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--pzr-accent); flex: none; margin: 0; }
.pzr-opt__label { flex: 1; font-size: 16px; color: var(--pzr-ink); }
.pzr-opt__price { color: var(--pzr-muted); font-size: 15px; font-weight: 600; }
.pzr-optqty { display: inline-flex; align-items: center; gap: 4px; }
.pzr-optqty button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--pzr-line); background: var(--pzr-card); font-size: 20px; line-height: 1; }
.pzr-optqty output { min-width: 22px; text-align: center; font-weight: 700; }

.pzr-field { display: block; margin: 16px 0; }
.pzr-field__label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 16px; }
.pzr-field textarea, .pzr-field select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--pzr-line); border-radius: 12px; background: #fff; font-size: 16px; color: var(--pzr-ink); font-family: inherit; }
.pzr-field select { min-height: 48px; }
.pzr-field textarea { min-height: 76px; resize: vertical; }

.pzr-panel__foot { padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--pzr-line); background: var(--pzr-card); display: flex; align-items: center; gap: 12px; }
.pzr-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--pzr-line); border-radius: 999px; }
.pzr-qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 22px; border-radius: 50%; }
.pzr-qty output { min-width: 28px; text-align: center; font-weight: 700; font-size: 17px; }
.pzr-cta { flex: 1; min-height: 52px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--pzr-accent); color: var(--pzr-accent-ink); font-weight: 800; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.pzr-cta:disabled, .pzr-cta[aria-disabled="true"] { background: #cfc6bb; cursor: not-allowed; }
.pzr-cta--ghost { background: transparent; color: var(--pzr-ink); border: 1.5px solid var(--pzr-line); font-weight: 700; }
.pzr-msg { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 15px; background: #fff0c9; color: #5b4200; }
.pzr-msg--err { background: #fde8e6; color: #7f1d14; }

/* Pedido */
.pzr-lines { margin: 8px 0 0; padding: 0; list-style: none; }
.pzr-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--pzr-line); }
.pzr-line__name { font-weight: 700; font-size: 16px; }
.pzr-line__mods { grid-column: 1 / -1; margin: 0; padding: 0; list-style: none; color: var(--pzr-muted); font-size: 14px; }
.pzr-line__total { font-weight: 700; text-align: right; }
.pzr-line__ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.pzr-line__remove { margin-left: auto; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--pzr-bad); font-weight: 600; font-size: 15px; text-decoration: underline; }
.pzr-sum { margin: 14px 0 0; padding: 0; list-style: none; }
.pzr-sum li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 16px; }
.pzr-sum li.is-total { margin-top: 6px; padding-top: 10px; border-top: 1.5px solid var(--pzr-ink); font-size: 19px; font-weight: 800; }
.pzr-hint { margin: 6px 0 0; font-size: 14px; color: var(--pzr-muted); }
.pzr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pzr-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--pzr-line); background: var(--pzr-card); font-weight: 600; font-size: 15px; }
.pzr-chip[aria-pressed="true"] { background: var(--pzr-ink); border-color: var(--pzr-ink); color: #fff; }
.pzr-panel__title--sm { font-size: 22px; margin: 20px 44px 6px 0; }

.pzr-toast { position: fixed; left: 50%; bottom: calc(96px + var(--paezai-rest-bottom, 0px)); transform: translateX(-50%); z-index: calc(var(--paezai-rest-z, 9990) + 10); max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 999px; background: var(--pzr-ink); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .2s; }
.pzr-toast.is-on { opacity: 1; }
body.pzr-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .pzr *, .pzr-float * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 480px) {
	.pzr-dish__main { padding-right: 60px; }
	.pzr-dish__img { width: 88px; height: 88px; }
	.pzr-modes { margin-left: 0; width: 100%; }
}

/* Botones redondos: centrado exacto de los símbolos, sin importar el tema */
.pzr-qty button, .pzr-optqty button, .pzr-panel__close, .pzr-add { display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
/* Con foto: el botón + se apoya sobre la esquina de la foto y el texto aprovecha todo el ancho */
.pzr-dish.has-img .pzr-dish__main { padding-right: 14px; }
.pzr-dish.has-img .pzr-add { right: 22px; bottom: 22px; border: 3px solid var(--pzr-card); width: 48px; height: 48px; }
.pzr-dish.is-out .pzr-add { opacity: .6; }

/* ---- Modalidades, categorías y propina: nada se corta ni obliga a deslizar de lado ---- */
.pzr-modes { flex-wrap: wrap; }
.pzr-catbar, .pzr-catmenu { display: none; }
.pzr-tipcustom { display: flex; gap: 8px; margin-top: 10px; }
.pzr-tipcustom input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--pzr-line); border-radius: 12px; background: #fff; font-size: 16px; color: var(--pzr-ink); }
.pzr-cta--small { flex: none; min-height: 48px; padding: 0 18px; font-size: 16px; }
.pzr-hint + .pzr-hint { margin-top: 2px; }

@media (max-width: 700px) {
	.pzr-top { gap: 8px; padding: 10px 0 4px; }
	.pzr-modes { width: 100%; margin-left: 0; gap: 8px; }
	.pzr-mode { flex: 1 1 0; min-width: 0; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
	.pzr-facts { gap: 4px 14px; font-size: 14px; }
	.pzr-sec { padding-top: 22px; }
	/* La barra fija pasa a ser un botón "Categorías" que abre la lista completa. */
	.pzr-cats { display: none; }
	.pzr-catbar { display: flex; gap: 8px; align-items: center; }
	.pzr-catbtn { flex: 1; min-height: 46px; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--pzr-line); background: var(--pzr-card); font-weight: 700; font-size: 16px; text-align: left; }
	.pzr-catbtn[aria-expanded="true"] { border-color: var(--pzr-accent); }
	.pzr-catbtn[aria-expanded="true"] .pzr-ico { transform: rotate(180deg); }
	.pzr-searchbtn { flex: none; width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid var(--pzr-line); background: var(--pzr-card); padding: 0; }
	.pzr-searchbtn[aria-pressed="true"] { background: var(--pzr-ink); color: #fff; border-color: var(--pzr-ink); }
	.pzr-catmenu { position: absolute; left: 0; right: 0; top: 100%; z-index: 22; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 16px; background: var(--pzr-bg); border-bottom: 1px solid var(--pzr-line); box-shadow: 0 14px 24px rgba(35, 26, 20, .14); max-height: 70vh; overflow-y: auto; }
	.pzr-catmenu[hidden] { display: none; }
	.pzr-catmenu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--pzr-line); background: var(--pzr-card); color: var(--pzr-ink); text-decoration: none; font-weight: 600; font-size: 15px; }
	.pzr-catmenu a.is-active { background: var(--pzr-accent); border-color: var(--pzr-accent); color: var(--pzr-accent-ink); }
	.pzr-sticky .pzr-search { display: none; }
	.pzr-sticky.is-search .pzr-search { display: block; }
}
