/* ==========================================================================
   BAHÇE — taze/ferah tema (dm-tema F4)
   Açık zemin + yeşil vurgu, yapışkan çipler, 2 kolon fotoğraflı ızgara.
   Palet kancası: --bh-accent (theme-info Palettes → F5 palet sistemi).
   ========================================================================== */
:root {
    --bh-bg: #F4F7F2;
    --bh-card: #FFFFFF;
    --bh-ink: #1C2420;
    --bh-muted: #6C7A70;
    --bh-line: #E3EAE1;
    /* dm-tema F5: restoran marka rengi vurguyu sürer (varsayılan yeşil) */
    --bh-accent: var(--theme-color-1, #1F9D55);
    --bh-accent-soft: var(--theme-color-0_08, #E4F4EA);
}

html, body { background: var(--bh-bg); }
body {
    margin: 0; color: var(--bh-ink);
    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(18, 28, 22, .5);
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.active { opacity: 1; pointer-events: auto; }

/* --- Başlık --- */
.bh-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; background: var(--bh-card);
    border-bottom: 1px solid var(--bh-line);
}
.bh-logo {
    width: 46px; height: 46px; border-radius: 13px; object-fit: cover;
    border: 1px solid var(--bh-line); flex: 0 0 auto;
}
.bh-head-txt { flex: 1 1 auto; min-width: 0; }
.bh-head-txt h1 {
    margin: 0; font-size: 17px; font-weight: 800;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bh-head-txt p {
    margin: 2px 0 0; color: var(--bh-muted); font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bh-head-search {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px;
    background: var(--bh-accent-soft); color: var(--bh-accent);
    border: 0; font-size: 16px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}

/* dil menüsü */
.bh-lang { position: relative; flex: 0 0 auto; }
.bh-lang-btn {
    background: var(--bh-bg); border: 1px solid var(--bh-line); color: var(--bh-ink);
    border-radius: 12px; padding: 9px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.bh-lang-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 960;
    max-width: calc(100vw - 24px);
    background: var(--bh-card); border: 1px solid var(--bh-line); border-radius: 12px;
    min-width: 140px; padding: 6px; box-shadow: 0 16px 40px rgba(20, 40, 28, .14);
}
.bh-lang-menu.show { display: block; }
.bh-lang-menu .dropdown-item {
    display: block; padding: 8px 12px; color: var(--bh-ink); text-decoration: none;
    font-size: 13.5px; border-radius: 8px;
}
.bh-lang-menu .dropdown-item:hover { background: var(--bh-accent-soft); }

/* --- Arama --- */
.bh-search-row { padding: 12px 16px 0; background: var(--bh-card); }
.bh-search-row input {
    width: 100%; box-sizing: border-box;
    background: var(--bh-bg); border: 1px solid var(--bh-line); border-radius: 13px;
    padding: 12px 15px; font-size: 14.5px; color: var(--bh-ink); outline: none;
}
.bh-search-row input:focus { border-color: var(--bh-accent); }

/* --- Çipler --- */
.bh-chips {
    position: sticky; top: 0; z-index: 500;
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 12px 16px;
    background: var(--bh-card); border-bottom: 1px solid var(--bh-line);
}
.bh-chips::-webkit-scrollbar { display: none; }
.bh-chip {
    flex: 0 0 auto; background: var(--bh-bg); color: var(--bh-ink);
    border: 1px solid var(--bh-line); border-radius: 999px;
    padding: 9px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: background .2s, color .2s;
}
.bh-chip.active { background: var(--bh-accent); border-color: var(--bh-accent); color: var(--theme-on-accent, #fff); }

/* --- Gövde --- */
.bh-body { max-width: 640px; margin: 0 auto; padding: 4px 16px 130px; }
.bh-cat-title {
    display: flex; align-items: baseline; gap: 10px;
    font-size: 19px; font-weight: 800; margin: 20px 2px 12px;
}
.bh-cat-title span { color: var(--bh-muted); font-size: 12px; font-weight: 600; }
.bh-subhead {
    font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--bh-muted); margin: 18px 2px 10px;
}

/* --- Izgara + kart --- */
.bh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bh-grid:empty { display: none; }
.bh-item {
    background: var(--bh-card); border: 1px solid var(--bh-line); border-radius: 16px;
    overflow: hidden; display: flex; flex-direction: column;
}
.bh-item-media { position: relative; aspect-ratio: 4 / 3; background: var(--bh-accent-soft); }
.bh-item-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bh-item-noimg {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: var(--bh-accent); font-size: 26px; opacity: .55;
}
.bh-item-type {
    position: absolute; top: 8px; left: 8px; width: 18px; height: 18px;
    background: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center;
    font-size: 7px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.bh-item-type.veg { color: #1F9D55; }
.bh-item-type.nonveg { color: #C0392B; }
.bh-kcal {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(255, 255, 255, .92); color: #14532D;
    border-radius: 999px; padding: 3px 8px; font-size: 10.5px; font-weight: 700;
}
.bh-item-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1 1 auto; }
.bh-item-body h4 { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.3; }
.bh-item-desc {
    margin: 4px 0 0; color: var(--bh-muted); font-size: 11.5px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bh-algs { display: inline-flex; gap: 4px; margin-top: 7px; }
.bh-algs i {
    width: 19px; height: 19px; border-radius: 50%;
    background: var(--bh-bg); border: 1px solid var(--bh-line);
    color: var(--bh-muted); font-size: 8.5px; font-style: normal;
    display: inline-flex; align-items: center; justify-content: center;
}
.bh-item-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 10px;
}
.bh-item-price { font-size: 15px; font-weight: 800; color: var(--bh-ink); font-variant-numeric: tabular-nums; }
.bh-add {
    width: 34px; height: 34px; border-radius: 11px; cursor: pointer;
    background: var(--bh-accent); color: var(--theme-on-accent, #fff); border: 0; font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(31, 157, 85, .3);
}
.bh-no-result { text-align: center; color: var(--bh-muted); font-size: 13.5px; padding: 26px 0; }
.bh-brand { text-align: center; color: #A9B4AC; font-size: 11px; padding: 22px 0 0; }

/* --- Sepet çubuğu --- */
.bh-cartbar {
    position: fixed; left: 14px; right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom)); z-index: 900;
}
.bh-cartbar.none { display: none; }
.bh-cartbar-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; min-height: 52px; cursor: pointer;
    background: var(--bh-accent); color: var(--theme-on-accent, #fff);
    border: 0; border-radius: 15px; padding: 0 18px;
    font-size: 14px; font-weight: 800;
    box-shadow: 0 12px 30px rgba(31, 157, 85, .35);
}
.bh-cartbar-count { opacity: .9; font-size: 12.5px; }
.bh-cartbar-price { font-variant-numeric: tabular-nums; }

/* --- Servis --- */
.bh-servis {
    position: fixed; right: 14px; bottom: 84px; z-index: 890;
    background: var(--bh-card); color: var(--bh-ink);
    border: 1px solid var(--bh-line); border-radius: 999px;
    padding: 11px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
    box-shadow: 0 12px 30px rgba(20, 40, 28, .16);
}

/* --- 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, .2);
}
#call-waiter-box.sidenav.bottom.active { bottom: 0 !important; }

.dm-preview-bar { bottom: 84px !important; }

@media (min-width: 640px) {
    .bh-grid { grid-template-columns: 1fr 1fr 1fr; }
    .bh-cartbar { left: 50%; right: auto; width: min(612px, calc(100vw - 28px)); transform: translateX(-50%); }
    .bh-servis { right: calc(50% - 306px - 14px); }
    /* masaüstünde kategori çipleri kaydırma yerine sarar */
    .bh-chips { flex-wrap: wrap; overflow-x: visible; }
    .bh-body, .bh-chips, .bh-search-row, .bh-head { max-width: 720px; margin-left: auto; margin-right: auto; }
    .bh-chips, .bh-head { border-radius: 0 0 14px 14px; }
}
@media (max-width: 340px) {
    .bh-grid { grid-template-columns: 1fr; }
}

/* dm-tema F15: tema modu karşılığı (Koyu seçilirse) — varsayılan dışı görünüm */
body.dm-alt-dark {
    --bh-bg: #0F1411;
    --bh-card: #171E1A;
    --bh-ink: #E6EEE8;
    --bh-muted: #9DB0A3;
    --bh-line: rgba(230,238,232,.1);
    background-color: #0F1411;
    --bh-accent: var(--theme-color-1, #1F9D55);
    --bh-accent-soft: var(--theme-color-0_08, #E4F4EA);
}
html:has(> body.dm-alt-dark) { background: #0F1411; }
body.dm-alt-dark .bh-item-type { background: var(--bh-card); }
body.dm-alt-dark .bh-brand { color: var(--bh-muted); }
