/* ==========================================================================
   Menu Pizzeria – Astra Child
   Cambia i colori qui sotto per adattare il menu al tuo sito.
   ========================================================================== */

.pm-menu {
	--pm-bg: #121212;          /* sfondo dell'area menu            */
	--pm-card: #1b1b1b;        /* sfondo delle card                */
	--pm-border: #2f2f2f;      /* bordi                            */
	--pm-text: #ffffff;        /* testo principale                 */
	--pm-muted: #b9b9b9;       /* testi secondari                  */
	--pm-chip: #242424;        /* sfondo allergeni                 */
	--pm-accent: #d9473b;      /* prezzo, sezione attiva           */
	--pm-accent-text: #ffffff;
	--pm-radius: 14px;
	--pm-gap: clamp(14px, 2.5vw, 28px);

	/* Per una versione chiara, ad esempio:
	--pm-bg: #faf7f2; --pm-card: #fff; --pm-border: #e6e0d6;
	--pm-text: #1f1b16; --pm-muted: #5f574d; --pm-chip: #f3eee6; */

	background: var(--pm-bg);
	color: var(--pm-text);
	border-radius: var(--pm-radius);
	padding: var(--pm-gap);
	margin: 1.5em 0 2em;
}

.pm-menu *,
.pm-menu *::before,
.pm-menu *::after { box-sizing: border-box; }

/* --------------------------------------------------------------------------
   Pagina con "Menu Template": sfondo #121212 e niente box bianchi di Astra
   ----------------------------------------------------------------------- */
html:has(body.page-template-template-menu),
body.page-template-template-menu,
.page-template-template-menu #page,
.page-template-template-menu .site-content,
.page-template-template-menu .site-content .ast-container,
.page-template-template-menu #primary,
.page-template-template-menu .site-main,
.page-template-template-menu .site-main > article,
.page-template-template-menu .ast-article-single,
.page-template-template-menu .ast-article-post {
	background: #121212 !important;
	box-shadow: none !important;
}
.page-template-template-menu .site-main > article,
.page-template-template-menu .ast-article-single { padding-left: 0; padding-right: 0; }
.page-template-template-menu .entry-header,
.page-template-template-menu .entry-title,
.page-template-template-menu .entry-content { color: #ffffff; }
.page-template-template-menu .site-content > .ast-container { padding-top: 0; }
.page-template-template-menu #primary { margin-top: 1em; }

/* Bottone "Esci dal menu" al posto dell'header */
.pm-exitbar {
	max-width: 1240px;
	margin: 0 auto;
	padding: 16px 20px 0;
	padding-left: max(20px, env(safe-area-inset-left));
}
a.pm-exit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px 0 14px;
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1;
	color: #ffffff;
	text-decoration: none;
	background: #1b1b1b;
	border: 1px solid #2f2f2f;
	border-radius: 999px;
	transition: background-color .15s, border-color .15s;
}
a.pm-exit:hover,
a.pm-exit:focus-visible {
	color: #ffffff;
	background: #d9473b;
	border-color: #d9473b;
	outline: none;
}

