/* Menu Famous Fried Chicken */

:root {
  --header-h: 64px;
  --nav-h: 64px;
}

html:has(dialog[open]) { overflow: hidden; }
body { padding-bottom: 96px; }

/* ---------- Header ---------- */
.m-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--red);
  color: var(--cream);
  border-bottom: 3px solid var(--navy);
}
.m-header__inner {
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.m-back {
  justify-self: start; display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding-right: 8px;
  font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem;
  text-decoration: none;
}
.m-back svg { width: 20px; height: 20px; }
.m-logo img { height: 46px; width: auto; filter: drop-shadow(0 2px 0 rgba(29, 25, 64, 0.35)); }

/* ---------- Hero ---------- */
.m-hero { border-bottom: 3px solid var(--navy); overflow: hidden; }
.m-hero__inner {
  display: grid; gap: 24px; align-items: center;
  padding-block: clamp(28px, 6vw, 64px);
}
.m-hero__title { font-size: clamp(4rem, 17vw, 8.5rem); color: var(--navy); }
.m-hero__title .script {
  display: inline-block; color: var(--red);
  font-size: 0.82em; transform: rotate(-6deg) translateY(-0.04em);
  text-shadow: 3px 3px 0 var(--navy);
  margin-left: 0.06em;
}
.m-hero__lead { max-width: 34ch; font-size: 1.08rem; margin: 14px 0 20px; }
.m-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.m-hero__photo { display: none; margin: 0; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 2px solid var(--navy); border-radius: 999px;
  background: #fff; font-weight: 800; font-size: 0.9rem;
}
.status-pill::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); flex: none;
}
.status-pill.is-open::before { background: #2f9e5b; box-shadow: 0 0 0 0 rgba(47, 158, 91, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 158, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 91, 0); } }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 800; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.link-btn svg { width: 20px; height: 20px; }

@media (min-width: 800px) {
  .m-hero__inner { grid-template-columns: 1.3fr 1fr; }
  .m-hero__photo { display: block; justify-self: center; transform: rotate(3deg); }
  .m-hero__photo img {
    width: min(340px, 100%); aspect-ratio: 4 / 5; object-fit: cover;
    border: 8px solid #fff; outline: 2.5px solid var(--navy);
    border-radius: 10px; box-shadow: var(--shadow-sticker-lg);
  }
}

/* ---------- Navigazione categorie ---------- */
.m-cats {
  position: sticky; top: var(--header-h); z-index: 20;
  background: var(--cream); border-bottom: 2px solid var(--navy);
}
.m-cats__track {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-block: 10px; height: var(--nav-h); align-items: center;
  scroll-padding-inline: var(--gutter);
}
.m-cats__track::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px 0 4px;
  background: #fff; border: 2px solid var(--navy); border-radius: 999px;
  font-weight: 800; font-size: 0.9rem; text-decoration: none; white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}
.cat-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--photo-bg); }
.cat-chip[aria-current="true"] { background: var(--navy); color: var(--cream); }
@media (hover: hover) and (pointer: fine) {
  .cat-chip:hover:not([aria-current="true"]) { background: var(--yellow); }
}

/* ---------- Sezioni e card ---------- */
.m-main { padding-block: 8px 48px; }
.m-section { padding-top: 40px; scroll-margin-top: calc(var(--header-h) + var(--nav-h) + 8px); }
.m-section__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.m-section__badge {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--photo-bg); border: 2.5px solid var(--navy); box-shadow: 3px 3px 0 var(--red);
}
.m-section__title { font-size: clamp(2.1rem, 7vw, 3.4rem); }
.m-section__count {
  margin-left: auto; align-self: flex-end; padding-bottom: 6px;
  font-style: italic; font-weight: 700; font-size: 0.85rem; color: var(--navy-soft); white-space: nowrap;
}

.item-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }

.item-card {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: stretch;
  padding: 10px; background: #fff;
  border: 2.5px solid var(--navy); border-radius: var(--radius-m);
  box-shadow: var(--shadow-sticker);
}
@media (min-width: 1000px) { .item-card { grid-template-columns: 140px minmax(0, 1fr); } }

.item-card__media {
  aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--photo-bg);
  align-self: start;
}
.item-card__img { width: 100%; height: 100%; object-fit: cover; }
.item-card__img--empty {
  display: grid; place-items: center; width: 100%; height: 100%; background: var(--photo-bg);
}
.item-card__img--empty img { width: 55%; opacity: 0.5; }

