/* =============================================================
   Mahsen Gaziantep Baklava — Mobile Speisekarte (QR-Seite)
   Mobile-first. Ziel: am Tisch, mit einer Hand, ohne Zoomen.
   ============================================================= */

.mpage {
  background: var(--ink);
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}
.mwrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 14px; }

/* ---------- Kopf ---------- */
.mtop {
  position: relative; z-index: 5;
  background: linear-gradient(180deg, #100d09, var(--ink));
  border-bottom: 1px solid var(--line);
  padding: 14px 0 16px;
}
.mtop-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mtop-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mtop-brand img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.mtop-brand span { display: grid; line-height: 1.1; min-width: 0; }
.mtop-brand b {
  font-family: var(--font-display); font-size: .92rem; font-weight: 600;
  letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mtop-brand small { font-family: var(--font-script); font-size: .78rem; color: var(--gold); }

.mhead { text-align: center; padding: 22px 0 16px; }
.mhead h1 {
  font-family: var(--font-display); font-size: clamp(1.6rem, 7vw, 2.3rem);
  text-transform: uppercase; letter-spacing: .06em; margin: 0;
}
.mhead .mhint {
  font-size: .76rem; color: var(--cream-mut); margin: 10px 0 0;
  display: inline-flex; align-items: center; gap: 7px;
}
.mhead .mhint i { color: var(--gold); }

/* ---------- Sticky Suche + Kategorien ---------- */
.msticky {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 6, 5, .93);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 0;
}
.msearch { position: relative; margin-bottom: 10px; }
.msearch i.bi-search {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: .95rem; pointer-events: none;
}
.msearch input {
  width: 100%; height: 46px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-soft); border-radius: 999px;
  color: var(--cream); font-family: var(--font-ui); font-size: 16px; /* iOS-Zoom vermeiden */
  padding: 0 44px 0 42px;
  transition: border-color .3s, background .3s;
}
.msearch input:focus {
  outline: none; border-color: rgba(212, 175, 55, .55);
  background: rgba(212, 175, 55, .06);
}
.msearch input::placeholder { color: rgba(246, 239, 226, .34); }
.msearch button {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .08); color: var(--cream-dim);
  display: none; place-items: center; cursor: pointer; font-size: .8rem;
}
.msearch.has-value button { display: grid; }

.mtabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 0 11px;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.mtabs::-webkit-scrollbar { display: none; }
.mtab {
  flex: 0 0 auto; scroll-snap-align: start;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  color: var(--cream-dim); border-radius: 999px;
  padding: 9px 17px; font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  white-space: nowrap; transition: all .3s var(--ease-out);
}
.mtab.active {
  background: var(--gold-grad); color: #120e05; border-color: transparent;
  box-shadow: 0 6px 18px -8px rgba(212, 175, 55, .9);
}