/* "Fine pagina" personalizzato (stesso sfondo della pagina) */
.pm-footer {
	margin-top: 2em;
	color: #d6d6d6;
	background: #121212;
	border-top: 1px solid #2f2f2f;
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 0.95rem;
	line-height: 1.6;
}
.pm-footer__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 40px 20px;
	padding-bottom: max(40px, env(safe-area-inset-bottom));
}
.pm-footer h1, .pm-footer h2, .pm-footer h3, .pm-footer h4, .pm-footer h5, .pm-footer h6 {
	margin: 0 0 .5em;
	color: #ffffff;
	font-family: "Fjalla One", "Arial Narrow", Arial, sans-serif;
	font-weight: 400;
	line-height: 1.25;
}
.pm-footer h3 { font-size: 1.3rem; }
.pm-footer p { margin: 0 0 1em; }
.pm-footer p:last-child { margin-bottom: 0; }
.pm-footer a { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.pm-footer a:hover, .pm-footer a:focus-visible { color: #d9473b; }
.pm-footer .wp-block-columns { margin-bottom: 0; gap: 2em; }
.pm-footer .wp-block-separator { border-color: #2f2f2f; opacity: 1; }
.pm-footer img { max-width: 100%; height: auto; }

/* Area "Menu Template" a tutta larghezza utile */
.page-template-template-menu .site-content .ast-container { max-width: 1240px; }

/* --------------------------------------------------------------------------
   Barra: ricerca + navigazione sezioni (resta in alto durante lo scroll)
   ----------------------------------------------------------------------- */
.pm-toolbar {
	position: sticky;
	top: 0;
	z-index: 20;
	margin: calc(var(--pm-gap) * -1) calc(var(--pm-gap) * -1) var(--pm-gap);
	padding: var(--pm-gap) var(--pm-gap) 10px;
	background: var(--pm-bg);
	border-radius: var(--pm-radius) var(--pm-radius) 0 0;
	border-bottom: 1px solid var(--pm-border);
}
.admin-bar .pm-toolbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .pm-toolbar { top: 0; } }

.pm-search {
	position: relative;
	max-width: 560px;
}
.pm-search__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--pm-muted);
	pointer-events: none;
}
.pm-menu .pm-search__input {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 44px 0 42px;
	font-size: 16px; /* evita lo zoom automatico su iPhone */
	color: var(--pm-text);
	background: var(--pm-card);
	border: 1px solid var(--pm-border);
	border-radius: 999px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
.pm-menu .pm-search__input::placeholder { color: var(--pm-muted); opacity: 1; }
.pm-menu .pm-search__input:focus {
	outline: none;
	border-color: var(--pm-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pm-accent) 30%, transparent);
}
.pm-search__input::-webkit-search-cancel-button { display: none; }

