/* Malaga QR — premium guest surface
   dark + brand accent, mobile-first, fast, no framework */

:root {
    --bg: #0C0A08;
    --surf: #161310;
    --card: #1E1A16;
    --card-2: #251F19;
    --bdr: #2E2820;
    --bdr-2: #3A3329;
    --gold: #C9A84C;
    --gold-l: #E8C96A;
    --gold-d: #8C7434;
    --cream: #F5EFE6;
    --mute: #8A7E6E;
    --mute-2: #6B6155;
    --grn: #27AE60;
    --red: #C0392B;
    --blu: #4A90E2;
    --shadow: 0 30px 80px -20px rgba(0,0,0,.65);
    --shadow-sm: 0 8px 24px -8px rgba(0,0,0,.5);
    --r: 14px;
    --r-lg: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    background: var(--bg);
    color: var(--cream);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.serif { font-family: 'Cormorant Garamond', 'Times New Roman', serif; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Layout */
.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 110px;
}

/* Header */
.hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 14px;
    gap: 12px;
    flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand .bn { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.brand .bs { font-size: 11px; color: var(--mute); letter-spacing: .18em; text-transform: uppercase; }
.table-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--card); border: 1px solid var(--bdr);
    padding: 8px 14px; border-radius: 999px; font-size: 12px;
}
.table-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grn); box-shadow: 0 0 8px var(--grn); }

/* Language */
.lang { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 0 24px 14px; }
.lang a {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--card); border: 1px solid var(--bdr);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; text-decoration: none; transition: all .2s;
}
.lang a:hover { border-color: var(--gold); transform: translateY(-1px); }
.lang a.active { border-color: var(--gold); background: rgba(201,168,76,.15); box-shadow: 0 0 0 3px rgba(201,168,76,.08); }

/* Hero — full-bleed, owns the page */
.hero {
    position: relative;
    margin: 0 24px;
    border-radius: var(--r-lg);
    overflow: hidden;
    height: 280px;
    background: linear-gradient(180deg, transparent 30%, rgba(12,10,8,.85) 100%), #222;
    box-shadow: var(--shadow-sm);
}
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-content {
    position: absolute; inset: 0; padding: 22px;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-eyebrow {
    font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
    color: var(--gold-l); margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.hero-eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--gold-l); }
.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 38px; line-height: 1.05; font-weight: 500;
    margin-bottom: 4px;
}
.hero-sub { font-size: 13px; color: rgba(245,239,230,.78); }

/* Chef strip */
.chef-strip {
    margin: 18px 24px 0;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--bdr);
    border-radius: var(--r);
    display: flex; gap: 12px; align-items: center;
}
.chef-strip img {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    border: 1px solid var(--bdr-2);
}
.chef-strip .name { font-size: 13px; font-weight: 500; }
.chef-strip .quote { font-size: 12px; color: var(--mute); line-height: 1.45; font-style: italic; }

/* Section heading */
.sec {
    margin: 32px 24px 12px;
    display: flex; align-items: baseline; justify-content: space-between;
}
.sec h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px; font-weight: 500; letter-spacing: -.01em;
}
.sec .sec-link { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); text-decoration: none; }

/* Category pills */
.pills {
    display: flex; gap: 8px; overflow-x: auto; padding: 4px 24px 14px;
    scrollbar-width: none; -ms-overflow-style: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
    padding: 9px 16px; border-radius: 999px; background: var(--card);
    border: 1px solid var(--bdr); font-size: 12.5px; cursor: pointer;
    transition: all .2s; white-space: nowrap; color: var(--cream);
    text-decoration: none;
}
.pill:hover { border-color: var(--gold-d); }
.pill.active { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 500; }

