/* Varga Pékség – étlap
   Hang: meleg, kézműves pékség, modern tipográfiával.
   Szín: sötét olíva fejléc, olíva fő szín, terrakotta árak, krém alap.
   Betű: Manrope – vastag, szoros címek, nyugodt szövegtörzs.
   Elrendezés: mobilon egy oszlop (fejléc → 4×2 ikonos csempe → kártyák → lábléc);
   900 px felett bal oldali, ragadós kategórialista + teljes szélességű kártyák, hosszú listák két oszlopban. */

:root {
  --olive: #5C644D;
  --olive-dark: #3F4A35;
  --olive-soft: #EEF0E6;
  --night: #2F3529;
  --cream: #F6F0E4;
  --paper: #FFFFFF;
  --ink: #26281F;
  --muted: #5B5D4F;
  --line: #E6DCC8;
  --edge: #E2D7C2;
  --tile-edge: #C9BC9F;
  --price: #8A4321;
  --terracotta: #9A4D27;
  --terracotta-soft: #F3DCCB;
  --peach: #F2CBA9;
  --radius: 20px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 84px;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.45 Manrope, system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
}

::selection { background: #EBCFB8; color: var(--ink); }
a { color: var(--olive-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--olive-dark); outline-offset: 2px; }
h3:focus { outline: none; }
h3:focus-visible { outline: 3px solid var(--olive-dark); outline-offset: 4px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { display: block; flex: none; }

/* ---- Fejléc ---- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--cream);
  border-radius: 0 0 28px 28px;
}
.hero__inner { position: relative; max-width: 1160px; margin: 0 auto; min-height: 300px; }
.hero__cup {
  position: absolute; top: 0; right: 0;
  width: min(54%, 220px); height: 100%;
  object-fit: cover; object-position: 45% 40%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48%);
  mask-image: linear-gradient(90deg, transparent 0, #000 48%);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30, 36, 26, 0) 58%, rgba(30, 36, 26, 0.88) 100%);
  pointer-events: none;
}
.hero__body {
  position: relative; z-index: 1;
  padding: 20px 20px 18px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.hero__logo {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: var(--cream);
  padding: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.hero__text { display: flex; flex-direction: column; }
.hero h1 {
  margin: 14px 0 12px;
  font-size: 34px; font-weight: 800; line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero h1 span { display: block; color: var(--peach); }
.hero__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(246, 240, 228, 0.14);
  color: var(--cream);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: #E3A34B; }
.status.is-open .status__dot { background: #A9D98C; }
.hero__how { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; }

/* ---- Elrendezés ---- */
.layout { max-width: 1160px; margin: 0 auto; }
.side__label { display: none; }
.menu__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sourdough { margin: 0 2px 14px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.sourdough strong { color: var(--olive-dark); }
.sourdough__icon { flex: none; color: #B8693D; }

/* ---- Kategória-csempék ---- */
.tabs {
  padding: 16px 20px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.tab {
  min-height: 78px;
  padding: 10px 4px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 16px;
  border: 1px solid var(--tile-edge);
  background: var(--paper);
  color: var(--ink);
  font-size: 13.5px; font-weight: 600; line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.tab { position: relative; }
.tab .ico { color: var(--olive-dark); }
.tab__late {
  position: absolute; top: 5px; right: 5px;
  padding: 2px 6px; border-radius: 999px;
  background: var(--terracotta-soft); color: #6E3418;
  font-size: 10.5px; font-weight: 700; line-height: 1.3;
}
.tab:hover { color: var(--ink); border-color: var(--olive); }
.tab.is-active {
  background: var(--olive); border-color: var(--olive); color: var(--cream); font-weight: 700;
  box-shadow: 0 4px 12px rgba(63, 74, 53, 0.22);
}
.tab.is-active .ico { color: var(--cream); }

/* ---- Étlap ---- */
.menu { padding: 14px 20px 0; }
.panel { scroll-margin-top: 12px; }
.panel[hidden] { display: none; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

.card {
  break-inside: avoid;
  margin-bottom: 14px;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 18px 18px 6px;
  box-shadow: 0 2px 6px rgba(63, 74, 53, 0.07);
}
.card__head { display: flex; align-items: center; gap: 12px; }
.card__icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  background: var(--olive-soft);
  color: var(--olive-dark);
  display: flex; align-items: center; justify-content: center;
}
.card h3 {
  margin: 0;
  flex: 1;
  font-size: 21px; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--olive-dark);
}
.badge {
  flex: none;
  background: var(--terracotta-soft); color: #6E3418;
  font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
}
.note { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.sizes {
  display: flex; justify-content: flex-end;
  padding-top: 10px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.sizes span, .item__prices .price { width: 74px; text-align: right; }

.items { list-style: none; margin: 0; padding: 0; }
.item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.item:last-child { border-bottom: 0; }
.item__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item__name { font-size: 15.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.item__desc { font-size: 13px; color: var(--muted); }
.item__allerg { font-size: 12px; color: var(--muted); }
.item__prices { display: flex; flex: none; }
.price { flex: none; font-weight: 700; font-size: 15px; color: var(--price); white-space: nowrap; }

.items--compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.items--compact .item { padding: 10px 0; gap: 8px; }
.items--compact .item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.items--compact .item__name { font-weight: 500; font-size: 15px; }
.items--compact .price { font-size: 14px; }

.menu__note { margin: 4px 2px 0; font-size: 12.5px; color: var(--muted); }

/* ---- Lebegő kategóriagomb (mobil) ---- */
.to-cats {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  right: 16px;
  z-index: 10;
  min-height: 48px;
  padding: 0 18px 0 14px;
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px;
  background: var(--olive-dark);
  color: var(--cream);
  font-size: 15px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(38, 40, 31, 0.28);
}
.to-cats:hover { color: var(--cream); background: var(--ink); }
.to-cats.is-hidden { opacity: 0; visibility: hidden; transform: translateY(12px); pointer-events: none; }

/* ---- Elérhetőség ---- */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; font-size: 14px; line-height: 1.55; }
.info--side { display: none; }
.info__box { background: var(--paper); border: 1px solid var(--edge); border-radius: 18px; padding: 16px 18px; }
.info__box h2 { margin: 0 0 4px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--olive-dark); }
.info__box p { margin: 0; }
.info__box--dark { background: var(--olive); border-color: var(--olive); color: var(--cream); }
.info__box--dark h2 { color: var(--cream); }
.info__phone { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--ink); }
.btn {
  grid-column: 1 / -1;
  min-height: 50px;
  padding: 8px 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--olive); color: var(--cream);
  font-weight: 700; font-size: 15px; text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--olive-dark); color: var(--cream); }

/* ---- Lábléc ---- */
.foot { margin: 28px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.foot__lead { margin: 0 0 4px; font-size: 16px; line-height: 1.45; }
.foot__lead strong { color: var(--terracotta); }

/* ================= Asztali (900 px felett) ================= */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .hero { border-radius: 0 0 32px 32px; }
  .hero__inner { min-height: 230px; padding: 0 40px; display: flex; align-items: center; }
  .hero__cup {
    width: clamp(260px, 33vw, 420px); object-position: 50% 40%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%, #000 80%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 42%, #000 80%, transparent 100%);
  }
  .hero::after { display: none; }
  .hero__body { padding: 0; flex-direction: row; align-items: center; gap: 28px; min-height: 230px; }
  .hero__logo { width: 124px; height: 124px; padding: 5px; }
  .hero h1 { margin: 0 0 14px; font-size: clamp(38px, 3.9vw, 48px); line-height: 0.95; }
  .hero h1 span { display: inline; }
  .hero__meta { flex-direction: row; align-items: center; gap: 16px; }
  .hero__how { font-size: 16px; }

  .layout {
    padding: 28px 40px 40px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
  }
  .side {
    position: sticky; top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 10px;
    padding: 2px 2px 4px;
  }
  .side__label { display: block; margin: 0; font-size: 15px; font-weight: 800; color: var(--olive-dark); }
  .tabs { padding: 0; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tab {
    min-height: 48px; padding: 0 12px;
    flex-direction: row; justify-content: flex-start; gap: 10px;
    text-align: left; border-radius: 14px;
  }
  .tab .ico { width: 24px; height: 24px; }
  .tab__late { position: static; margin-left: auto; }
  .info--side { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 14px; }

  .menu { padding: 0; }
  .menu__head {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
    display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px;
  }
  .menu__title { margin: 0; font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
  .menu__count { font-size: 14px; color: var(--muted); }
  .sourdough { margin: 0 0 16px; }

  .card { padding: 20px 24px 8px; }
  .items--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .items--two .item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .items--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
  .items--compact .item:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
  .items--compact .item:nth-last-child(-n+3):nth-child(3n+1),
  .items--compact .item:nth-last-child(-n+2):nth-child(3n+2) { border-bottom: 0; }
  .card .sizes, .items--sized { max-width: 560px; }

  .to-cats { display: none; }
  .foot { max-width: 1160px; margin: 0 auto; padding: 0 40px 40px; }
  .info--foot { display: none; }
}

@media (min-width: 900px) and (max-width: 1100px) {
  .hero__cup { width: 260px; }
  .items--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Keskeny kijelző / 200%-os nagyítás ---- */
@media (max-width: 340px) {
  .hero__inner { min-height: 0; }
  .hero__cup { display: none; }
  .hero__logo { width: 64px; height: 64px; padding: 3px; }
  .hero h1 { margin: 10px 0 10px; font-size: 28px; }
  .hero__meta { gap: 10px; }
  .status { white-space: normal; }
  .tabs { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tab { min-height: 48px; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 0 12px; text-align: left; }
  .tab__late { position: static; margin-left: auto; }
  .item { flex-wrap: wrap; }
  .item__text { flex: 1 1 100%; }
  .sizes { display: none; }
  .item__prices { flex: 1 1 100%; flex-direction: column; align-items: flex-start; gap: 2px; }
  .card { padding: 16px 14px 6px; }
  .card__head { flex-wrap: wrap; gap: 8px 10px; }
  .card h3 { font-size: 18px; flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
  .badge { white-space: normal; }
  .item__prices .price { width: auto; }
  .item__prices .sr { position: static; width: auto; height: auto; clip: auto; overflow: visible; font-weight: 500; color: var(--muted); }
  .items--compact { grid-template-columns: minmax(0, 1fr); }
  .items--compact .item { flex-wrap: nowrap; }
  .items--compact .item__text { flex: 1 1 auto; }
  .to-cats { right: 8px; bottom: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .to-cats { transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s; }
}
