/* ==========================================================================
   NEON — gece mekanı teması (dm-tema F4)
   Koyu degrade zemin + neon ışıltılar, cam (glassmorphism) kartlar,
   mor→camgöbeği degrade vurgular. Palet kancası: --ne-a/--ne-b (F5).
   ========================================================================== */
:root {
    --ne-bg-a: #0B0F2A;
    --ne-bg-b: #170B2E;
    --ne-ink: #EDEBFF;
    --ne-muted: #9A96C0;
    --ne-glass: rgba(255, 255, 255, .06);
    --ne-glass-line: rgba(255, 255, 255, .12);
    /* dm-tema F5: degrade ana renk → ikinci vurgu (restaurant_accent2);
       accent2 boşken ana renge takma ad — palet swatch'ları mor/camgöbeği önerir */
    --ne-a: var(--theme-accent-dark-1, #8B5CF6);
    --ne-b: var(--theme-accent2-dark-1, #06B6D4);
}

html, body { background: var(--ne-bg-a); }
body {
    margin: 0; color: var(--ne-ink);
    background: linear-gradient(160deg, var(--ne-bg-a), var(--ne-bg-b) 70%);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }

.overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(6, 8, 24, .66);
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.active { opacity: 1; pointer-events: auto; }

/* neon ışıltılar */
.ne-glow { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; opacity: .5; }
.ne-glow-a { width: 320px; height: 320px; top: -80px; left: -100px; background: var(--ne-a); }
.ne-glow-b { width: 280px; height: 280px; top: 30vh; right: -120px; background: var(--ne-b); opacity: .3; }

/* --- Başlık --- */
.ne-head {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 12px;
    margin: 14px 14px 0; padding: 12px 14px;
    background: var(--ne-glass); border: 1px solid var(--ne-glass-line);
    border-radius: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ne-logo {
    width: 46px; height: 46px; border-radius: 14px; object-fit: cover;
    border: 1px solid var(--ne-glass-line); flex: 0 0 auto;
}
.ne-head-txt { flex: 1 1 auto; min-width: 0; }
.ne-head-txt h1 {
    margin: 0; font-size: 17px; font-weight: 800; color: var(--ne-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ne-head-txt p {
    margin: 2px 0 0; color: var(--ne-muted); font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ne-head-search {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 13px; cursor: pointer;
    background: var(--ne-glass); color: var(--ne-ink);
    border: 1px solid var(--ne-glass-line); font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* dil menüsü */
.ne-lang { position: relative; flex: 0 0 auto; }
.ne-lang-btn {
    background: var(--ne-glass); border: 1px solid var(--ne-glass-line); color: var(--ne-ink);
    border-radius: 13px; padding: 9px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.ne-lang-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 960;
    max-width: calc(100vw - 24px);
    background: #171A38; border: 1px solid var(--ne-glass-line); border-radius: 13px;
    min-width: 140px; padding: 6px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.ne-lang-menu.show { display: block; }
.ne-lang-menu .dropdown-item {
    display: block; padding: 8px 12px; color: var(--ne-ink); text-decoration: none;
    font-size: 13.5px; border-radius: 9px;
}
.ne-lang-menu .dropdown-item:hover { background: rgba(139, 92, 246, .18); }

/* --- Arama --- */
.ne-search-row { position: relative; z-index: 1; padding: 12px 14px 0; }
.ne-search-row input {
    width: 100%; box-sizing: border-box;
    background: var(--ne-glass); border: 1px solid var(--ne-glass-line); border-radius: 14px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    padding: 12px 15px; font-size: 14.5px; color: var(--ne-ink); outline: none;
}
.ne-search-row input::placeholder { color: var(--ne-muted); }
.ne-search-row input:focus { border-color: var(--ne-a); }

/* --- Çipler --- */
.ne-chips {
    position: sticky; top: 0; z-index: 500;
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 12px 14px;
    background: linear-gradient(180deg, rgba(11, 15, 42, .92) 70%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ne-chips::-webkit-scrollbar { display: none; }
.ne-chip {
    flex: 0 0 auto; cursor: pointer; white-space: nowrap;
    background: var(--ne-glass); color: var(--ne-ink);
    border: 1px solid var(--ne-glass-line); border-radius: 999px;
    padding: 9px 16px; font-size: 13.5px; font-weight: 600;
}
.ne-chip.active {
    background: linear-gradient(90deg, var(--ne-a), var(--ne-b));
    border-color: transparent; color: var(--theme-on-accent-dark, #fff);
    box-shadow: 0 6px 20px rgba(139, 92, 246, .4);
}

/* --- Gövde --- */
.ne-body { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 4px 14px 130px; }
.ne-cat-title {
    font-size: 19px; font-weight: 800; margin: 20px 4px 12px;
    background: linear-gradient(90deg, var(--ne-ink), var(--ne-muted));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ne-subhead {
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ne-b); margin: 18px 4px 10px;
}

/* --- Cam kart --- */
.ne-item {
    display: flex; gap: 12px; align-items: stretch;
    background: var(--ne-glass); border: 1px solid var(--ne-glass-line);
    border-radius: 18px; padding: 10px; margin-bottom: 12px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ne-item-media { position: relative; flex: 0 0 84px; align-self: center; }
.ne-item-media img, .ne-item-noimg {
    width: 84px; height: 84px; border-radius: 13px;
    object-fit: cover; display: block;
}
.ne-item-noimg {
    display: flex; align-items: center; justify-content: center;
    background: rgba(139, 92, 246, .14); color: var(--ne-a); font-size: 24px;
}
.ne-item-type {
    position: absolute; top: 6px; left: 6px; width: 17px; height: 17px;
    background: rgba(10, 12, 32, .8); border-radius: 6px;
    display: flex; align-items: center; justify-content: center; font-size: 6.5px;
}
.ne-item-type.veg { color: #34D399; }
.ne-item-type.nonveg { color: #F87171; }
.ne-item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ne-item-body h4 { margin: 2px 0 0; font-size: 14.5px; font-weight: 700; color: var(--ne-ink); }
.ne-item-desc {
    margin: 4px 0 0; color: var(--ne-muted); font-size: 12px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ne-item-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.ne-kcal {
    background: rgba(6, 182, 212, .16); color: #67E8F9;
    border-radius: 999px; padding: 3px 9px; font-size: 10.5px; font-weight: 700;
}
.ne-algs { display: inline-flex; gap: 4px; }
.ne-algs i {
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255, 255, 255, .07); border: 1px solid var(--ne-glass-line);
    color: var(--ne-muted); font-size: 8.5px; font-style: normal;
    display: inline-flex; align-items: center; justify-content: center;
}
.ne-item-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 8px;
}
.ne-item-price { font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ne-add {
    display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
    background: linear-gradient(90deg, var(--ne-a), var(--ne-b)); color: var(--theme-on-accent-dark, #fff);
    border: 0; border-radius: 999px; padding: 7px 15px; font-size: 12.5px; font-weight: 700;
    box-shadow: 0 6px 18px rgba(139, 92, 246, .35);
}
.ne-no-result { text-align: center; color: var(--ne-muted); font-size: 13.5px; padding: 26px 0; }
.ne-brand { text-align: center; color: #565378; font-size: 11px; padding: 22px 0 0; }

/* --- Sepet çubuğu --- */
.ne-cartbar {
    position: fixed; left: 14px; right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom)); z-index: 900;
}
.ne-cartbar.none { display: none; }
.ne-cartbar-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; min-height: 52px; cursor: pointer;
    background: linear-gradient(90deg, var(--ne-a), var(--ne-b)); color: var(--theme-on-accent-dark, #fff);
    border: 0; border-radius: 16px; padding: 0 18px;
    font-size: 14px; font-weight: 800;
    box-shadow: 0 12px 32px rgba(139, 92, 246, .45);
}
.ne-cartbar-count { opacity: .9; font-size: 12.5px; }
.ne-cartbar-price { font-variant-numeric: tabular-nums; }

/* --- Servis --- */
.ne-servis {
    position: fixed; right: 14px; bottom: 84px; z-index: 890; cursor: pointer;
    background: var(--ne-glass); color: var(--ne-ink);
    border: 1px solid var(--ne-glass-line); border-radius: 999px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    padding: 11px 18px; font-size: 13px; font-weight: 700;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}

/* --- Garson kutusu --- */
#call-waiter-box.sidenav.bottom {
    width: 100%; left: 0; bottom: -110vh; position: fixed; z-index: 1050;
    background: #fff; border-radius: 18px 18px 0 0; transition: bottom .3s;
    box-shadow: 0 -18px 45px rgba(0, 0, 0, .35);
}
#call-waiter-box.sidenav.bottom.active { bottom: 0 !important; }

.dm-preview-bar { bottom: 84px !important; }

@media (min-width: 640px) {
    .ne-cartbar { left: 50%; right: auto; width: min(612px, calc(100vw - 28px)); transform: translateX(-50%); }
    .ne-servis { right: calc(50% - 306px - 14px); }
    /* masaüstünde kategori çipleri kaydırma yerine sarar */
    .ne-chips { flex-wrap: wrap; overflow-x: visible; }
    .ne-head, .ne-search-row, .ne-chips, .ne-body { max-width: 640px; margin-left: auto; margin-right: auto; }
    .ne-head { margin-top: 14px; }
}

/* dm-tema F15: tema modu karşılığı (Açık seçilirse) — varsayılan dışı görünüm */
body.dm-alt-light {
    --ne-bg-a: #F4F2FF;
    --ne-bg-b: #FBEFFF;
    --ne-ink: #1B1740;
    --ne-muted: #5E5A86;
    --ne-glass: rgba(255,255,255,.72);
    --ne-glass-line: rgba(27,23,64,.12);
    background-color: #F4F2FF;
    --ne-a: var(--theme-accent-dark-1, #8B5CF6);
    --ne-b: var(--theme-accent2-dark-1, #06B6D4);
}
html:has(> body.dm-alt-light) { background: #F4F2FF; }
body.dm-alt-light .ne-lang-menu { background: #FFFFFF; }
body.dm-alt-light .ne-chips { background: linear-gradient(180deg, rgba(244,242,255,.94) 70%, transparent); }
body.dm-alt-light .ne-item-type { background: rgba(255,255,255,.92); }
body.dm-alt-light .ne-kcal { color: #0E7490; }
body.dm-alt-light .ne-algs i { background: rgba(27,23,64,.06); }
body.dm-alt-light .ne-brand { color: var(--ne-muted); }