/* Menu items */
.menu { padding: 0 24px; }
.cat-group { margin-bottom: 28px; }
.cat-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px; color: var(--gold-l);
    padding-bottom: 8px; border-bottom: 1px solid var(--bdr);
    margin-bottom: 14px;
}
.item {
    display: flex; gap: 14px; padding: 14px 0;
    border-bottom: 1px solid var(--bdr-2);
    align-items: flex-start;
}
.item:last-child { border-bottom: none; }
.item .ip {
    width: 88px; height: 88px; border-radius: 12px;
    background: var(--card-2); flex-shrink: 0;
    object-fit: cover; cursor: pointer;
}
.item .ib { flex: 1; min-width: 0; }
.item .iname {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px; font-weight: 500; line-height: 1.2;
    margin-bottom: 4px;
}
.item .idesc {
    font-size: 12.5px; color: var(--mute); line-height: 1.5;
    margin-bottom: 6px;
}
.item .ichef {
    font-size: 11.5px; color: var(--gold-l); font-style: italic; line-height: 1.4;
}
.item .ir {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px; gap: 8px;
}
.item .iprice { font-family: 'Cormorant Garamond', serif; font-size: 19px; font-weight: 500; color: var(--gold-l); }
.qty {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--card); border: 1px solid var(--bdr);
    border-radius: 999px; padding: 4px;
}
.qty button {
    width: 28px; height: 28px; border-radius: 50%;
    background: transparent; border: none; color: var(--cream);
    font-size: 16px; cursor: pointer;
}
.qty button:hover { background: var(--bdr); }
.qty .n { min-width: 18px; text-align: center; font-size: 13px; font-weight: 500; }

/* Wine list — distinct surface */
.wines { padding: 0 24px; }
.wine {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 12px 0; border-bottom: 1px dashed var(--bdr-2); gap: 14px;
}
.wine:last-child { border-bottom: none; }
.wine .wname { font-family: 'Cormorant Garamond', serif; font-size: 17px; }
.wine .wmeta { font-size: 11.5px; color: var(--mute); margin-top: 2px; }
.wine .wprice { font-family: 'Cormorant Garamond', serif; font-size: 16px; color: var(--gold-l); white-space: nowrap; }

