/* =====================================================================
   THE COFFEE CLUB — QR MENÜ
   Düzen: otelin (Hilton) QR menüsüyle aynı çizgi — logo + arama, kare
   bölüm kutuları, açılır alt başlıklar, 2 sütun ürün kartları, ortalanmış
   ürün penceresi, sabit alt çubuk. Renk/font: Coffee Club marka rehberi.
   ===================================================================== */

@font-face { font-family: 'Drystick'; src: url('../fonts/Drystick-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Drystick'; src: url('../fonts/Drystick-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Drystick'; src: url('../fonts/Drystick-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --bg: #FFFDF8;        /* paper */
  --bar: #F3EADC;       /* milk — çip, arama, açılır satır zemini */
  --bar-hover: #ECE0CC;
  --ink: #2B1D12;       /* espresso */
  --body: #5a4630;      /* mocha */
  --muted: #7a6650;
  --price: #8a6a2c;     /* gold ailesi, beyaz zeminde 4.5:1 */
  --gold: #C9A85A;
  --line: rgba(111, 94, 46, .16);
  --espresso: #2B1D12;
  --milk: #F3EADC;
  --scrim: rgba(27, 18, 12, .5);
  --shadow: 0 -10px 40px rgba(27, 18, 12, .16);

  --gutter: 16px;
  --measure: 720px;
  --dock-h: 64px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: only light;  /* koyu tema yok; tarayıcının otomatik koyulaştırması da kapalı */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Drystick', system-ui, sans-serif; font-size: 16px; line-height: 1.45;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--dock-h) + var(--safe-b));
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--price); outline-offset: 2px; }
.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 10px 16px; background: var(--espresso); color: var(--milk); border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- ana ekran üst kısım ---------- */
.top { padding-top: var(--safe-t); }
.top__row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.top__logo img { height: 38px; width: auto; }
.search { position: relative; display: block; margin-bottom: 14px; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 44px 0 46px; border: 0; border-radius: 999px;
  background: var(--bar); font-size: 16px; outline: none;
}
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { box-shadow: 0 0 0 2px var(--price); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__clear { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); }
.search__clear .i { position: static; transform: none; width: 18px; height: 18px; }
.rule { border: 0; border-top: 1px solid var(--line); }
.note { margin: 12px 0 0; font-size: 13px; color: var(--price); }

/* ---------- bölüm kutuları ---------- */
.tiles { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px 0 8px; }
/* geniş ekranda tek sıra; 4'ten fazla bölüm olursa alt satıra geçer */
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.tile { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; isolation: isolate; background: var(--tbg, var(--espresso)); color: #FFFDF8; }
.tile:active { transform: scale(.98); transition: transform .12s; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 13, 8, 0) 48%, rgba(20, 13, 8, .72) 100%); }
.tile__bean { position: absolute; z-index: -2; width: 92%; aspect-ratio: 1; right: -26%; top: -22%; fill: var(--tbean, #6F5E2E); transform: rotate(var(--r, 0deg)); }
.tile__label { position: absolute; left: 8px; right: 8px; bottom: 14px; text-align: center; font-weight: 600; font-size: 16px; line-height: 1.2; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.tile--v1 { --tbg: #2B1D12; --tbean: #6F5E2E; }
.tile--v2 { --tbg: #43301E; --tbean: #9c8158; }
.tile--v3 { --tbg: #5a4630; --tbean: #C9A85A; }
.tile--v4 { --tbg: #3a2a1c; --tbean: #8a7440; }

/* ---------- alt sayfa başlığı ---------- */
.head { position: sticky; top: 0; z-index: 10; background: var(--bg); padding-top: var(--safe-t); border-bottom: 1px solid var(--line); }
.head__row { display: flex; align-items: center; gap: 4px; height: 56px; }
.head__back { width: 44px; height: 44px; margin-left: -10px; display: grid; place-items: center; color: var(--ink); }
.head__title { font-weight: 600; font-size: 17px; line-height: 1.2; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 12px; margin: 0 calc(var(--gutter) * -1); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 8px; background: var(--bar); font-weight: 500; font-size: 15px; white-space: nowrap; }
.chip[aria-current="page"] { background: var(--espresso); color: var(--milk); }

.page { padding-top: 16px; }
.status { margin-bottom: 12px; font-size: 14px; color: var(--muted); }

/* açılır alt başlıklar */
.acc { margin-bottom: 12px; }
.acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 14px 0 16px;
  border-radius: 8px; background: var(--bar); font-weight: 500; font-size: 16px; cursor: pointer; list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:active { background: var(--bar-hover); }
.acc__count { margin-left: 6px; font-weight: 400; font-size: 14px; color: var(--muted); }
.acc__sign { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; flex: none; }
.acc__sign .i { width: 16px; height: 16px; stroke-width: 2; }
.acc__sign .i--minus { display: none; }
.acc[open] .acc__sign .i--plus { display: none; }
.acc[open] .acc__sign .i--minus { display: block; }
.acc[open] .grid { animation: open .25s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }

/* ürün kartları */
.grid { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; padding: 14px 0 6px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { display: block; }
.card:active .card__img { opacity: .85; }
.card__img { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--espresso); }
.card__img > img { width: 100%; height: 100%; object-fit: cover; }
.card__name { margin-top: 8px; font-weight: 500; font-size: 15px; line-height: 1.3; }
.card__price { margin-top: 3px; font-weight: 600; font-size: 15px; color: var(--price); font-variant-numeric: tabular-nums; }
.card__price small { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 4px; }
.card--out { opacity: .55; }

/* görsel yoksa: marka görseli (bardaktaki çekirdek + logo) */
.ph { position: absolute; inset: 0; display: grid; place-items: center; background: var(--espresso); overflow: hidden; }
.ph svg { position: absolute; width: 78%; aspect-ratio: 1; right: -18%; bottom: -36%; fill: #6F5E2E; transform: rotate(var(--r, 24deg)); }
.ph img { position: relative; width: 64%; max-width: 190px; height: auto; opacity: .94; }

.legal { padding: 22px 0 28px; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* arama sonuçları */
.results__title { padding-top: 16px; font-size: 14px; color: var(--muted); }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* ---------- bilgi sayfaları ---------- */
.list { list-style: none; }
.list li + li { border-top: 1px solid var(--line); }
.opt { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 60px; font-size: 16px; text-align: left; }
.opt__check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); }
.opt[aria-current="true"] .opt__check { border: 6px solid var(--price); }
.info { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; }
.info .i { color: var(--price); margin-top: 1px; }
.info__label { font-size: 13px; color: var(--muted); }
.info__text { font-size: 16px; line-height: 1.5; }
.info__text a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.hours td + td { text-align: right; font-variant-numeric: tabular-nums; }
.hours small { display: block; font-size: 13px; color: var(--muted); }
.hours .open { color: var(--price); }

/* ---------- alt çubuk ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--dock-h) + var(--safe-b)); padding: 0 max(0px, calc((100% - var(--measure)) / 2)) var(--safe-b);
  background: var(--bg); border-top: 1px solid var(--line);
}
.dock__item { display: grid; place-items: center; color: var(--ink); }
.dock__item .i { width: 27px; height: 27px; stroke-width: 1.4; }
.dock__item[aria-current="page"] { color: var(--price); }
.dock__item[aria-current="page"] .i { stroke-width: 1.8; }

/* ---------- ürün penceresi ---------- */
.sheet {
  margin: auto auto 0; width: 100%; max-width: 560px; max-height: calc(100dvh - 48px);
  border: 0; padding: 0; background: transparent; color: var(--ink); overflow: visible;
}
.sheet[open] { display: flex; flex-direction: column; animation: up .3s var(--ease); }
.sheet.is-closing { animation: down .2s ease-in forwards; }
.sheet::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet[open]::backdrop { animation: fade .25s ease-out; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet__scroll {
  overflow-y: auto; overscroll-behavior: contain; outline: none;
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow);
  padding: 40px 20px calc(24px + var(--safe-b));
}
.sheet__close {
  position: absolute; z-index: 2; left: 50%; top: -22px; margin-left: -22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: var(--espresso); box-shadow: 0 4px 14px rgba(27, 18, 12, .22);
}
.sheet__close .i { width: 20px; height: 20px; stroke-width: 2; }
@media (min-width: 700px) {
  .sheet { margin: auto; }
  .sheet__scroll { border-radius: 22px; }
  .sheet[open] { animation: pop .26s var(--ease); }
  .sheet.is-closing { animation: fadeout .18s forwards; }
  @keyframes pop { from { opacity: 0; transform: translateY(16px); } }
  @keyframes fadeout { to { opacity: 0; } }
}
.detail__name { text-align: center; font-weight: 600; font-size: 21px; line-height: 1.25; }
.detail__price { margin-top: 6px; text-align: center; font-weight: 600; font-size: 19px; color: var(--price); font-variant-numeric: tabular-nums; }
.detail__price small { font-weight: 400; font-size: 14px; color: var(--muted); margin-left: 4px; }
.detail__img { position: relative; margin-top: 18px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--espresso); }
.detail__img > img { width: 100%; height: 100%; object-fit: cover; }
.detail__img .ph img { width: 52%; max-width: 260px; }
.detail__desc { margin-top: 18px; font-size: 16px; line-height: 1.65; color: var(--body); }
.block { margin-top: 22px; }
.block h3 { margin-bottom: 4px; font-weight: 600; font-size: 15px; }
.prices { width: 100%; border-collapse: collapse; }
.prices td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; color: var(--body); }
.prices td + td { text-align: right; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.block p { font-size: 15.5px; line-height: 1.6; color: var(--body); }
.block .fine { margin-top: 6px; font-size: 13.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
