/* Dijital Menu - Musteri Tarafi Stil Sistemi */

/* Kendi sunucumuzda barindirilan yazi tipleri (harici CDN'e bagimlilik yok,
   PWA offline modunda da calisir). Sadece admin tarafindan secildiginde
   tarayici bu dosyalari indirir. */
@font-face { font-family: 'Poppins'; src: url('/assets/fonts/Poppins-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/assets/fonts/Poppins-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Merriweather'; src: url('/assets/fonts/Merriweather-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Merriweather'; src: url('/assets/fonts/Merriweather-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
    --m-primary: #0f766e;
    --m-secondary: #134e4a;
    --m-accent: #f59e0b;
    --m-bg: #f7f8f7;
    --m-surface: #ffffff;
    --m-text: #1f2937;
    --m-text-muted: #6b7280;
    --m-border: #e7eae9;
    --m-radius: 16px;
    --m-shadow: 0 2px 10px rgba(15, 23, 22, .08);
    --m-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --m-logo-size: 72px;
    --m-cover-height: 240px;
    --m-cat-height: 120px;
    --m-max-width: 560px;
    --m-fav-bg: rgba(255,255,255,.9);
    --m-fav-icon: #9ca3af;
    --m-fav-icon-active: #ef4444;
    --m-fav-float-bg: var(--m-surface);
    --m-fav-float-border: var(--m-border);
}

[data-theme-mode="dark"] {
    --m-bg: #14201f;
    --m-surface: #1c2b29;
    --m-text: #eef3f2;
    --m-text-muted: #9db3af;
    --m-border: #263936;
    --m-fav-bg: rgba(255,255,255,.14);
    --m-fav-icon: #a8b8b5;
    --m-fav-icon-active: #f87171;
    --m-fav-float-bg: rgba(248,113,113,.14);
    --m-fav-float-border: rgba(248,113,113,.4);
}

@media (prefers-color-scheme: dark) {
    [data-theme-mode="auto"] {
        --m-bg: #14201f;
        --m-surface: #1c2b29;
        --m-text: #eef3f2;
        --m-text-muted: #9db3af;
        --m-border: #263936;
        --m-fav-bg: rgba(255,255,255,.14);
        --m-fav-icon: #a8b8b5;
        --m-fav-icon-active: #f87171;
        --m-fav-float-bg: rgba(248,113,113,.14);
        --m-fav-float-border: rgba(248,113,113,.4);
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--m-font);
    background: var(--m-bg);
    color: var(--m-text);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 40px;
}
html[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Geeza Pro", var(--m-font); }

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.m-shell { max-width: var(--m-max-width); margin: 0 auto; background: var(--m-bg); min-height: 100vh; position: relative; }

/* ---------- Header / Cover ---------- */

.m-cover {
    position: relative;
    height: var(--m-cover-height);
    background-size: cover;
    background-position: center;
    background-color: var(--m-secondary);
}
.m-cover__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 100%);
}
.m-cover__top {
    position: relative; z-index: 2;
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px;
}
.m-icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
    border: none; color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; position: relative;
}
.m-icon-btn:active { background: rgba(255,255,255,.32); }
.m-header-actions { display: flex; gap: 8px; }
.m-fav-count {
    position: absolute; top: -4px; inset-inline-end: -4px;
    background: var(--m-accent); color: #fff; font-size: .65rem; font-weight: 700;
    border-radius: 999px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
}

.m-cover__bottom {
    position: relative; z-index: 2;
    display: flex; align-items: flex-end;
    padding: 0 16px 16px;
    height: calc(100% - 64px);
}
.m-brand-plate {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: calc(var(--m-radius) + 4px);
    padding: 10px 16px 10px 10px;
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
    max-width: 100%;
}
.m-logo {
    width: var(--m-logo-size); height: var(--m-logo-size);
    border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25);
    object-fit: cover; flex-shrink: 0;
}
.m-logo-placeholder {
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--m-primary); font-size: 1.4rem;
}
.m-brand-plate__text { min-width: 0; }
.m-business-name { color: #fff; font-size: 1.2rem; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 4px rgba(0,0,0,.3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-business-subtitle { color: rgba(255,255,255,.88); font-size: .82rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.m-status-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 16px; background: var(--m-surface); border-bottom: 1px solid var(--m-border);
    font-size: .82rem;
}
.m-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.m-status .dot { width: 8px; height: 8px; border-radius: 50%; }
.m-status--open .dot { background: #16a34a; }
.m-status--closed .dot { background: #dc2626; }
.m-status--open { color: #15803d; }
.m-status--closed { color: #b91c1c; }
.m-lang-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--m-border); border-radius: 999px; padding: 5px 12px; font-size: .78rem; font-weight: 700; color: var(--m-text); cursor: pointer; }

/* ---------- Search overlay ---------- */

.m-search-overlay {
    position: fixed; inset: 0; background: var(--m-bg); z-index: 60;
    display: none; flex-direction: column;
}
.m-search-overlay.open { display: flex; }
.m-search-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--m-border); background: var(--m-surface); }
.m-search-input { flex: 1; border: 1px solid var(--m-border); border-radius: 999px; padding: 10px 16px; font-size: .95rem; background: var(--m-bg); color: var(--m-text); }
.m-search-input:focus { outline: 2px solid var(--m-primary); }
.m-search-results { flex: 1; overflow-y: auto; padding: 12px 16px; }
.m-search-empty { text-align: center; color: var(--m-text-muted); padding: 60px 20px; }