.pm-menu .pm-search__clear {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	color: var(--pm-muted);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.pm-menu .pm-search__clear:hover,
.pm-menu .pm-search__clear:focus-visible { color: var(--pm-text); background: var(--pm-chip); }

.pm-search__status {
	margin: 6px 4px 0;
	min-height: 1.2em;
	font-size: 0.85rem;
	color: var(--pm-muted);
}
.pm-search__status:empty { display: none; }

.pm-nav { margin-top: 12px; }
.pm-nav ul {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0 0 4px;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.pm-nav ul::-webkit-scrollbar { display: none; }
.pm-nav li { flex: 0 0 auto; margin: 0; }
.pm-nav a {
	display: block;
	padding: 7px 16px;
	font-size: 0.9rem;
	white-space: nowrap;
	color: var(--pm-text);
	text-decoration: none;
	background: var(--pm-chip);
	border: 1px solid var(--pm-border);
	border-radius: 999px;
	transition: background-color .15s, border-color .15s;
}
.pm-nav a:hover,
.pm-nav a:focus-visible { border-color: var(--pm-accent); color: var(--pm-text); }
.pm-nav a.is-active { background: var(--pm-accent); border-color: var(--pm-accent); color: var(--pm-accent-text); }
.pm-nav li[hidden] { display: none; }

/* Pulsante della tendina: visibile solo su smartphone */
.pm-menu .pm-nav__toggle { display: none; }

@media (max-width: 768px) {
	.pm-js .pm-nav { position: relative; }

	.pm-menu.pm-js .pm-nav__toggle {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		min-height: 46px;
		margin: 0;
		padding: 0 14px 0 16px;
		font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
		font-size: 1rem;
		line-height: 1.2;
		text-align: left;
		color: var(--pm-text);
		background: var(--pm-card);
		border: 1px solid var(--pm-border);
		border-radius: 12px;
		box-shadow: none;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	.pm-menu.pm-js .pm-nav__toggle:hover,
	.pm-menu.pm-js .pm-nav__toggle:focus { color: var(--pm-text); background: var(--pm-card); }
	.pm-menu.pm-js .pm-nav__toggle:focus-visible { outline: none; border-color: var(--pm-accent); }
	.pm-js .pm-nav__label {
		flex: 0 0 auto;
		font-size: .78rem;
		font-weight: 500;
		letter-spacing: .06em;
		text-transform: uppercase;
		color: var(--pm-muted);
	}
	.pm-js .pm-nav__current {
		flex: 1;
		min-width: 0;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		font-weight: 500;
	}
	.pm-js .pm-nav__chevron { flex: 0 0 auto; color: var(--pm-accent); transition: transform .2s; }
	.pm-js .pm-nav.is-open .pm-nav__chevron { transform: rotate(180deg); }

	/* Elenco verticale a tendina */
	.pm-js .pm-nav ul {
		display: none;
		position: absolute;
		top: calc(100% + 6px);
		left: 0;
		right: 0;
		z-index: 30;
		flex-direction: column;
		gap: 2px;
		max-height: min(62vh, 440px);
		padding: 6px;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--pm-card);
		border: 1px solid var(--pm-border);
		border-radius: 12px;
		box-shadow: 0 14px 36px rgba(0, 0, 0, .55);
	}
	.pm-js .pm-nav.is-open ul { display: flex; }
	.pm-js .pm-nav li { flex: none; }
	.pm-js .pm-nav a {
		font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
		padding: 13px 14px;
		font-size: 1rem;
		white-space: normal;
		background: transparent;
		border: 0;
		border-radius: 8px;
	}
	.pm-js .pm-nav a:hover,
	.pm-js .pm-nav a:focus-visible { background: var(--pm-chip); }
	.pm-js .pm-nav a.is-active { background: var(--pm-accent); color: var(--pm-accent-text); }
}

/* --------------------------------------------------------------------------
   Riga ricerca + filtri allergeni
   ----------------------------------------------------------------------- */
.pm-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 720px;
}
.pm-row .pm-search { flex: 1; min-width: 0; max-width: none; }

.pm-menu .pm-filters__toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: 0 0 auto;
	height: 46px;
	margin: 0;
	padding: 0 16px;
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: .95rem;
	font-weight: 500;
	line-height: 1;
	color: var(--pm-text);
	background: var(--pm-card);
	border: 1px solid var(--pm-border);
	border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.pm-menu .pm-filters__toggle:hover,
.pm-menu .pm-filters__toggle:focus { color: var(--pm-text); background: var(--pm-card); }
.pm-menu .pm-filters__toggle:focus-visible,
.pm-filters.is-open .pm-filters__toggle { outline: none; border-color: var(--pm-accent); }
.pm-filters.is-active .pm-filters__toggle { border-color: var(--pm-accent); color: var(--pm-text); }
.pm-filters__count {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	font-size: .75rem;
	font-weight: 700;
	color: var(--pm-accent-text);
	background: var(--pm-accent);
	border-radius: 999px;
}
.pm-filters__count[hidden] { display: none; }

.pm-filters__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 35;
	max-height: min(70vh, 520px);
	padding: 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--pm-card);
	border: 1px solid var(--pm-border);
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
.pm-filters__panel[hidden] { display: none; }
.pm-filters__title {
	margin: 0 0 12px;
	font-family: "Roboto", system-ui, sans-serif;
	font-size: .95rem;
	font-weight: 500;
	color: var(--pm-text);
}
.pm-filters__chips { display: flex; flex-wrap: wrap; gap: 8px; }

.pm-menu .pm-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	margin: 0;
	padding: 0 14px;
	font-family: "Roboto", system-ui, sans-serif;
	font-size: .92rem;
	font-weight: 400;
	line-height: 1.2;
	text-align: left;
	color: var(--pm-text);
	background: var(--pm-chip);
	border: 1px solid var(--pm-border);
	border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .15s, border-color .15s;
}
.pm-menu .pm-chip:hover,
.pm-menu .pm-chip:focus { color: var(--pm-text); background: var(--pm-chip); border-color: var(--pm-muted); }
.pm-menu .pm-chip:focus-visible { outline: 2px solid var(--pm-accent); outline-offset: 2px; }
.pm-chip__check { display: none; font-weight: 700; }
.pm-menu .pm-chip[aria-pressed="true"] {
	color: var(--pm-accent-text);
	background: var(--pm-accent);
	border-color: var(--pm-accent);
}
.pm-chip[aria-pressed="true"] .pm-chip__check { display: inline; }

