/* RestoPOS — restoran sayti. 4 ekran sinfi: telefon ≤600, planshet 601–1024, kompyuter 1025–1920, TV ≥1921 / [data-density=tv].
   Tema ranglari inline <style> orqali :root ga tenant temasidan keladi (--primary, --accent, --bg, --ink). */

:root {
  --primary: #D9482B; --accent: #0F6E63; --bg: #FFF6EA; --ink: #1C1512;
  --surface: #FFFFFF; --muted: #6B5D55; --line: #EBD9C6; --tint: #F3E4D3; --ok: #1E7F4F;
  --radius: 16px; --gutter: clamp(14px, 4.5vw, 22px); --maxw: 1280px;
  --fs-body: clamp(15px, 1vw + 10px, 17px); --fs-h1: clamp(34px, 5vw, 68px); --fs-h2: clamp(26px, 3vw, 40px);
  --touch: 44px; --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1A1412; --surface: #241D1A; --ink: #F5EDE4; --muted: #B3A398; --line: #3D322C; --tint: #332924;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #1A1412; --surface: #241D1A; --ink: #F5EDE4; --muted: #B3A398; --line: #3D322C; --tint: #332924; color-scheme: dark; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-body); line-height: 1.5; background: var(--bg); color: var(--ink); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.h1 { font-size: var(--fs-h1); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--touch); padding: 10px 18px; border-radius: 999px; border: 0; background: var(--primary); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--tint); font-size: 0.85em; font-weight: 700; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 601px) { .grid { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); } }

/* ---- header */
.hdr { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hdr .container { display: flex; align-items: center; gap: clamp(8px, 3vw, 16px); min-height: 64px; }
.hdr .container + .container { display: block; min-height: 0; }   /* telefon menyusi o'rami — bo'sh 64px chiziq qolmasin */
.brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; font-size: clamp(1em, 4.2vw, 1.15em); min-width: 0; flex: 1; }
.brand .logo { flex-shrink: 0; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.nav { display: none; gap: 20px; margin-left: auto; font-weight: 600; }
.nav a { text-decoration: none; padding: 8px 0; }
.jobs-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; margin-left: 4px; }
.lang { display: flex; gap: 2px; padding: 3px; background: var(--tint); border-radius: 999px; font-size: 0.8em; font-weight: 700; }
.lang a { padding: 5px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.lang a.on { background: var(--ink); color: var(--bg); }
.burger { margin-left: auto; width: var(--touch); height: var(--touch); border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.mnav { display: none; flex-direction: column; gap: 4px; padding: 8px 0 12px; }
.mnav.open { display: flex; }
.mnav a { padding: 12px; border-radius: 10px; text-decoration: none; font-weight: 600; background: var(--surface); }

/* ---- sections */
.section { padding-block: clamp(28px, 7vw, 40px); }   /* faqat yuqori/past — yon chekka .container'dan (gutter) */
.hero { display: grid; gap: 24px; }
.hero-card { border-radius: 28px; background: var(--primary); color: #fff; padding: 28px; min-height: 240px; position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.hero-card::before { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: clamp(10px, 2.5vw, 14px); text-align: left; }
.stat b { display: block; font-size: clamp(1em, 1.9vw, 1.6em); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat { min-width: 0; } .stat .muted { font-size: .9em; }
.order-bar { display: flex; flex-direction: column; gap: 10px; }
.toggle { display: flex; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.toggle { flex-shrink: 0; }
.toggle button { flex: 1; min-height: var(--touch); padding: 0 14px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; color: var(--muted); white-space: nowrap; }
.toggle button.on { background: var(--ink); color: var(--bg); }
.addr { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: var(--touch); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.addr input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); min-width: 0; }

.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cats::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {   /* telefon: kategoriyalar ekran chetigacha suriladi, oxirida yumshoq soya */
  .cats { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
}
.cats a { flex: 0 0 auto; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 700; white-space: nowrap; min-height: var(--touch); display: inline-flex; align-items: center; }
.cats a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dish { display: flex; flex-direction: column; overflow: hidden; }
.dish .ph { aspect-ratio: 1; background: var(--tint); display: grid; place-items: center; color: var(--muted); font-size: 0.85em; object-fit: cover; }
.dish .ph-empty { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, var(--tint)), var(--tint) 70%); }
.dish .ph-empty span { font-size: 3.2em; font-weight: 800; color: var(--primary); opacity: .55; line-height: 1; }
.dish a.add { display: grid; place-items: center; text-decoration: none; }
.dish .body { display: flex; flex-direction: column; gap: 6px; padding: clamp(10px, 3.5vw, 14px); flex: 1; min-width: 0; }
.dish .name { font-weight: 800; display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.dish .foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; }
.dish .price { font-weight: 800; font-size: clamp(.92em, 3.8vw, 1.1em); white-space: nowrap; min-width: 0; }
.dish .add { flex-shrink: 0; width: clamp(34px, 9vw, 40px); height: clamp(34px, 9vw, 40px); border-radius: 12px; border: 0; background: var(--ink); color: var(--bg); font-size: 22px; font-weight: 700; cursor: pointer; }

.bonus { border-radius: 28px; background: var(--ink); color: var(--bg); padding: 28px; display: grid; gap: 18px; }
.bonus .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.bonus .tile { padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 12%, transparent); }
.bonus .tile b { display: block; font-size: 1.8em; font-weight: 800; color: var(--primary); }

.branch { display: flex; gap: 14px; align-items: center; padding: 14px; }
.branch .n { width: 48px; height: 48px; border-radius: 14px; background: var(--tint); display: grid; place-items: center; font-weight: 800; color: var(--primary); flex-shrink: 0; }
.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 12px; }
.step .num { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.contact { display: grid; gap: 12px; }
.ftr { border-top: 1px solid var(--line); padding-block: 24px; font-size: 0.85em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---- planshet */
@media (min-width: 601px) {
  :root { --gutter: clamp(20px, 3vw, 32px); }
  .dish .ph { aspect-ratio: 4/3; }
  .order-bar { flex-direction: row; flex-wrap: wrap; } .order-bar > * { flex: 1 1 200px; min-width: 0; }
  .section { padding-block: 56px; }
}
/* ---- kompyuter */
@media (min-width: 1025px) {
  :root { --gutter: clamp(32px, 3vw, 48px); }
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
  .brand { flex: 0 1 auto; } .brand > span:last-child { -webkit-line-clamp: 1; white-space: nowrap; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
}
/* ---- keng kompyuter: menyu qatori sig'adigan joyda to'liq, torroq ekranda — burger (qator ikki qavat bo'lmasin) */
@media (min-width: 1280px) { .nav { display: flex; } .burger, .mnav { display: none !important; } }
.nav a { white-space: nowrap; }
.nav { gap: clamp(12px, 1.4vw, 22px); }
/* buyurtma qatori: tanlov (yetkazish / olib ketish) alohida qator, ostida manzil + tugma — hech narsa kesilmaydi */
@media (min-width: 601px) { .order-bar > .toggle { flex: 1 1 100%; } }
/* ---- TV / juda katta ekran: 10-fut UI */
@media (min-width: 1921px) { :root { --maxw: 1800px; --fs-body: 22px; --touch: 64px; --gutter: 64px; } }
[data-density="tv"] { --fs-body: 26px; --fs-h1: 72px; --fs-h2: 52px; --touch: 72px; --gutter: 56px; --radius: 24px; }

/* ---- TV menyu-bord */
.board { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: #141416; color: #F2F1EC; }
.board { overflow-x: hidden; grid-template-columns: minmax(0, 1fr); } .board > * { min-width: 0; }
.board-hdr { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 56px; border-bottom: 1px solid #2E2E34; }
.board-hdr > div:first-child, #clock { flex-shrink: 0; white-space: nowrap; }
.board-cats { display: flex; gap: 12px; flex: 1; min-width: 0; justify-content: center; flex-wrap: wrap; }
.board-cats span { padding: 10px 20px; border-radius: 999px; background: #2E2E34; font-weight: 700; white-space: nowrap; }
.board-cats span.on { background: #F2F1EC; color: #141416; }
.board-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 32px 56px; align-content: start; }
.board-item { display: flex; justify-content: space-between; gap: 16px; padding: 22px 26px; border-radius: 20px; background: #1E1E22; border: 1px solid #2E2E34; }
.board-item .nm { font-weight: 800; font-size: 1.15em; }
.board-item .ds { color: #A19F96; font-size: 0.8em; }
.board-item .pr { font-weight: 800; font-size: 1.3em; white-space: nowrap; }
.board-page { display: none; }
.board-page.on { display: contents; }
@media (max-width: 1400px) { .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px 32px; } .board-hdr { padding: 20px 32px; } }
.board-item > div:first-child { min-width: 0; }
@media (max-width: 1000px) { [data-density="tv"] { --fs-body: 16px; --fs-h1: 32px; --fs-h2: 24px; --touch: 44px; --gutter: 16px; --radius: 16px; } .board { font-size: 16px; } .board-hdr span { font-size: 1em !important; } .board-hdr span[style*="56px"] { width: 40px !important; height: 40px !important; }
  .board-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .board-cats span { padding: 6px 14px; }
  .board-grid { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 12px; } .board-hdr { flex-wrap: wrap; padding: 14px 16px; gap: 12px; } .board-cats { order: 3; flex-basis: 100%; justify-content: flex-start; } .board-item { padding: 16px 18px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