/* ---------- Favorites overlay ---------- */

.m-fav-overlay { position: fixed; inset: 0; background: var(--m-bg); z-index: 60; display: none; flex-direction: column; }
.m-fav-overlay.open { display: flex; }

/* ---------- Language menu ---------- */

.m-lang-menu {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70;
    display: none; align-items: flex-end; justify-content: center;
}
.m-lang-menu.open { display: flex; }
.m-lang-sheet { background: var(--m-surface); width: 100%; max-width: var(--m-max-width); border-radius: 20px 20px 0 0; padding: 20px; }
.m-lang-option { display: flex; align-items: center; justify-content: space-between; padding: 12px 6px; border-bottom: 1px solid var(--m-border); font-weight: 600; cursor: pointer; }
.m-lang-option:last-child { border-bottom: none; }
.m-lang-option.active { color: var(--m-primary); }

/* ---------- Section titles ---------- */

.m-section { padding: 18px 16px 4px; }
.m-section-title { font-size: 1rem; font-weight: 700; margin: 0 0 12px; }

/* ---------- Kategori listesi (tek sutun, tam genislik) ---------- */

.m-cat-block { margin-bottom: 12px; }
.m-cat-card {
    position: relative; width: 100%; height: var(--m-cat-height); border-radius: var(--m-radius);
    overflow: hidden; background-size: cover; background-position: center; background-color: var(--m-secondary);
    cursor: pointer; border: none; padding: 0; display: block; box-shadow: var(--m-shadow);
}
.m-cat-card__overlay {
    position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.45));
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px;
}
.m-cat-card__name { color: #fff; font-weight: 700; font-size: 1.05rem; text-shadow: 0 1px 4px rgba(0,0,0,.45); letter-spacing: .01em; }
.m-cat-card.active { outline: 3px solid var(--m-accent); outline-offset: 2px; }

/* ---------- Kategori urun paneli (dogrudan kartin altinda acilir) ---------- */

.m-cat-panel { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.m-cat-panel.open { max-height: none; }
.m-cat-panel__inner { padding: 12px 0 4px; }

/* ---------- Product card ---------- */

.m-product-list { display: flex; flex-direction: column; gap: 10px; }
.m-product-card {
    display: flex; gap: 12px; background: var(--m-surface); border-radius: var(--m-radius);
    box-shadow: var(--m-shadow); padding: 10px; cursor: pointer; border: 1px solid var(--m-border);
    position: relative;
}
.m-product-card__image { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--m-bg); }
.m-product-card__body { flex: 1; min-width: 0; }
.m-product-card__top { display: flex; justify-content: space-between; gap: 8px; }
.m-product-card__name { font-weight: 700; font-size: .95rem; }
.m-product-card__desc { font-size: .8rem; color: var(--m-text-muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-product-card__meta { font-size: .72rem; color: var(--m-text-muted); opacity: .85; margin-top: 3px; }
.m-product-card__price { font-weight: 700; color: var(--m-primary); white-space: nowrap; }
.m-product-card__price-old { text-decoration: line-through; color: var(--m-text-muted); font-size: .78rem; font-weight: 400; margin-inline-end: 4px; }
.m-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.m-badge { font-size: .64rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.m-badge--popular { background: #fef3c7; color: #92400e; }
.m-badge--new { background: #dcfce7; color: #166534; }
.m-badge--chef { background: #ede9fe; color: #5b21b6; }
.m-badge--daily { background: #fee2e2; color: #991b1b; }
.m-badge--vegan { background: #dcfce7; color: #166534; }
.m-badge--vegetarian { background: #ecfccb; color: #3f6212; }
.m-badge--gluten-free { background: #e0f2fe; color: #075985; }
.m-badge--lactose-free { background: #e0f2fe; color: #075985; }
.m-badge--organic { background: #ecfccb; color: #3f6212; }
.m-badge--spicy { background: #ffe4e6; color: #9f1239; }
.m-badge--out-of-stock { background: #f3f4f6; color: #6b7280; }
.m-spice { color: var(--m-accent); font-size: .72rem; }
.m-fav-toggle {
    position: absolute; top: 8px; inset-inline-end: 8px; background: var(--m-fav-bg);
    border: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: .95rem; cursor: pointer; color: var(--m-fav-icon);
}
.m-fav-toggle.active { color: var(--m-fav-icon-active); }
.m-product-card.out-of-stock { opacity: .55; }

/* ---------- Product modal ---------- */

.m-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 80; display: none; align-items: flex-end; justify-content: center; }
.m-modal-backdrop.open { display: flex; }
.m-modal { background: var(--m-surface); width: 100%; max-width: var(--m-max-width); border-radius: 20px 20px 0 0; max-height: 92vh; overflow-y: auto; }
.m-modal__image { width: 100%; height: 240px; object-fit: cover; background: var(--m-bg); }
.m-modal__body { padding: 18px; }
.m-modal__close { position: sticky; top: 10px; float: inline-end; margin-inline-end: 10px; background: rgba(0,0,0,.5); color: #fff; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.m-modal__price { font-size: 1.3rem; font-weight: 700; color: var(--m-primary); margin: 10px 0; }
.m-modal__meta { font-size: .82rem; color: var(--m-text-muted); margin-bottom: 10px; }
.m-modal__allergens { font-size: .8rem; margin-top: 12px; }

/* ---------- Reviews ---------- */

.m-review-form { background: var(--m-surface); border-radius: var(--m-radius); box-shadow: var(--m-shadow); overflow: hidden; }
.m-review-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    background: none; border: none; padding: 18px; cursor: pointer; color: var(--m-text); text-align: start;
}
.m-review-toggle__icon { transition: transform .2s ease; color: var(--m-text-muted); }
.m-review-toggle.open .m-review-toggle__icon { transform: rotate(180deg); }
.m-review-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; padding: 0 18px; }
.m-review-body.open { max-height: 1200px; padding-bottom: 18px; }
.m-review-form .m-stars { display: flex; gap: 6px; font-size: 1.8rem; margin-bottom: 12px; }
.m-review-form .m-star { cursor: pointer; color: #d1d5db; }
.m-review-form .m-star.active { color: var(--m-accent); }
.m-review-form input[type="text"], .m-review-form input[type="tel"], .m-review-form textarea, .m-review-form input[type="file"] {
    width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--m-border);
    background: var(--m-surface); color: var(--m-text); font-size: .9rem; margin-bottom: 10px; font-family: inherit;
}
.m-review-form label { font-size: .82rem; font-weight: 600; display: block; margin-bottom: 4px; }
.m-review-form .m-hp { position: absolute; left: -9999px; }
.m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--m-primary); color: #fff; border: none; padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: .88rem; cursor: pointer; }
.m-btn:disabled { opacity: .6; }
.m-btn--block { width: 100%; }

/* ---------- Footer ---------- */

.m-footer { padding: 24px 16px 10px; text-align: center; }
.m-footer__links { display: flex; justify-content: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.m-footer__links a { width: 42px; height: 42px; border-radius: 50%; background: var(--m-surface); border: 1px solid var(--m-border); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--m-text-muted); transition: transform .15s ease, color .15s ease; }
.m-footer__links a:hover { transform: translateY(-2px); }
.m-footer__link--whatsapp:hover { color: #25d366; }
.m-footer__link--instagram:hover { color: #c13584; }
.m-footer__link--maps:hover { color: #ea4335; }
.m-footer__wifi { font-size: .82rem; color: var(--m-text-muted); margin-bottom: 10px; }
.m-footer__wifi button { border: none; background: none; color: var(--m-primary); font-weight: 700; cursor: pointer; }
.m-footer__notice { font-size: .74rem; color: var(--m-text-muted); margin: 4px 0; }
.m-footer__copy { font-size: .74rem; color: var(--m-text-muted); margin-top: 14px; }
.m-footer__copy a { text-decoration: underline; }
.m-footer__credit { font-size: .7rem; color: var(--m-text-muted); opacity: .75; margin-top: 8px; }
.m-footer__credit a { color: var(--m-primary); font-weight: 600; text-decoration: none; }
.m-footer__credit a:hover { text-decoration: underline; }

/* ---------- Back to top ---------- */

.m-top-btn {
    position: fixed; bottom: 20px; inset-inline-end: 20px; width: 44px; height: 44px; border-radius: 50%;
    background: var(--m-primary); color: #fff; border: none; box-shadow: 0 6px 16px rgba(0,0,0,.25);
    display: none; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; z-index: 40;
}
.m-top-btn.visible { display: flex; }

.m-fav-float {
    position: fixed; bottom: 20px; inset-inline-start: 20px; height: 44px; padding: 0 16px; border-radius: 999px;
    background: var(--m-fav-float-bg); color: var(--m-fav-icon-active); border: 1px solid var(--m-fav-float-border); box-shadow: 0 6px 16px rgba(0,0,0,.18);
    display: none; align-items: center; justify-content: center; gap: 6px; font-size: .95rem; font-weight: 700; cursor: pointer; z-index: 40;
}
.m-fav-float.visible { display: flex; }

/* ---------- Toast ---------- */
.m-toast {
    position: fixed; bottom: 78px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: rgba(20,25,24,.92); color: #fff; padding: 10px 18px; border-radius: 999px;
    font-size: .82rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
    z-index: 90; max-width: 88%; text-align: center;
}
.m-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Offline banner ---------- */

.m-offline-banner { display: none; background: #92400e; color: #fff; text-align: center; font-size: .78rem; padding: 8px 16px; }
.m-offline-banner.visible { display: block; }

/* ---------- Empty state ---------- */

.m-empty { text-align: center; padding: 40px 20px; color: var(--m-text-muted); }
