:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --ink: #15181e;
  --ink-soft: #4a5260;
  --ink-mute: #7a8291;
  --line: #e3e8f0;
  --blue: #2a6fdb;
  --blue-deep: #1b4fa8;
  --blue-soft: #e4eefc;
  --gold: #f2b01e;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 8px 24px rgba(20, 30, 50, .07);
  --shadow-hover: 0 2px 4px rgba(20, 30, 50, .07), 0 16px 36px rgba(20, 30, 50, .12);
  --gutter: 16px;
  --max: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Inter", "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 246, 251, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none; flex-shrink: 0;
}
.brand-icon {
  width: 30px; height: 36px; fill: none; stroke: var(--ink);
  stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round;
}
.brand-icon .flame { fill: #f6c453; stroke: #d48a12; stroke-width: 1.2; }
.brand-icon .thin { stroke-width: 1; opacity: .5; }
.brand-name {
  font-family: "Marcellus", Georgia, serif;
  font-size: 27px; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
}

.tabs { margin-left: auto; min-width: 0; }
.tabs-scroll { display: flex; gap: 6px; }
.tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 14px; border-radius: 10px;
  font-size: 15px; font-weight: 500; color: var(--ink-soft);
  white-space: nowrap; transition: background .2s, color .2s;
}
.tab:hover { color: var(--ink); background: rgba(42, 111, 219, .06); }
.tab[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue-deep); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  background: #e9edf4; border: 1px solid var(--line); border-radius: 10px;
}
.lang-btn {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 9px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--ink-mute); line-height: 1.2;
  transition: background .2s, color .2s;
}
.lang-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 30, 50, .12); }
.lang-btn:hover { color: var(--ink); }

.qr-button {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  border: 1px solid var(--line); background: #e9edf4; cursor: pointer;
  padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 500;
  transition: background .2s, border-color .2s;
}
.qr-button:hover { background: #dfe5ee; border-color: #d3dae5; }
.qr-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.qr-button svg .fill { fill: currentColor; }

.accent-line {
  height: 3px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue) 40%, #6aa0ee);
}