.pm-filters__note,
.pm-filters__active-note {
	margin: 14px 0 0;
	padding-left: 22px;
	position: relative;
	font-family: "Roboto", system-ui, sans-serif;
	font-size: .82rem;
	line-height: 1.45;
	color: var(--pm-muted);
}
.pm-filters__note::before,
.pm-filters__active-note::before {
	content: "⚠";
	position: absolute;
	left: 0;
	top: 0;
	color: #e9b949;
}
.pm-filters__active-note { margin: 4px 4px 0; }
.pm-filters__active-note[hidden] { display: none; }

.pm-filters__actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--pm-border);
}
.pm-menu .pm-filters__reset,
.pm-menu .pm-filters__done {
	min-height: 42px;
	margin: 0;
	padding: 0 18px;
	font-family: "Roboto", system-ui, sans-serif;
	font-size: .95rem;
	font-weight: 500;
	line-height: 1;
	border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
}
.pm-menu .pm-filters__reset {
	color: var(--pm-muted);
	background: transparent;
	border: 1px solid var(--pm-border);
}
.pm-menu .pm-filters__reset:hover { color: var(--pm-text); background: transparent; border-color: var(--pm-muted); }
.pm-menu .pm-filters__done {
	color: var(--pm-accent-text);
	background: var(--pm-accent);
	border: 1px solid var(--pm-accent);
}
.pm-menu .pm-filters__done:hover { color: var(--pm-accent-text); background: var(--pm-accent); filter: brightness(1.1); }

/* Senza JavaScript i filtri non servono */
.pm-menu:not(.pm-js) .pm-filters { display: none; }

@media (max-width: 480px) {
	.pm-menu .pm-filters__toggle { padding: 0 13px; }
	.pm-menu .pm-search__input { padding-left: 38px; }
	.pm-search__icon { left: 12px; }
}

/* --------------------------------------------------------------------------
   Sezioni a "Lista compatta" (supplementi, varianti…), affiancate su computer
   ----------------------------------------------------------------------- */
.pm-compact-group {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: var(--pm-gap);
	align-items: start;
}
.pm-compact-group[hidden] { display: none; }
.pm-section + .pm-compact-group,
.pm-compact-group + .pm-section,
.pm-compact-group + .pm-compact-group { margin-top: calc(var(--pm-gap) * 1.6); }
.pm-compact-group .pm-section + .pm-section { margin-top: 0; }

.pm-section--compact {
	background: var(--pm-card);
	border: 1px solid var(--pm-border);
	border-radius: var(--pm-radius);
	overflow: hidden;
}
.pm-compact__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--pm-border);
}
.pm-compact__icon { font-size: 1.15rem; line-height: 1; }
.pm-menu .pm-compact__title {
	margin: 0;
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: .85rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--pm-muted);
}
.pm-compact__desc {
	margin: 14px 24px 0;
	font-family: "Roboto", system-ui, sans-serif;
	font-size: .9rem;
	color: var(--pm-muted);
}

.pm-lines { margin: 0; padding: 8px 24px 12px; list-style: none; }
.pm-line {
	display: grid;
	grid-template-columns: 36px 1fr auto;
	gap: 14px;
	align-items: start;
	margin: 0;
	padding: 14px 0;
}
.pm-line + .pm-line { border-top: 1px solid color-mix(in srgb, var(--pm-border) 60%, transparent); }
.pm-line[hidden] { display: none; }
.pm-line__icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	font-size: 1.05rem;
	line-height: 1;
	color: var(--pm-muted);
	background: var(--pm-chip);
	border-radius: 8px;
}
.pm-line__body { min-width: 0; }
.pm-menu .pm-line__title {
	margin: 2px 0 4px;
	font-family: "Fjalla One", "Arial Narrow", Arial, sans-serif;
	font-size: 1.2rem;
	font-weight: 400;
	line-height: 1.3;
	color: var(--pm-text);
}
.pm-line__desc {
	font-family: "Roboto", system-ui, sans-serif;
	font-size: .95rem;
	line-height: 1.5;
	color: var(--pm-text);
	opacity: .9;
}
.pm-line__desc p { margin: 0; }
.pm-line__allergens {
	margin: 6px 0 0;
	font-family: "Roboto", system-ui, sans-serif;
	font-size: .78rem;
	color: var(--pm-muted);
}
.pm-price--line {
	min-width: 64px;
	padding: 7px 14px;
	font-size: .95rem;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.pm-compact__head { padding: 16px 18px; }
	.pm-lines { padding: 4px 16px 8px; }
	.pm-line { grid-template-columns: 32px 1fr auto; gap: 12px; }
	.pm-line__icon { width: 32px; height: 32px; }
	.pm-menu .pm-line__title { font-size: 1.1rem; }
}