.item-card__body { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; padding: 2px 4px 2px 0; }
.item-card__name {
  margin: 0; font-stretch: 78%; font-weight: 900; text-transform: uppercase;
  font-size: 1.2rem; line-height: 1.05; letter-spacing: 0.01em;
}
.item-card__desc {
  margin: 0; font-size: 0.88rem; line-height: 1.4; color: var(--navy-soft);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.item-card.is-out .item-card__media { filter: grayscale(1); opacity: 0.55; }
.item-card.is-out .item-card__name { opacity: 0.6; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; border: 2px solid var(--navy);
  font-size: 0.7rem; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge svg { width: 12px; height: 12px; }
.badge--star { background: var(--yellow); }
.badge--out { background: var(--navy); color: var(--cream); }
.badge--veg { background: var(--cream); }

.spice { display: inline-flex; vertical-align: middle; color: var(--red); margin-left: 2px; }
.spice svg { width: 15px; height: 15px; margin-left: -3px; }

.m-noscript { padding: 40px 0; font-weight: 700; }

/* ---------- Pannelli (dialog) ---------- */
.sheet {
  padding: 0; border: 0; color: var(--navy); background: var(--cream);
  width: 100%; max-width: 100%; max-height: 92dvh;
  margin: auto auto 0; border-radius: 24px 24px 0 0;
  border-top: 3px solid var(--navy);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 320ms var(--ease-out), overlay 320ms allow-discrete, display 320ms allow-discrete;
}
.sheet[open] { display: flex; flex-direction: column; transform: none; }
@starting-style { .sheet[open] { transform: translateY(100%); } }
.sheet::backdrop {
  background: rgba(29, 25, 64, 0);
  transition: background-color 320ms ease, overlay 320ms allow-discrete, display 320ms allow-discrete;
}
.sheet[open]::backdrop { background: rgba(29, 25, 64, 0.6); }
@starting-style { .sheet[open]::backdrop { background: rgba(29, 25, 64, 0); } }

.sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px 14px; border-bottom: 2px solid var(--line);
}
.sheet__title { font-size: 2rem; }
.sheet__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 24px; }
.sheet__foot {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 2.5px solid var(--navy); background: var(--cream);
}

.icon-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  background: var(--cream); color: var(--navy);
  border: 2.5px solid var(--navy); border-radius: 50%; cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }

@media (min-width: 720px) {
  .info-sheet {
    width: min(580px, 100% - 32px); max-height: min(88dvh, 900px);
    margin: auto; border-radius: 24px;
    border: 3px solid var(--navy); box-shadow: 10px 10px 0 var(--navy);
    transform: none; opacity: 1;
    transition: transform 260ms var(--ease-out), opacity 200ms ease, overlay 260ms allow-discrete, display 260ms allow-discrete;
  }
  .info-sheet:not([open]) { transform: scale(0.96); opacity: 0; }
  @starting-style { .info-sheet[open] { transform: scale(0.96); opacity: 0; } }

  .cart-sheet {
    width: min(460px, 100%); height: 100dvh; max-height: 100dvh;
    margin: 0 0 0 auto; border-radius: 24px 0 0 24px;
    border: 0; border-left: 3px solid var(--navy);
    transform: translateX(100%);
  }
  .cart-sheet[open] { transform: none; }
  @starting-style { .cart-sheet[open] { transform: translateX(100%); } }
}



.m-order-btn { justify-self: end; }

/* ---------- Allergeni ---------- */
.allergen-groups h3 { margin: 20px 0 10px; font-weight: 900; text-transform: uppercase; font-size: 0.95rem; }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { padding: 6px 12px; border: 2px solid var(--navy); border-radius: 999px; background: #fff; font-weight: 700; font-size: 0.88rem; }
.info-sheet .sheet__foot { justify-content: flex-end; }

/* ---------- Barra "Ordina su Qromo" ---------- */
.m-cartbar {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25;
  animation: rise 320ms var(--ease-out);
}
@keyframes rise { from { transform: translateY(140%); } }
.m-cartbar__btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 22px; cursor: pointer; text-decoration: none;
  background: var(--navy); color: var(--cream);
  border: 2.5px solid var(--navy); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--yellow);
  font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: 0.03em;
}
.m-cartbar__label { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-cartbar__total { white-space: nowrap; font-size: 1.3rem; }
@media (min-width: 900px) {
  .m-cartbar { left: auto; right: 28px; bottom: 28px; width: 400px; }
}

/* ---------- Footer ---------- */
.m-footer { background: var(--navy); color: var(--cream); padding: 40px 0; text-align: center; }
.m-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.m-footer p { margin: 0; font-size: 0.9rem; }
.m-footer__small { opacity: 0.7; font-size: 0.8rem !important; }

/* Nomi prodotto e gruppi: stesso font dei titoli (Obviously Narrow Bold) */
.item-card__name { font-family: var(--font-display); font-weight: 400; font-stretch: normal; }