/* Menu grid */
.menu { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 140px; }
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px 6px 16px;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: card-in .45s ease both;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card-media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 13px; background: linear-gradient(135deg, #e8ecf3, #d9e0ea);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease, opacity .4s ease; opacity: 0;
}
.card-media img.loaded { opacity: 1; }
.card:hover .card-media img { transform: scale(1.04); }
.card-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.card-body { padding: 14px 10px 0; display: flex; flex-direction: column; gap: 6px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.card-price { font-size: 17px; font-weight: 700; white-space: nowrap; color: var(--ink); }
.card-desc {
  margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.menu-note { text-align: center; color: var(--ink-mute); font-size: 13px; margin: 32px 0 0; }

/* QR modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--gutter); }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 20, 30, .45); animation: fade .2s ease; }
.modal-card {
  position: relative; width: min(360px, 100%);
  background: var(--surface); border-radius: 22px; padding: 28px 24px 22px;
  text-align: center; box-shadow: 0 24px 60px rgba(10, 20, 40, .25);
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
.modal-card:focus { outline: none; }
.modal-card h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.modal-sub { margin: 6px 0 18px; color: var(--ink-soft); font-size: 14px; }
.qr-box {
  width: 228px; height: 228px; margin: 0 auto; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
}
.qr-box canvas, .qr-box img { width: 100% !important; height: 100% !important; }
.qr-url { margin: 14px 0 12px; font-size: 13px; color: var(--ink-mute); word-break: break-all; }
.copy-button {
  border: 0; cursor: pointer; background: var(--blue); color: #fff;
  font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 10px;
  transition: background .2s;
}
.copy-button:hover { background: var(--blue-deep); }

.icon-close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: #eef1f6; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink-soft);
  display: grid; place-items: center; transition: background .2s, color .2s;
}
.icon-close:hover { background: #e2e7ef; color: var(--ink); }
.icon-close.small { width: 28px; height: 28px; font-size: 19px; top: 50%; right: 10px; transform: translateY(-50%); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }

/* Rating card */
.rate-card {
  position: fixed; z-index: 40; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  width: max-content; max-width: calc(100% - 2 * var(--gutter));
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: 999px;
  padding: 10px 50px 10px 24px;
  box-shadow: 0 12px 40px rgba(10, 20, 40, .2), 0 0 0 1px rgba(10, 20, 40, .04);
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.1), opacity .3s;
  opacity: 0;
}
.rate-card[hidden] { display: none; }
.rate-card.show { transform: translate(-50%, 0); opacity: 1; }
.rate-top { display: flex; align-items: center; gap: 14px; }
.rate-text { margin: 0; font-size: 16px; font-weight: 500; white-space: nowrap; }
.rate-stars { display: flex; gap: 2px; color: var(--gold); font-size: 22px; line-height: 1; }
.rate-stars span { animation: star .5s ease both; }
.rate-card.show .rate-stars span:nth-child(1) { animation-delay: .25s; }
.rate-card.show .rate-stars span:nth-child(2) { animation-delay: .32s; }
.rate-card.show .rate-stars span:nth-child(3) { animation-delay: .39s; }
.rate-card.show .rate-stars span:nth-child(4) { animation-delay: .46s; }
.rate-card.show .rate-stars span:nth-child(5) { animation-delay: .53s; }
@keyframes star { from { opacity: 0; transform: scale(.4) rotate(-20deg); } }
.rate-button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-soft); color: var(--ink); text-decoration: none;
  font-size: 14px; font-weight: 600; padding: 10px 16px; border-radius: 999px;
  white-space: nowrap; transition: background .2s;
}
.rate-button:hover { background: #d4e3fa; }
.rate-button .pin { width: 16px; height: 21px; }

/* Responsive */
@media (max-width: 1060px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; row-gap: 8px; padding-top: 12px; padding-bottom: 8px; }
  .header-actions { margin-left: auto; }
  .tabs {
    order: 3; position: relative;
    margin: 0 calc(-1 * var(--gutter)); width: calc(100% + 2 * var(--gutter));
  }
  .tabs::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 44px;
    background: linear-gradient(90deg, rgba(243, 246, 251, 0), rgba(243, 246, 251, .95));
    pointer-events: none; opacity: 0; transition: opacity .2s;
  }
  .tabs.has-more::after { opacity: 1; }
  .tabs-scroll {
    overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 2px;
    -webkit-overflow-scrolling: touch;
  }
  .tabs-scroll::-webkit-scrollbar { display: none; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .menu { padding-top: 16px; }
  .brand { gap: 9px; }
  .brand-name { font-size: 19px; letter-spacing: .03em; }
  .brand-icon { width: 22px; height: 28px; }
  .qr-button { padding: 0; width: 38px; height: 36px; justify-content: center; }
  .qr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lang-btn { padding: 5px 8px; font-size: 12.5px; }
  .tab { padding: 7px 12px; font-size: 14.5px; }
  .card { padding: 4px 4px 12px; border-radius: 15px; }
  .card-media { border-radius: 11px; }
  .card-body { padding: 10px 6px 0; gap: 4px; }
  .card-head { flex-direction: column; gap: 2px; }
  .card-title, .card-price { font-size: 15px; }
  .card-desc { font-size: 13px; }
  .card-tag { font-size: 11px; top: 7px; left: 7px; padding: 3px 7px; }

  .rate-card {
    flex-direction: column; align-items: stretch; border-radius: 18px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100% - 2 * var(--gutter)); padding: 12px 12px 12px 16px; gap: 10px;
  }
  .rate-top { flex-direction: column; align-items: flex-start; gap: 3px; padding-right: 34px; }
  .rate-text { font-size: 14.5px; white-space: normal; line-height: 1.3; }
  .rate-stars { font-size: 16px; }
  .rate-button { justify-content: center; padding: 9px 14px; font-size: 13.5px; }
  .icon-close.small { top: 10px; right: 10px; transform: none; }
}
@media (max-width: 380px) {
  .brand-name { font-size: 17px; }
  .brand-icon { display: none; }
}

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