/* --------------------------------------------------------------------------
   Social e recensioni Google (in fondo al menu)
   ----------------------------------------------------------------------- */
.pm-social {
	margin: 2.5em 0 1.5em;
	padding-top: 2em;
	text-align: center;
	border-top: 1px solid #2f2f2f;
}
.pm-social .pm-social__title {
	margin: 0 0 18px;
	font-family: "Fjalla One", "Arial Narrow", Arial, sans-serif;
	font-weight: 400;
	font-size: clamp(1.4rem, 3vw, 1.8rem);
	line-height: 1.2;
	color: #ffffff;
}
.pm-social .wp-block-social-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}
.pm-social .wp-block-social-links li { margin: 0; }
.pm-social__icons.has-large-icon-size { font-size: 30px; }
.pm-social__icons .wp-social-link { transition: transform .15s; }
.pm-social__icons .wp-social-link:hover { transform: scale(1.08); }

/* Dentro il "Fine pagina": in fondo, dopo i contenuti */
.pm-footer .pm-social { margin: 2.5em 0 0; }
.pm-footer--social-only .pm-social { margin-top: 0; padding-top: 0; border-top: 0; }

/* Pulsante "Lasciaci una recensione su Google" */
.pm-social .pm-social__review .wp-social-link {
	color: #1f1f1f !important;
	background: #ffffff !important;
	border-radius: 999px;
}
.pm-social .pm-social__review .wp-block-social-link-anchor {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 22px;
	color: #1f1f1f !important;
	text-decoration: none;
}
.pm-social .pm-social__review svg { width: 22px; height: 22px; }
.pm-social .pm-social__review .wp-block-social-link-label {
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
}
.pm-social .pm-social__review .wp-social-link:hover { background: #f1f1f1 !important; }

/* --------------------------------------------------------------------------
   Surgelati: asterisco e nota in fondo al menu
   ----------------------------------------------------------------------- */
.pm-frozen {
	color: var(--pm-frozen, #6cc4ff); /* azzurro "ghiaccio", diverso dal rosso dei prezzi */
	font-weight: 700;
}
.pm-frozen-note {
	margin: calc(var(--pm-gap) * 1.5) 0 0;
	padding-top: 16px;
	font-family: "Roboto", system-ui, sans-serif;
	font-size: .88rem;
	line-height: 1.5;
	color: var(--pm-muted);
	border-top: 1px solid var(--pm-border);
}

/* --------------------------------------------------------------------------
   Sezioni
   ----------------------------------------------------------------------- */
.pm-section { scroll-margin-top: 150px; }
.pm-section + .pm-section { margin-top: calc(var(--pm-gap) * 1.6); }
.pm-section[hidden] { display: none; }

.pm-section__head { margin-bottom: var(--pm-gap); }
.pm-menu .pm-section__title {
	margin: 0;
	font-size: clamp(1.85rem, 3.6vw, 2.5rem);
	line-height: 1.2;
	color: var(--pm-text);
}
.pm-section__title::after {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	margin-top: 10px;
	background: var(--pm-accent);
	border-radius: 2px;
}
.pm-section__desc { margin: 10px 0 0; color: var(--pm-muted); }

/* --------------------------------------------------------------------------
   Card prodotto
   ----------------------------------------------------------------------- */
.pm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: var(--pm-gap);
}

.pm-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--pm-card);
	border: 1px solid var(--pm-border);
	border-radius: var(--pm-radius);
}
.pm-card[hidden] { display: none; }

