/* ═══════════════════════════════════════════════════════
   RESTAURANT MINIMAL — FRONTEND CSS  (mobile-first)
   ═══════════════════════════════════════════════════════ */
:root {
  --rm-bg:       #ffffff;
  --rm-surface:  #fbfaf8;
  --rm-text:     #111111;
  --rm-muted:    #6b6b6b;
  --rm-line:     #ece9e4;
  --rm-accent:   #1a1a1a;
  --rm-shadow:   0 4px 20px rgba(0,0,0,.07);
  --rm-radius:   14px;
  --rm-pad:      16px;
  --rm-max:      1080px;
  --rm-header-h: 56px;
  --rm-cat-w:    200px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  background: var(--rm-bg);
  color: var(--rm-text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Sticky header ──────────────────────────────────── */
.rm-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--rm-bg);
  border-bottom: 1px solid var(--rm-line);
}
.rm-header__inner {
  max-width: var(--rm-max);
  margin: 0 auto;
  padding: 0 var(--rm-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--rm-header-h);
}

.rm-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rm-brand__logo {
  display: inline-flex;
  width: 38px; height: 38px;
  border-radius: 10px;
  align-items: center; justify-content: center;
  background: var(--rm-surface);
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none; color: inherit;
}
.rm-brand__logo .custom-logo-link { display: block; width: 100%; height: 100%; }
.rm-brand__logo .custom-logo { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm-brand__mark { font-weight: 700; font-size: 16px; }
.rm-brand__name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.rm-lang { display: flex; gap: 6px; flex-shrink: 0; }
.rm-lang__btn {
  appearance: none;
  border: 1px solid var(--rm-line);
  background: transparent;
  border-radius: 999px;
  padding: 0 12px;
  height: 36px;
  min-width: 42px;
  font-size: 13px;
  color: var(--rm-muted);
  cursor: pointer;
}
.rm-lang__btn[aria-pressed="true"] {
  background: var(--rm-surface);
  border-color: rgba(17,17,17,.18);
  color: var(--rm-text);
  font-weight: 600;
}

/* ── Hero ───────────────────────────────────────────── */
.rm-hero__media {
  height: clamp(180px, 35vw, 340px);
  background: #e8e5e0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.rm-hero__overlay {
  width: 100%;
  padding: 24px var(--rm-pad);
  text-align: center;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.50) 100%);
  color: #fff;
}
.rm-hero__title {
  margin: 0;
  font-family: ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 5vw, 40px);
  line-height: 1.1;
}
.rm-hero__subtitle {
  margin: 8px auto 0;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  max-width: 46ch;
}

/* ── Menu section wrapper ───────────────────────────── */
.rm-menu {
  max-width: var(--rm-max);
  margin: 0 auto;
  padding: 20px var(--rm-pad) 60px;
}
.rm-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.rm-menu__title { font-size: 17px; font-weight: 700; }
.rm-menu__hint  { font-size: 12px; color: var(--rm-muted); }

/* ── Two-column layout: sidebar | items ─────────────── */
/* Mobile first: single column stack */
.rm-menu__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Category sidebar ───────────────────────────────── */
/* Mobile: horizontal scroll strip */
.rm-cats {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.rm-cats::-webkit-scrollbar { display: none; }

.rm-cat {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--rm-line);
  background: var(--rm-surface);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--rm-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s;
}
.rm-cat:hover { color: var(--rm-text); }
.rm-cat--active,
.rm-cat[aria-selected="true"] {
  background: var(--rm-accent);
  border-color: var(--rm-accent);
  color: #fff;
  font-weight: 600;
}

/* ── Items grid ─────────────────────────────────────── */
/* Mobile: single column */
.rm-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-content: start;
}

/* Empty state */
.rm-empty {
  color: var(--rm-muted);
  font-size: 14px;
  padding: 32px 0;
  margin: 0;
  text-align: center;
}

/* ── Card: image on top, uniform height ─────────────── */
.rm-card {
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  box-shadow: var(--rm-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* All cards same total height = image height + fixed text block */
}

/* Rectangular image — always present, placeholder if empty */
.rm-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  background: #edeae4;
  overflow: hidden;
}
.rm-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text block — fixed height so all cards align */
.rm-card__main {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rm-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.rm-card__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.rm-card__price {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--rm-text);
  flex-shrink: 0;
}
.rm-card__desc {
  margin: 0;
  font-size: 13px;
  color: var(--rm-muted);
  line-height: 1.5;
  /* clamp long descriptions so all cards stay uniform */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   TABLET → sidebar moves to LEFT (≥ 640px)
   ═══════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .rm-menu__body {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
  }

  /* Left sidebar: vertical stack of tabs */
  .rm-cats {
    flex-direction: column;
    flex-wrap: nowrap;
    flex: 0 0 var(--rm-cat-w);
    width: var(--rm-cat-w);
    overflow-x: visible;
    overflow-y: auto;
    gap: 6px;
    position: sticky;
    top: calc(var(--rm-header-h) + 12px);
    max-height: calc(100vh - var(--rm-header-h) - 40px);
    padding-bottom: 0;
    scrollbar-width: none;
  }
  .rm-cats::-webkit-scrollbar { display: none; }

  .rm-cat {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    flex: none;
  }

  /* Items: 2 columns on tablet */
  .rm-items {
    flex: 1 1 0;
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══════════════════════════════════════════════════════
   DESKTOP (≥ 900px)
   ═══════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  :root { --rm-cat-w: 220px; }

  /* 3 columns on wide screens */
  .rm-items {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* FIXES */

@media (max-width:768px){
  .menu-container{display:flex; flex-direction:row-reverse;}
  .menu-categories{width:30%; position:fixed; right:0; top:0; height:100%; overflow:auto;}
  .menu-items{margin-right:30%;}
}
