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

:root {
  --navy: #0d1b2a;
  --navy-soft: #16283c;
  --gold: #c9a84c;
  --gold-soft: #e2cd8f;
  --cream: #f8f4ef;
  --surface: #ffffff;
  --text: #1a1a2e;
  --muted: #7b8391;
  --line: #ece7dd;
  --error: #b3452f;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-h: 0px;
  --cats-h: 0px;
  --radius: 10px;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--cream);
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
}

/* ── Header ── */
.m-header {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--cream);
  padding: 28px 20px 20px;
  position: relative;
  overflow: hidden;
}

.m-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: 0.7;
}

.m-header-top {
  text-align: center;
  max-width: 480px;
  margin: 0 auto 18px;
}

.m-crest {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
  font-size: 15px;
}

.m-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.m-tagline {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0.9;
}

.m-search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.m-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(248, 244, 239, 0.45);
  font-size: 13px;
}

.m-search {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid rgba(248, 244, 239, 0.16);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--cream);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.m-search::placeholder {
  color: rgba(248, 244, 239, 0.4);
}

.m-search:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
}

/* ── Category nav ── */
.m-cats {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(13, 27, 42, 0.04);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.m-cats::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

.cat-tab i {
  font-size: 11px;
  opacity: 0.85;
}

.cat-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

.cat-tab.active i {
  color: var(--gold-soft);
}

/* ── Main content ── */
.m-main {
  max-width: 560px;
  margin-inline: auto;
  padding: 4px 18px 8px;
}

.m-loading,
.m-empty,
.m-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 64px 16px;
  color: var(--muted);
  font-size: 14px;
}

.m-loading i {
  font-size: 20px;
  color: var(--gold);
}

.m-error {
  color: var(--error);
}

/* ── Section ── */
.section {
  padding: 30px 0 6px;
  scroll-margin-top: 64px;
}

.section:first-child {
  padding-top: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.section-title i {
  font-size: 14px;
  color: var(--gold);
  width: 20px;
  text-align: center;
}

.section-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--line) 40%);
  margin-bottom: 14px;
}

/* ── Menu row ── */
.row {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: none;
}

.row.unavailable {
  opacity: 0.4;
}

.row-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.row-name {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  flex-shrink: 0;
  max-width: 68%;
}

.row-dots {
  flex: 1;
  border-bottom: 1px dotted #d8cfba;
  min-width: 12px;
  margin-bottom: 4px;
}

.row-price {
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  flex-shrink: 0;
}

.row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.row-desc {
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
}

.row-old {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.row-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(201, 168, 76, 0.16);
  padding: 2px 8px;
  border-radius: 999px;
}

.row-tag i {
  font-size: 9px;
  color: var(--gold);
}

.row-tag-recommended {
  background: rgba(13, 27, 42, 0.08);
  color: var(--navy);
}

.row-tag-recommended i {
  color: var(--navy);
}

.row-tag-discount {
  background: rgba(201, 168, 76, 0.2);
  color: var(--navy);
}

.row-tag-discount i {
  color: var(--gold);
}

.row.unavailable .row-name::after {
  content: ' \00b7 tükendi';
  font-size: 11px;
  font-weight: 400;
  color: var(--error);
}

/* ── Scroll to top ── */
.m-top {
  position: fixed;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: var(--gold-soft);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(13, 27, 42, 0.28);
  z-index: 90;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.m-top:active {
  transform: scale(0.94);
}

/* ── Footer ── */
.m-foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: var(--navy);
  color: rgba(248, 244, 239, 0.75);
  font-size: 12px;
  z-index: 95;
}

.m-foot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-foot-info {
  display: flex;
  align-items: center;
  gap: 7px;
}

.m-foot-info i {
  color: var(--gold-soft);
  font-size: 12px;
}

.m-foot-call {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  background: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.m-foot-map {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(248, 244, 239, 0.18);
  text-decoration: none;
  font-weight: 500;
  font-size: 12.5px;
  padding: 9px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}

.m-foot-map:active {
  background: rgba(255, 255, 255, 0.14);
}

.m-foot-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(248, 244, 239, 0.18);
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.15s, border-color 0.15s;
}

.m-foot-social:active {
  background: rgba(255, 255, 255, 0.14);
}

.m-foot-call:active {
  background: var(--gold-soft);
}

@media (min-width: 560px) {
  body {
    background: #eef0ee;
  }

  .m-main {
    background: var(--surface);
    min-height: 60vh;
    box-shadow: 0 0 0 1px var(--line);
  }
}

/* Header bar + language switcher */
.m-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.m-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(248, 244, 239, 0.18);
  text-decoration: none;
}

.m-header .lang-switcher__select {
  appearance: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 28px 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(248, 244, 239, 0.22);
  background: rgba(255, 255, 255, 0.08)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23f8f4ef' d='M1 1l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  color: var(--cream);
  color-scheme: dark;
}

.m-header .lang-switcher__select option {
  color: var(--color-text, #1a1a2e);
  background-color: var(--color-surface, #ffffff);
}

/* RTL menu page */
body.is-rtl .row-head {
  flex-direction: row-reverse;
}

body.is-rtl .row-meta {
  text-align: right;
}

body.is-rtl .m-foot-actions {
  flex-direction: row-reverse;
}

body.is-rtl .m-search-wrap {
  direction: rtl;
}

body.is-rtl .m-search {
  text-align: right;
}