.pm-card__media {
	aspect-ratio: 4 / 3;
	background: var(--pm-chip);
	overflow: hidden;
}
.pm-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.pm-card__zoom {
	position: relative;
	display: block;
	height: 100%;
	cursor: zoom-in;
	-webkit-tap-highlight-color: transparent;
}
.pm-card__zoom:focus-visible { outline: 3px solid var(--pm-accent); outline-offset: -3px; }
.pm-card__zoomicon {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	color: #fff;
	background: rgba(0, 0, 0, .55);
	border-radius: 50%;
	opacity: .85;
	transition: opacity .2s;
}
@media (hover: hover) {
	.pm-card__zoomicon { opacity: 0; }
	.pm-card__zoom:hover .pm-card__img { transform: scale(1.04); }
	.pm-card__zoom:hover .pm-card__zoomicon,
	.pm-card__zoom:focus-visible .pm-card__zoomicon { opacity: 1; }
}

.pm-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px 20px 20px;
}

.pm-menu .pm-card__title {
	margin: 0 0 14px;
	font-family: "Fjalla One", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
	font-weight: 400; /* Fjalla One ha un solo peso */
	font-size: 1.5rem;
	line-height: 1.25;
	letter-spacing: .01em;
	color: var(--pm-text);
}
.pm-card__badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 9px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	vertical-align: middle;
	color: var(--pm-accent);
	border: 1px solid currentColor;
	border-radius: 999px;
}

.pm-card__desc {
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-weight: 400;
	color: var(--pm-text);
	font-size: 1.06rem;
	line-height: 1.6;
}
.pm-card__desc p { margin: 0 0 0.6em; }
.pm-card__desc p:last-child { margin-bottom: 0; }

.pm-card__foot {
	margin-top: auto;
	padding-top: 18px;
}

.pm-allergens {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}
.pm-allergen {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 4px 11px;
	font-size: 0.78rem;
	line-height: 1.3;
	color: var(--pm-muted);
	background: var(--pm-chip);
	border: 1px solid var(--pm-border);
	border-radius: 999px;
}
.pm-allergen__icon { font-size: 0.9em; }

.pm-price {
	display: inline-block;
	min-width: 72px;
	padding: 9px 18px;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	text-align: center;
	color: var(--pm-accent-text);
	background: var(--pm-accent);
	border-radius: 999px;
}

/* --------------------------------------------------------------------------
   "In evidenza": card più grandi in cima al menu
   ----------------------------------------------------------------------- */
.pm-section--featured .pm-section__title::before {
	content: "★ ";
	color: var(--pm-accent);
}
.pm-grid--featured {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
}
.pm-card--featured {
	border-color: color-mix(in srgb, var(--pm-accent) 55%, var(--pm-border));
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--pm-accent) 25%, transparent), 0 12px 32px rgba(0, 0, 0, .35);
}
.pm-menu .pm-card--featured .pm-card__title { font-size: clamp(1.6rem, 3vw, 2rem); }
.pm-card--featured .pm-card__desc { font-size: 1.1rem; }
.pm-card--featured .pm-price { font-size: 1.2rem; padding: 10px 22px; }

@media (min-width: 760px) {
	/* foto a sinistra, testo a destra */
	.pm-card--featured:not(.pm-card--noimg) { flex-direction: row; }
	.pm-card--featured .pm-card__media {
		flex: 0 0 50%;
		aspect-ratio: auto;
		min-height: 320px;
	}
	.pm-card--featured .pm-card__body { padding: 30px 30px 28px; justify-content: center; }
}

/* Evidenzia il termine cercato */
.pm-menu mark.pm-hl {
	padding: 0 2px;
	color: inherit;
	background: color-mix(in srgb, var(--pm-accent) 40%, transparent);
	border-radius: 3px;
}

.pm-noresults {
	margin: 2em 0;
	text-align: center;
	color: var(--pm-muted);
}
.pm-noresults[hidden] { display: none; }

