/* ==========================================================================
   Ryze Coffee — menu surface
   A faithful rebuild of the FineDine layout: olive app bar, cream page,
   wine-red text, horizontal category rail with image chips, 2-up card grid.
   Mobile-first; all values measured from the original.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--wine);
  font-family: var(--font);
  font-size: var(--t-item);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--olive);
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: var(--s-3); top: calc(var(--safe-t) + var(--s-3));
  transform: translateY(-250%);
  background: var(--olive); color: #FFF;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
  z-index: 100; text-decoration: none; font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Olive app bar (as the original) ----------------------------- */

.appbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--olive);
  color: #FFF;
  padding-top: var(--safe-t);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2);
  padding-left: var(--s-2); padding-right: var(--s-2);
  min-height: 48px;
}
.appbar__title {
  font-size: 16px; font-weight: 700; color: #FFF;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: var(--s-2);
}
.appbar__side { display: flex; align-items: center; gap: var(--s-1); flex-shrink: 0; }

.lang {
  display: flex; background: rgba(255,255,255,.16);
  border-radius: var(--r-full); padding: 3px;
}
.lang button {
  border: 0; background: transparent; cursor: pointer;
  /* 44px both ways — Apple HIG minimum for a thumb target. */
  min-height: 44px; min-width: 44px; padding: 0 var(--s-2);
  border-radius: var(--r-full);
  font-size: var(--t-meta); font-weight: 700; letter-spacing: .03em;
  color: rgba(255,255,255,.78);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.lang button[aria-pressed="true"] { background: #FFF; color: var(--olive); }

/* ---------- Menu head --------------------------------------------------- */

.masthead {
  background: var(--cream);
  text-align: center;
  padding: var(--s-5) var(--s-4) var(--s-4);
}
.brand {
  margin: 0;
  font-size: var(--t-title);
  font-weight: 700;
  line-height: 1.4;
  color: var(--wine);
}
.brand-sub {
  margin: var(--s-1) 0 0;
  font-size: var(--t-tagline);
  font-weight: 400;
  color: var(--wine);
}
.note {
  margin: var(--s-2) auto 0;
  max-width: 46ch;
  font-size: var(--t-note);
  color: var(--wine-soft);
  line-height: 1.45;
  text-wrap: pretty;
}

/* ---------- Search + rail ----------------------------------------------- */

.controls { padding: 0 var(--s-4) var(--s-3); background: var(--cream); }

.search { position: relative; display: flex; align-items: center; }
.search .icon-search {
  position: absolute; left: var(--s-3);
  width: 17px; height: 17px; color: var(--olive); pointer-events: none;
}
.search input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;                 /* 16px minimum, or iOS zooms on focus */
  color: var(--wine);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 12px 42px;
  min-height: 46px;
  transition: border-color var(--fast) var(--ease);
}
.search input::placeholder { color: #B09A82; }
.search input:focus { border-color: var(--olive); }
.search__clear {
  position: absolute; right: 6px;
  width: 34px; height: 34px;
  display: none; place-items: center;
  border: 0; background: transparent; cursor: pointer;
  color: var(--wine-soft); border-radius: var(--r-full);
}
.search__clear.is-on { display: grid; }
.search__clear svg { width: 15px; height: 15px; }

/* Category rail — image chip above the label, exactly as the original. */
.rail { background: var(--cream); position: sticky; top: 48px; z-index: 20; }
.rail__scroll {
  display: flex; gap: var(--s-3);
  overflow-x: auto; overflow-y: hidden;
  padding: var(--s-2) var(--s-4) var(--s-4);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail__scroll::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  border: 0; padding: 0; background: transparent;
  cursor: pointer;
  width: 104px;
  display: flex; flex-direction: column; gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.chip__shot {
  width: 104px; height: 78px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--cream-3);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.chip__shot img { width: 100%; height: 100%; object-fit: cover; }
.chip__shot::after {
  content: ''; position: absolute; inset: 0;
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow var(--fast) var(--ease);
}
.chip[aria-current="true"] .chip__shot::after { box-shadow: inset 0 0 0 2px var(--olive); }
.chip__label {
  font-size: var(--t-chip);
  font-weight: 700;
  line-height: 1.25;
  color: var(--wine);
  text-align: center;
  /* full label over two lines rather than the original's truncation */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chip[aria-current="true"] .chip__label { color: var(--olive); }

/* ---------- Sections ---------------------------------------------------- */

main { background: var(--cream-2); padding-bottom: calc(var(--safe-b) + var(--s-8)); }

.section { padding-top: var(--s-5); scroll-margin-top: 132px; }

.section__banner {
  margin: 0 var(--s-4) var(--s-4);
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 3 / 1;
  background: var(--cream-3);
  box-shadow: var(--shadow-soft);
}
.section__banner img { width: 100%; height: 100%; object-fit: cover; }

.section__head { padding: 0 var(--s-4) var(--s-4); text-align: center; }
.section__title {
  margin: 0;
  font-size: var(--t-section);
  font-weight: 700;
  line-height: 1.3;
  color: var(--olive);
  text-wrap: balance;
}
.section__desc {
  margin: var(--s-1) 0 0;
  font-size: var(--t-desc);
  color: var(--wine);
  text-wrap: pretty;
}

/* ---------- Item grid --------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  padding: 0 var(--s-4);
}
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  display: flex; flex-direction: column;
  border: 0; padding: 0;
  background: var(--cream);
  border-radius: var(--r-md);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: translateY(4px); }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(4px); }
}

.card__shot {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--cream-3);
  overflow: hidden;
}
.card__shot img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity var(--slow) var(--ease);
}
.card__shot img.is-loaded { opacity: 1; }

.card__body { padding: var(--s-3); }
.card__name {
  margin: 0;
  font-size: var(--t-item);
  font-weight: 700;
  line-height: 1.5;
  color: var(--wine);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta { display: flex; align-items: baseline; gap: var(--s-2); margin-top: var(--s-1); flex-wrap: wrap; }
.card__price {
  font-size: var(--t-price);
  font-weight: 600;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
}
.card__kcal { font-size: var(--t-meta); color: var(--wine-soft); font-variant-numeric: tabular-nums; }

/* ---------- Badges (YENİ / ÖZEL SUNUM …) -------------------------------- */

.badges {
  position: absolute; top: 4px; left: 4px;
  display: flex; flex-wrap: wrap; gap: 4px;
  max-width: calc(100% - 8px);
  z-index: 2;
}
/* 24x24 icon rosettes, exactly as the original — the artwork carries the
   colour, so no pill background here. */
.badge { display: inline-flex; width: 24px; height: 24px; }
.badge svg { width: 24px; height: 24px; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.22)); }

/* ---------- Empty state ------------------------------------------------- */

.empty { padding: var(--s-8) var(--s-5); text-align: center; color: var(--wine-soft); background: var(--cream-2); }
.empty h2 { font-size: var(--t-section); color: var(--olive); margin: 0 0 var(--s-2); }
.empty button {
  margin-top: var(--s-4);
  border: 1px solid var(--line);
  background: var(--cream); color: var(--wine);
  border-radius: var(--r-full);
  padding: 0 var(--s-5); min-height: 44px;
  font-weight: 700; cursor: pointer;
}

/* ---------- Footer ------------------------------------------------------ */

.footer {
  background: var(--cream);
  padding: var(--s-6) var(--s-5) calc(var(--safe-b) + var(--s-6));
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer p { margin: 0; font-size: var(--t-meta); color: var(--wine-soft); text-wrap: pretty; }
.footer__addr { margin-bottom: var(--s-1) !important; }
