@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #1c211e;
  --paper: #f8f6ef;
  --white: #fffdf8;
  --line: #e4dfd3;
  --muted: #5e6055;
  --accent: #efb343;
  --accent-ink: #251b0b;
  --deep-gold: #855513;
  --display: 'Instrument Serif', Georgia, serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --sticky-height: 78px;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--sticky-height) + 20px);
}
html[lang=ar] { --body: 'Noto Sans Arabic', Tahoma, sans-serif; --display: var(--body); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p { margin: 0; }
body { min-width: 285px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
input, textarea { min-width: 0; }
:focus-visible { outline: 3px solid #be7820; outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top { background: var(--ink); color: var(--paper); border-bottom: 1px solid #ffffff24; }
.top-inner { min-height: 74px; padding-block: 8px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; min-width: 0; overflow-wrap: anywhere; text-decoration: none; font-family: var(--display); font-size: 1.75rem; line-height: 1.2; }
.brand-mark { color: var(--accent); font: 1.35rem/1 system-ui, sans-serif; flex: none; }
.brand-logo { width: clamp(42px, 11vw, 64px); height: 44px; object-fit: contain; object-position: center; flex: none; border-radius: 6px; padding: 3px; background: var(--white); }
.languages { border: 1px solid #ffffff47; border-radius: 200px; padding: 3px; display: flex; flex: none; gap: 2px; direction: ltr; }
.languages button { color: #f5f0e9; background: transparent; border: 0; padding: 5px 12px; border-radius: 100px; min-height: 36px; font-size: .9rem; font-weight: 700; transition: background .2s, color .2s; }
.languages button[lang=ar] { font-family: 'Noto Sans Arabic', Tahoma, sans-serif; }
.languages button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); }
.hero { color: var(--paper); background-color: #292e25; position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(320px, 38vw, 465px); overflow: hidden; }
.hero-image, .hero::after { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero-image { width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.hero::after { content: ''; background: linear-gradient(90deg, #141b16fa 0%, #141b16d6 32%, #141b1688 72%, #141b1660); }
[dir=rtl] .hero::after { transform: scaleX(-1); }
.hero-content { padding-block: 36px; animation: rise .65s ease both; }
.eyebrow { color: color-mix(in srgb, var(--accent) 48%, white); font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .19em; margin-bottom: .8rem; overflow-wrap: anywhere; }
[dir=rtl] .eyebrow { letter-spacing: 0; }
.hero h1 { font: 400 clamp(5rem, 11vw, 9rem)/.92 var(--display); letter-spacing: -.045em; overflow-wrap: anywhere; }
[dir=rtl] .hero h1 { font-size: clamp(2.6rem, 8vw, 6.5rem); letter-spacing: 0; font-weight: 700; line-height: 1.3; }
.hero h1::after { content: ''; display: block; width: 3rem; height: 3px; margin-top: 1.1rem; background: var(--accent); }
.sticky { position: sticky; top: 0; z-index: 3; background: var(--paper); border-bottom: 1px solid var(--line); }
.controls { display: flex; align-items: center; gap: 1.5rem; padding-block: 13px; min-height: 77px; }
.controls nav { flex: 1; min-width: 0; display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: thin; padding: 4px; margin-inline-start: -4px; }
.category-tab { flex: none; border: 1px solid var(--line); color: var(--ink); background: transparent; padding: .55rem .95rem; border-radius: 200px; font-weight: 600; font-size: .9rem; min-height: 40px; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.category-tab:hover { border-color: var(--deep-gold); }
.category-tab[aria-pressed=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search { display: flex; position: relative; align-items: center; flex: 0 0 255px; }
.search input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 200px; background: var(--white); padding: .55rem .95rem .55rem 2.4rem; padding-inline: 2.4rem .95rem; color: var(--ink); }
.magnifier { position: absolute; inset-inline-start: 15px; width: 13px; height: 13px; border: 1.7px solid var(--muted); border-radius: 50%; pointer-events: none; }
.magnifier::after { content: ''; width: 6px; height: 1.7px; background: var(--muted); position: absolute; bottom: -3px; right: -4px; transform: rotate(45deg); }
.menu-main { padding-block: 43px 65px; min-height: 270px; }
#menu-status:empty { display: none; }
#menu-status { padding-block: 20px; color: var(--muted); }
.menu-section + .menu-section { margin-top: 52px; }
.section-heading { display: flex; align-items: center; gap: .85rem; margin-bottom: 19px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.section-heading h2 { font: 400 clamp(2.45rem, 5vw, 3.6rem)/1 var(--display); letter-spacing: -.024em; }
[dir=rtl] .section-heading h2 { font-size: clamp(1.45rem, 4vw, 2.45rem); letter-spacing: 0; font-weight: 700; line-height: 1.4; }
.category-image { width: 49px; height: 49px; border-radius: 50%; object-fit: cover; background: #e9dec8; flex: none; }
.dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.dish { display: flex; align-items: center; min-width: 0; min-height: 144px; gap: 16px; padding: 13px; background: var(--white); border: 1px solid var(--line); border-radius: 13px; animation: rise .38s ease both; transition: border-color .2s, box-shadow .2s; }
.dish:hover { border-color: #c7ad7e; box-shadow: 0 8px 22px #5442150b; }
.dish-image { width: 114px; height: 114px; border-radius: 8px; object-fit: cover; background: #eadfc8; flex: none; }
.missing { display: none; }
.dish-content { padding: 4px; flex: 1; min-width: 0; }
.dish-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .35rem .7rem; flex-wrap: wrap; }
.dish-heading h3 { font-size: 1.08rem; font-weight: 700; overflow-wrap: anywhere; }
.price { color: var(--deep-gold); font-size: .9rem; font-weight: 700; white-space: nowrap; }
.dish-description { margin-top: .4rem; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.footer { border-top: 1px solid var(--line); display: flex; align-items: center; gap: .6rem; min-height: 88px; font-size: .93rem; color: var(--muted); }
.footer a { margin-inline-start: auto; text-underline-offset: 4px; }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

.admin-main { padding-block: 38px 75px; max-width: 940px; }
.admin-main h1 { font: 400 clamp(3rem, 7vw, 4.8rem)/1 var(--display); }
.admin-main h2 { font: 400 2.2rem/1.1 var(--display); overflow-wrap: anywhere; }
.admin-main h3 { font-size: 1rem; overflow-wrap: anywhere; }
.admin-main label { display: grid; gap: .35rem; font-weight: 600; }
.admin-main input, .admin-main textarea { border: 1px solid #bfb8a8; padding: .6rem .75rem; background: #fff; color: var(--ink); border-radius: 7px; width: 100%; }
.admin-main textarea { min-height: 90px; resize: vertical; }
.editor-panel { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 4vw, 29px); margin-block: 18px; }
.login { max-width: 480px; margin: 5vh auto 0; display: grid; gap: 1.15rem; }
.editor-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.category-editor > .editor-toolbar { flex-wrap: wrap; }
.category-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; margin-top: 1rem; }
.primary, .secondary, .danger { border: 1px solid transparent; border-radius: 8px; padding: .6rem .9rem; font-weight: 700; }
.primary { background: var(--ink); color: var(--paper); }
.secondary { background: var(--white); color: var(--ink); border-color: #bfb8a8; }
.danger { background: #f9e9e2; color: #8b3227; flex-shrink: 0; }
button:disabled { opacity: .6; cursor: wait; }
.photo-field { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-block: 1rem; }
.editor-photo { width: 67px; height: 67px; border-radius: 7px; object-fit: cover; }
.branding-photos .editor-photo { width: 112px; object-fit: contain; background: var(--paper); }
.admin-main input[type=color] { width: 100%; height: 43px; padding: .25rem; }
.editor-item { border: 1px solid var(--line); padding: 15px; border-radius: 9px; margin-bottom: 13px; background: var(--paper); }
.editor-item .photo-field { margin-bottom: 0; }
.editor-save { position: sticky; bottom: 0; display: flex; align-items: center; gap: 1rem; background: var(--paper); border-top: 1px solid var(--line); padding-block: 12px; margin-top: 25px; }
.editor-save button { flex-shrink: 0; }
.photo-message, #login-message, #save-message { color: var(--muted); }
.photo-message:empty, #login-message:empty, #save-message:empty { display: none; }

@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .top-inner { min-height: 64px; }
  .controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; padding-block: 7px; }
  .search { grid-row: 1; }
  .dish-grid { grid-template-columns: 1fr; gap: 10px; }
  .dish { min-height: 115px; }
  .dish-image { width: 86px; height: 86px; }
  .menu-main { padding-top: 30px; }
  .menu-section + .menu-section { margin-top: 34px; }
}
@media (max-width: 440px) {
  .hero { min-height: 275px; }
  .hero h1 { font-size: clamp(3.8rem, 19vw, 5rem); }
  .fields { grid-template-columns: 1fr; }
  .dish { gap: 8px; padding: 9px; }
  .brand { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