/* ---------- Kategorie-Abschnitte ---------- */
.msec { padding-top: 26px; }
.msec-h {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px; padding: 0 2px;
}
.msec-h h2 {
  font-family: var(--font-display); font-size: 1.12rem;
  letter-spacing: .1em; text-transform: uppercase; margin: 0;
  white-space: nowrap;
}
.msec-h .ln { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.msec-h .cnt {
  font-size: .64rem; letter-spacing: .12em; color: var(--cream-mut);
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}

/* ---------- Produktzeile ---------- */
.mrow {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 13px; align-items: center;
  padding: 11px; margin-bottom: 9px;
  border: 1px solid var(--line-soft); border-radius: 15px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, .008));
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .3s, background .3s, transform .18s var(--ease-out);
}
.mrow:active { transform: scale(.985); }
@media (hover: hover) {
  .mrow:hover { border-color: rgba(212, 175, 55, .42); background: rgba(212, 175, 55, .05); }
}
.mrow-img {
  width: 74px; height: 74px; border-radius: 11px; object-fit: cover;
  background: #000; border: 1px solid var(--line-soft);
}
.mrow-b { min-width: 0; }
.mrow-b h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  letter-spacing: .02em; margin: 0 0 3px; line-height: 1.25;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.mrow-b h3 .star { color: var(--gold); font-size: .72rem; }
.mrow-sub {
  font-family: var(--font-serif); font-size: .92rem; color: var(--cream-dim);
  margin: 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mrow-al {
  font-size: .58rem; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(246, 239, 226, .3); margin: 5px 0 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.mrow-p { text-align: right; display: grid; gap: 2px; justify-items: end; }
.mrow-p b {
  font-family: var(--font-display); font-size: 1.05rem; color: var(--gold-lite);
  font-weight: 600; white-space: nowrap;
}
.mrow-p em {
  font-style: normal; font-size: .55rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cream-mut); white-space: nowrap;
}
.mrow-p .kg {
  font-size: .68rem; color: rgba(246, 239, 226, .5); white-space: nowrap;
  margin-top: 3px; padding-top: 3px; border-top: 1px dashed rgba(212, 175, 55, .2);
}

.mempty {
  text-align: center; color: var(--cream-mut); padding: 54px 20px;
  font-family: var(--font-serif); font-size: 1.05rem;
}
.mempty i { display: block; font-size: 1.8rem; color: var(--gold); margin-bottom: 12px; }

/* ---------- Allergen-Hinweis ---------- */
.mnote {
  margin: 30px 0 0; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(212, 175, 55, .04);
  display: flex; gap: 12px; font-size: .8rem; color: var(--cream-dim); line-height: 1.6;
}
.mnote i { color: var(--gold); font-size: 1.05rem; flex: 0 0 auto; }

.mfoot {
  text-align: center; padding: 30px 0 26px;
  color: var(--cream-mut); font-size: .74rem;
}
.mfoot .script { font-family: var(--font-script); color: var(--gold); font-size: 1.25rem; display: block; margin-bottom: 8px; }

/* ---------- Fixe Aktionsleiste ---------- */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(9, 8, 6, .96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mbar a {
  display: grid; place-items: center; gap: 4px;
  padding: 11px 4px 12px; color: var(--cream-dim);
  font-size: .58rem; letter-spacing: .1em; text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}
.mbar a i { font-size: 1.2rem; color: var(--gold); }
.mbar a:active { background: rgba(212, 175, 55, .1); }
.mbar a.primary { color: #120e05; background: var(--gold-grad); }
.mbar a.primary i { color: #120e05; }

/* ---------- Detail-Sheet ---------- */
.msheet-bd {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(4, 3, 2, .78); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.msheet-bd.open { opacity: 1; visibility: visible; }
.msheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71;
  max-height: 90svh; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #17130d, #0a0806);
  border-top: 1px solid rgba(212, 175, 55, .38);
  border-radius: 22px 22px 0 0;
  transform: translateY(102%);
  transition: transform .48s var(--ease-out);
  padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -30px 70px -30px rgba(0, 0, 0, .95);
}
.msheet.open { transform: translateY(0); }
@media (min-width: 700px) {
  .msheet {
    left: 50%; right: auto; bottom: 50%; width: min(560px, 92vw);
    transform: translate(-50%, 60%) scale(.96); opacity: 0;
    border-radius: 22px; border: 1px solid rgba(212, 175, 55, .38);
    max-height: 86svh;
  }
  .msheet.open { transform: translate(-50%, 50%) scale(1); opacity: 1; }
}
.msheet-grab {
  width: 44px; height: 4px; border-radius: 4px;
  background: rgba(246, 239, 226, .22);
  margin: 11px auto 4px;
}
.msheet-img {
  width: 100%; aspect-ratio: 16/11; object-fit: cover;
  background: #000; display: block;
}
.msheet-body { padding: 20px 22px 6px; }
.msheet-body h3 {
  font-family: var(--font-display); font-size: 1.45rem; margin: 0 0 6px;
  letter-spacing: .02em;
}
.msheet-body .cat {
  display: inline-block; font-size: .58rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold-lite);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
  margin-bottom: 12px;
}
.msheet-body p.d {
  font-family: var(--font-serif); font-size: 1.06rem; color: var(--cream-dim);
  line-height: 1.65; margin: 0 0 18px;
}
.msheet-prices { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.msheet-prices span {
  flex: 1 1 130px;
  border: 1px solid rgba(212, 175, 55, .24); border-radius: 12px;
  background: rgba(212, 175, 55, .07); padding: 11px 14px;
  display: grid; gap: 2px;
}
.msheet-prices em {
  font-style: normal; font-size: .56rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--cream-mut);
}
.msheet-prices b { font-family: var(--font-display); font-size: 1.2rem; color: var(--gold-lite); }
.msheet-al {
  font-size: .74rem; color: rgba(246, 239, 226, .5); line-height: 1.6;
  border-top: 1px solid var(--line-soft); padding-top: 14px;
}
.msheet-al b { color: var(--gold); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .62rem; }
.msheet-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(7, 6, 5, .7);
  color: var(--gold); display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(6px); font-size: .9rem;
}

/* ---------- Nach-oben ---------- */
.mtop-btn {
  position: fixed; right: 14px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(9, 8, 6, .9);
  color: var(--gold); display: grid; place-items: center; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
  backdrop-filter: blur(10px);
}
.mtop-btn.show { opacity: 1; pointer-events: auto; }

/* ---------- Zwei Spalten ab Tablet ---------- */
@media (min-width: 700px) {
  .mwrap { max-width: 1000px; }
  .mrows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mrow { margin-bottom: 0; }
}

/* ---------- Eintritts-Animation ---------- */
.mrow, .msec-h { opacity: 0; transform: translateY(14px); }
.mrow.in, .msec-h.in {
  opacity: 1; transform: none;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .mrow, .msec-h { opacity: 1 !important; transform: none !important; }
}

/* Datenschutz-Hinweis darf die feste Aktionsleiste nicht verdecken */
.mpage .privacy-note {
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 575.98px) {
  .mpage .privacy-note { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* =============================================================
   LIGHT MODE — QR menü sayfası
   ============================================================= */
:root[data-theme="light"] .mtop {
  background: linear-gradient(180deg, #fffdf8, var(--ink));
}
:root[data-theme="light"] .msticky {
  background: rgba(250, 247, 240, .94);
  box-shadow: 0 6px 22px -20px rgba(70, 50, 18, .6);
}
:root[data-theme="light"] .msearch input { background: rgba(255, 255, 255, .9); }
:root[data-theme="light"] .msearch input:focus { background: #fff; }
:root[data-theme="light"] .msearch input::placeholder { color: rgba(35, 24, 13, .38); }
:root[data-theme="light"] .msearch button { background: rgba(35, 24, 13, .08); }
:root[data-theme="light"] .mtab { background: rgba(255, 253, 248, .8); }
:root[data-theme="light"] .mtab.active { background: var(--gold-grad); color: var(--on-gold); }

:root[data-theme="light"] .mrow {
  background: linear-gradient(140deg, #fffdf8, #f7f1e4);
  box-shadow: 0 8px 20px -18px rgba(70, 50, 18, .45);
}
@media (hover: hover) {
  :root[data-theme="light"] .mrow:hover { background: rgba(169, 126, 28, .07); }
}
:root[data-theme="light"] .mrow-img { background: #f3ece0; }
:root[data-theme="light"] .mrow-al { color: rgba(35, 24, 13, .45); }
:root[data-theme="light"] .mrow-p b { color: var(--gold-deep); }
:root[data-theme="light"] .mrow-p .kg { color: rgba(35, 24, 13, .55); }
:root[data-theme="light"] .mnote { background: rgba(169, 126, 28, .07); }

:root[data-theme="light"] .mbar {
  background: rgba(252, 249, 243, .97);
  box-shadow: 0 -8px 26px -22px rgba(70, 50, 18, .6);
}
:root[data-theme="light"] .msheet-bd { background: rgba(244, 238, 226, .82); }
:root[data-theme="light"] .msheet {
  background: linear-gradient(180deg, #fffdf8, #f4ecdc);
  box-shadow: 0 -26px 60px -30px rgba(70, 50, 18, .5);
}
:root[data-theme="light"] .msheet-grab { background: rgba(35, 24, 13, .2); }
:root[data-theme="light"] .msheet-img { background: #f3ece0; }
:root[data-theme="light"] .msheet-close { background: rgba(255, 253, 248, .85); }
:root[data-theme="light"] .msheet-prices span { background: rgba(169, 126, 28, .10); }
:root[data-theme="light"] .msheet-prices b { color: var(--gold-deep); }
:root[data-theme="light"] .msheet-al { color: rgba(35, 24, 13, .58); }
:root[data-theme="light"] .mtop-btn { background: rgba(255, 253, 248, .92); }
:root[data-theme="light"] .mempty i { color: var(--gold-deep); }


/* Dar ekranda üst çubuk: marka + dil + tema hepsi sığsın */
@media (max-width: 575.98px) {
  .mtop-brand img, .mtop-brand .brand-mark { width: 32px; height: 32px; }
  .mtop-brand { gap: 8px; }
  .mtop-brand b { font-size: .78rem; letter-spacing: .03em; }
  .mtop-brand small { font-size: .7rem; }
  .mtop-in .lang-switch button { padding: 4px 8px; font-size: .6rem; }
  .mtop-in { gap: 8px; }
}