.pm-empty-admin {
	padding: 1em;
	border: 1px dashed currentColor;
	border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Smartphone: card più compatte, foto a lato per i prodotti con foto
   ----------------------------------------------------------------------- */
@media (max-width: 600px) {
	.pm-menu { padding: 14px; }
	.pm-toolbar { margin: -14px -14px 16px; padding: 14px 14px 8px; border-radius: 0; }
	.pm-card__body { padding: 16px; }
	.pm-menu .pm-card__title { font-size: 1.35rem; margin-bottom: 8px; }
	.pm-card__desc { font-size: 1rem; }
	.pm-card__media { aspect-ratio: 16 / 10; }
}

/* --------------------------------------------------------------------------
   Lightbox foto
   ----------------------------------------------------------------------- */
html.pm-lb-open { overflow: hidden; }

.pm-lightbox {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	color: #fff;
	background: transparent;
	overflow: hidden;
}
.pm-lightbox::backdrop { background: rgba(0, 0, 0, .92); }
.pm-lightbox[open] { animation: pm-lb-in .2s ease-out; }
@keyframes pm-lb-in { from { opacity: 0; } to { opacity: 1; } }

.pm-lb__stage {
	position: absolute;
	inset: 0;
	display: flex;
	padding: 60px 12px 70px;
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.pm-lb__img {
	display: block;
	margin: auto;                 /* centra, ma resta scorribile se più grande */
	max-width: 100%;
	max-height: calc(100vh - 130px);
	max-height: calc(100dvh - 130px);
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
	touch-action: pinch-zoom;
	user-select: none;
	-webkit-user-drag: none;
	transition: opacity .2s, transform .2s;
}
.pm-lb__img.is-loading { opacity: .6; }
.pm-lightbox.is-zoomable .pm-lb__img { cursor: zoom-in; }

/* Dimensione originale (quando la foto è più grande dello schermo) */
.pm-lightbox.is-zoomed .pm-lb__stage { padding: 0; }
.pm-lightbox.is-zoomed .pm-lb__img {
	max-width: none;
	max-height: none;
	border-radius: 0;
	cursor: zoom-out;
}
.pm-lightbox.is-zoomed .pm-lb__caption { opacity: 0; }

.pm-lightbox .pm-lb__close {
	position: fixed;
	top: max(10px, env(safe-area-inset-top));
	right: max(10px, env(safe-area-inset-right));
	z-index: 2;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	font-size: 30px;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, .55);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	cursor: pointer;
}
.pm-lightbox .pm-lb__close:hover,
.pm-lightbox .pm-lb__close:focus-visible { background: #d9473b; border-color: #d9473b; outline: none; }

.pm-lb__caption {
	position: fixed;
	left: 0;
	right: 0;
	bottom: max(18px, env(safe-area-inset-bottom));
	margin: 0;
	padding: 0 20px;
	font-family: "Fjalla One", "Arial Narrow", Arial, sans-serif;
	font-size: 1.35rem;
	text-align: center;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
	pointer-events: none;
	transition: opacity .2s;
}
.pm-lb__hint {
	display: block;
	margin-top: 2px;
	font-family: system-ui, sans-serif;
	font-size: .75rem;
	opacity: .7;
}

.pm-lb__spinner {
	position: fixed;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid rgba(255, 255, 255, .25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pm-spin .8s linear infinite;
	pointer-events: none;
}
.pm-lb__spinner[hidden] { display: none; }
@keyframes pm-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.pm-lightbox[open], .pm-lb__spinner { animation: none; }
	.pm-card__img, .pm-lb__img { transition: none; }
}

@media (prefers-reduced-motion: no-preference) {
	html:has(.pm-menu) { scroll-behavior: smooth; }
}

@media print {
	.pm-toolbar, .pm-lightbox, .pm-card__zoomicon, .pm-social { display: none; }
	.pm-menu { --pm-bg: #fff; --pm-card: #fff; --pm-text: #000; --pm-muted: #333; --pm-chip: #fff; --pm-border: #ccc; padding: 0; }
	.pm-card { break-inside: avoid; }
	.pm-card__media { display: none; }
	.pm-price { color: #000; background: none; border: 1px solid #000; }
}