/* Action grid — replaces radial wheel */
.actions {
    margin: 28px 24px 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.action {
    background: var(--card); border: 1px solid var(--bdr);
    border-radius: var(--r); padding: 18px 16px;
    cursor: pointer; transition: all .15s;
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    text-align: left; min-height: 92px; color: var(--cream); text-decoration: none;
}
.action:hover { border-color: var(--gold-d); transform: translateY(-1px); }
.action.primary { background: var(--gold); border-color: var(--gold); color: var(--bg); grid-column: span 2; }
.action .alabel { font-size: 14px; font-weight: 500; }
.action .adesc { font-size: 11.5px; color: var(--mute); }
.action.primary .adesc { color: rgba(12,10,8,.65); }
.action svg { width: 20px; height: 20px; stroke: var(--gold-l); }
.action.primary svg { stroke: var(--bg); }

/* Bottom nav — slim, doesn't duplicate the actions grid */
nav.bot {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: rgba(12,10,8,.85); backdrop-filter: blur(20px);
    border-top: 1px solid var(--bdr);
    display: flex; justify-content: space-around; align-items: center;
    padding: 8px max(8px, env(safe-area-inset-left)) 8px max(8px, env(safe-area-inset-right));
    z-index: 50;
}
.app { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
nav.bot .ni {
    background: transparent; border: none; color: var(--mute);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 12px; font-size: 10.5px; cursor: pointer;
    letter-spacing: .04em;
}
nav.bot .ni.active { color: var(--gold-l); }
nav.bot .ni svg { width: 21px; height: 21px; }
nav.bot .cart { position: relative; }
nav.bot .cart .badge {
    position: absolute; top: 0; right: 4px;
    background: var(--gold); color: var(--bg);
    width: 16px; height: 16px; border-radius: 50%;
    font-size: 10px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}

/* Modals (cart, reservations, review, intent picker) */
.modal-bg {
    position: fixed; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
    display: none; align-items: flex-end; justify-content: center;
    z-index: 100;
}
.modal-bg.open { display: flex; }
.modal {
    background: var(--surf); width: 100%; max-width: 480px;
    max-height: 90vh; overflow-y: auto; border-radius: 24px 24px 0 0;
    padding: 24px; position: relative;
    animation: slideUp .3s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal h3 { font-family: 'Cormorant Garamond', serif; font-size: 26px; margin-bottom: 4px; font-weight: 500; }
.modal .m-sub { font-size: 13px; color: var(--mute); margin-bottom: 18px; }
.modal .x {
    position: absolute; top: 16px; right: 16px;
    background: var(--card); border: 1px solid var(--bdr);
    width: 32px; height: 32px; border-radius: 50%;
    color: var(--cream); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.modal input, .modal select, .modal textarea {
    width: 100%; padding: 12px 14px; background: var(--card); color: var(--cream);
    border: 1px solid var(--bdr); border-radius: 10px; font-size: 14px;
    font-family: inherit; margin-bottom: 10px;
}
.modal input:focus, .modal textarea:focus { outline: none; border-color: var(--gold); }
.modal label { font-size: 11px; color: var(--mute); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; display: block; }
.modal .btn {
    width: 100%; padding: 14px; border: none; border-radius: 12px;
    background: var(--gold); color: var(--bg); font-weight: 600;
    cursor: pointer; font-size: 14px; letter-spacing: .04em;
}
.modal .btn.ghost { background: var(--card); color: var(--cream); margin-top: 8px; border: 1px solid var(--bdr); }

/* Toast */
.toast {
    position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
    background: var(--grn); color: #fff; padding: 12px 18px;
    border-radius: 999px; font-size: 13px; font-weight: 500;
    box-shadow: var(--shadow); z-index: 200;
    display: none; animation: pop .25s;
}
.toast.show { display: block; }
@keyframes pop { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Awards + press */
.badges {
    display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 24px 0;
}
.badge-pill {
    font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
    background: var(--card); border: 1px solid var(--bdr);
    padding: 6px 11px; border-radius: 999px; color: var(--gold-l);
}

/* Story */
.story {
    margin: 24px; padding: 22px; background: var(--card);
    border: 1px solid var(--bdr); border-radius: var(--r);
}
.story p { font-family: 'Cormorant Garamond', serif; font-size: 17px; line-height: 1.55; color: var(--cream); }

/* Gallery */
.gallery { display: flex; gap: 8px; overflow-x: auto; padding: 4px 24px 8px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { height: 110px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }

/* Hours */
.hours { margin: 0 24px 24px; padding: 18px; background: var(--card); border: 1px solid var(--bdr); border-radius: var(--r); }
.hours h3 { font-family: 'Cormorant Garamond', serif; font-size: 18px; margin-bottom: 10px; }
.hours .hr { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed var(--bdr-2); }
.hours .hr:last-child { border-bottom: none; }
.hours .day { color: var(--mute); }

/* Empty */
.empty { text-align: center; padding: 60px 24px; color: var(--mute); }
.empty h2 { font-family: 'Cormorant Garamond', serif; font-size: 28px; color: var(--cream); margin-bottom: 8px; }
.empty p { font-size: 13px; line-height: 1.6; }

/* Skeleton fade-in */
.fade-in { animation: fadeIn .4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* RTL */
html[dir=rtl] .actions, html[dir=rtl] .menu, html[dir=rtl] .wines,
html[dir=rtl] .story, html[dir=rtl] .hours, html[dir=rtl] .hdr,
html[dir=rtl] .lang, html[dir=rtl] .sec, html[dir=rtl] .badges,
html[dir=rtl] .gallery, html[dir=rtl] .pills, html[dir=rtl] .chef-strip,
html[dir=rtl] .hero { direction: rtl; text-align: right; }

/* Wide screens — center the app */
@media (min-width: 560px) {
    body { background: linear-gradient(180deg, #050402 0%, #0C0A08 100%); }
    .app { box-shadow: var(--shadow); margin-top: 0; }
}
