/* =================================================================
   v2 menü temaları — ortak iskelet (menu/render_v2.php)
   Temalar yalnızca aşağıdaki değişkenleri ve kendi süslemelerini
   assets/css/menu/{tema}.css içinde tanımlar.
   ================================================================= */
:root {
    --m-accent: #6366f1;
    --m-accent-rgb: 99, 102, 241;
    --m-bg: #f7f7f8;
    --m-fg: #18181b;
    --m-muted: #71717a;
    --m-card: #ffffff;
    --m-border: rgba(0, 0, 0, .08);
    --m-radius: 16px;
    --m-shadow: 0 6px 24px rgba(0, 0, 0, .06);
    --m-head-font: system-ui, sans-serif;
    --m-body-font: system-ui, sans-serif;
    --m-hero-bg: var(--m-accent);
    --m-hero-fg: #fff;
    --m-price: var(--m-accent);
    --m-chip-bg: rgba(0, 0, 0, .05);
    --m-chip-fg: var(--m-fg);
    --m-chip-on-bg: var(--m-accent);
    --m-chip-on-fg: #fff;
    --m-nav-bg: rgba(255, 255, 255, .85);
    --m-max: 860px;
    --m-ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.mv2 {
    margin: 0;
    background: var(--m-bg);
    color: var(--m-fg);
    font-family: var(--m-body-font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.mv2.modal-open { overflow: hidden; }
.mv2 img { max-width: 100%; display: block; }
.mv2 a { color: inherit; }
.mv2 .qmp-mode-banner { position: relative; }

/* ---------- Hero ---------- */
.m-hero {
    position: relative;
    background: var(--m-hero-bg);
    color: var(--m-hero-fg);
    text-align: center;
    padding: 3rem 1.25rem 2.5rem;
    overflow: hidden;
}
.m-hero-inner { position: relative; z-index: 2; max-width: var(--m-max); margin: 0 auto; will-change: transform; }
.m-logo {
    width: 88px; height: 88px; margin: 0 auto 1rem;
    border-radius: 50%; object-fit: cover;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
    background: rgba(255, 255, 255, .15);
}
.m-logo-initials { display: flex; align-items: center; justify-content: center; font: 700 1.8rem/1 var(--m-head-font); }
.m-name { font-family: var(--m-head-font); font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: 1.1; margin: 0 0 .5rem; }
.m-address { margin: 0 0 1.1rem; opacity: .8; font-size: .92rem; }
.m-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.m-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .55rem 1rem; border-radius: 999px;
    background: rgba(255, 255, 255, .16); color: inherit;
    text-decoration: none; font-size: .9rem; font-weight: 600;
    border: 1px solid rgba(255, 255, 255, .22);
    transition: transform .2s var(--m-ease), background .2s;
}
.m-btn:active { transform: scale(.96); }
.m-btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.m-btn-icon { width: 40px; height: 40px; padding: 0; justify-content: center; }

/* ---------- Arama + kategori menüsü ---------- */
.m-toolbar { max-width: var(--m-max); margin: 1rem auto 0; padding: 0 1rem; display: flex; gap: .5rem; }
.m-search { position: relative; flex: 1; }
.m-search i { position: absolute; z-index: 2; pointer-events: none; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--m-muted); }
.m-search input {
    width: 100%; font: inherit; font-size: 16px;
    padding: .8rem 1rem .8rem 2.6rem;
    border-radius: 999px; border: 1px solid var(--m-border);
    background: var(--m-card); color: var(--m-fg); outline: none;
    transition: box-shadow .2s, border-color .2s;
}
.m-search input::placeholder { color: var(--m-muted); }
.m-search input:focus { border-color: var(--m-accent); box-shadow: 0 0 0 4px rgba(var(--m-accent-rgb), .18); }
.m-view-toggle {
    flex: 0 0 48px; height: 48px; border-radius: 50%;
    border: 1px solid var(--m-border); background: var(--m-card); color: var(--m-fg);
    font-size: 1.15rem; cursor: pointer;
}

.m-cats {
    position: sticky; top: 0; z-index: 50;
    margin-top: .75rem;
    background: var(--m-nav-bg);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    transition: opacity .2s;
}
.m-cats.is-dimmed { opacity: .4; pointer-events: none; }
.m-cats-track {
    display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none;
    max-width: var(--m-max); margin: 0 auto; padding: .7rem 1rem;
    scroll-snap-type: x proximity;
}
.m-cats-track::-webkit-scrollbar { display: none; }
.m-cat {
    flex: 0 0 auto; scroll-snap-align: center;
    padding: .5rem 1rem; border-radius: 999px;
    background: var(--m-chip-bg); color: var(--m-chip-fg);
    text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap;
    transition: background .25s, color .25s, transform .25s var(--m-ease);
}
.m-cat.is-active { background: var(--m-chip-on-bg); color: var(--m-chip-on-fg); }

/* ---------- Bölümler ve ürünler (varsayılan: liste) ---------- */
.m-main { max-width: var(--m-max); margin: 0 auto; padding: 1rem 1rem 2rem; }
.m-sec { padding-top: 1.25rem; scroll-margin-top: 80px; }
.m-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.m-sec-title { font-family: var(--m-head-font); font-size: 1.45rem; margin: 0; line-height: 1.2; }
.m-sec-count { color: var(--m-muted); font-size: .8rem; white-space: nowrap; }
.m-items { display: grid; gap: .75rem; }
.m-item {
    position: relative; display: flex; gap: .9rem; align-items: center;
    background: var(--m-card); border-radius: var(--m-radius);
    padding: .8rem; box-shadow: var(--m-shadow);
    cursor: pointer; outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .25s var(--m-ease), box-shadow .25s;
}
.m-item:focus-visible { box-shadow: 0 0 0 3px rgba(var(--m-accent-rgb), .5); }
.m-item:active { transform: scale(.985); }
.m-item-img { position: relative; flex: 0 0 84px; height: 84px; border-radius: calc(var(--m-radius) - 4px); overflow: hidden; background: rgba(0, 0, 0, .05); }
.m-item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--m-ease); }
.m-item:hover .m-item-img img { transform: scale(1.06); }
.m-price-tag { display: none; }
.m-item-body { flex: 1; min-width: 0; }
.m-item-head { display: flex; align-items: baseline; gap: .5rem; }
.m-item-name { font-family: var(--m-head-font); font-size: 1.02rem; margin: 0; line-height: 1.3; }
.m-leader { flex: 1; }
.m-item-price { font-weight: 700; color: var(--m-price); white-space: nowrap; }
.m-item-desc {
    margin: .3rem 0 0; color: var(--m-muted); font-size: .88rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.is-hidden { display: none !important; }

/* Kaydırınca belirme — JS yoksa her şey görünür kalır */
.js .m-item, .js .m-sec-head { opacity: 0; transform: translateY(18px); }
.js .m-item.is-in, .js .m-sec-head.is-in {
    opacity: 1; transform: none;
    transition: opacity .6s var(--m-ease), transform .6s var(--m-ease);
    transition-delay: calc(var(--i, 0) * 55ms);
}

.m-empty, .m-search-empty { text-align: center; padding: 3rem 1rem; color: var(--m-muted); }
.m-empty i { font-size: 3rem; color: var(--m-accent); }

/* ---------- İlerleme çubuğu (varsayılan kapalı; luxe açar) ---------- */
.m-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: var(--m-accent); transform-origin: 0 50%; transform: scaleX(0); display: none; }

/* ---------- Alt bilgi, yukarı butonu ---------- */
.m-footer { text-align: center; padding: 2rem 1rem 6rem; color: var(--m-muted); font-size: .8rem; }
.m-footer p { margin: 0 0 .4rem; }
.m-credit a { font-weight: 700; text-decoration: none; }
.m-top {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
    width: 46px; height: 46px; border-radius: 50%; border: 0;
    background: var(--m-accent); color: #fff; font-size: 1.1rem; cursor: pointer;
    box-shadow: 0 8px 24px rgba(var(--m-accent-rgb), .4);
    opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
    transition: opacity .3s, transform .3s var(--m-ease);
}
.m-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Ürün detay penceresi (alttan açılan sayfa) ---------- */
.m-modal {
    position: fixed; inset: 0; z-index: 300;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgba(0, 0, 0, 0); transition: background .25s;
}
.m-modal.is-open { background: rgba(0, 0, 0, .55); }
.m-modal-card {
    position: relative; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
    background: var(--m-card); color: var(--m-fg);
    border-radius: 24px 24px 0 0;
    transform: translateY(100%); transition: transform .35s var(--m-ease);
}
.m-modal.is-open .m-modal-card { transform: none; }
.m-modal-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.m-modal-body { padding: 1.25rem 1.5rem 2rem; }
.m-modal-name { font-family: var(--m-head-font); font-size: 1.5rem; margin: 0 0 .5rem; }
.m-modal-desc { color: var(--m-muted); margin: 0 0 1rem; }
.m-modal-price { font-size: 1.6rem; font-weight: 800; color: var(--m-price); }
.m-modal-close {
    position: absolute; top: .75rem; right: .75rem; z-index: 2;
    width: 40px; height: 40px; border-radius: 50%; border: 0;
    background: rgba(0, 0, 0, .55); color: #fff; font-size: 1rem; cursor: pointer;
}
@media (min-width: 640px) {
    .m-modal { align-items: center; }
    .m-modal-card { border-radius: 24px; transform: translateY(30px) scale(.96); opacity: 0; transition: transform .35s var(--m-ease), opacity .25s; }
    .m-modal.is-open .m-modal-card { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js .m-item, .js .m-sec-head { opacity: 1 !important; transform: none !important; }
}

/* Dokunma hedefi: kategori sekmeleri ve butonlar en az 40px (WCAG 2.5.8 / Apple HIG ≥ 44 hedefi) */
.m-cat { min-height: 42px; display: inline-flex; align-items: center; }
.m-btn { min-height: 42px; }
.m-view-toggle, .m-modal-close { min-width: 44px; min-height: 44px; }
@media (max-width: 380px) {
    .m-btn { padding-left: .8rem; padding-right: .8rem; }
    .m-hero { padding-left: 1rem; padding-right: 1rem; }
}

/* Uzun/boşluksuz kelimeler (ör. "Mükemmelleştirilemeyebileceklerimizdenmişsinizcesine") kartı taşırmasın */
.m-name, .m-address, .m-sec-title, .m-item-name, .m-item-desc, .m-modal-name, .m-modal-desc, .m-splash-name {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}
.m-items > .m-item, .m-item-body, .m-item-head, .m-item-name, .m-sec-head > * { min-width: 0; }
.m-sec-head { flex-wrap: wrap; }
.m-item-price { flex: none; }
.m-item-head { flex-wrap: wrap; }
.m-cat { max-width: 78vw; overflow: hidden; text-overflow: ellipsis; }

/* Giriş animasyonundaki büyütme/eğme (ör. Street) yatay kaydırma çubuğu yaratmasın.
   `clip`, kaydırma kapsayıcısı oluşturmadığı için sticky/fixed öğeleri bozmaz. */
.m-main, .m-hero, .m-footer { overflow-x: clip; }

/* Geniş ekranlarda ızgara tabanlı temalar alanı daha iyi kullansın (menüler mobil öncelikli olduğu için dar sütun varsayılan) */
@media (min-width: 1100px) {
    .t-neon, .t-street, .t-ocean { --m-max: 1080px; }
    .t-pastel { --m-max: 1000px; }
    .t-luxe { --m-max: 1040px; }
}

/* ---------- Erişilebilirlik: "Menüye geç" bağlantısı ---------- */
.m-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; color: #111; padding: .6rem 1rem; border-radius: 0 0 10px 0; font-weight: 700; text-decoration: none; }
.m-skip:focus { left: 0; }

/* ---------- Alt bilgi düğmeleri ---------- */
.m-foot-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1rem; }
.m-foot-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 42px; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--m-border); background: var(--m-card); color: var(--m-fg); font: 600 .85rem/1 var(--m-body-font); cursor: pointer; transition: transform .15s, border-color .2s; }
.m-foot-btn:hover { border-color: var(--m-accent); }
.m-foot-btn:active { transform: scale(.96); }
.m-print-head { display: none; }

/* ---------- Basılı fiyat listesi ----------
   Fiyat Etiketi Yönetmeliği: müşteri talep ederse basılı liste verilmelidir.
   Yazdır / PDF çıktısı tema ne olursa olsun sade, siyah-beyaz, çift sütunlu bir
   fiyat listesi üretir: fotoğraf, arama, düğme ve animasyon yok. */
@media print {
    @page { margin: 14mm 12mm; }
    html, body.mv2 { background: #fff !important; color: #000 !important; }
    body.mv2 * { box-shadow: none !important; text-shadow: none !important; animation: none !important; transition: none !important; filter: none !important; }
    body.mv2::before, body.mv2::after { display: none !important; }
    .m-skip, .qmp-mode-banner, .m-splash, .m-progress, .m-toolbar, .m-cats, .m-top, .m-modal, .m-foot-actions, .m-actions, .m-logo, .m-address, .m-kicker, .m-bubbles, .m-waves, .m-search-empty, .m-sec-count, .m-price-tag, .m-item-img, .m-hero::before, .m-hero::after { display: none !important; }
    .m-hero { background: none !important; color: #000 !important; padding: 0 0 6mm !important; min-height: 0 !important; text-align: left !important; border-bottom: 2px solid #000; }
    .m-hero-inner { transform: none !important; opacity: 1 !important; max-width: none !important; }
    .m-name { display: none !important; }
    .m-print-head { display: block !important; font: 700 16pt/1.2 Georgia, serif; color: #000; }
    .m-main { max-width: none !important; padding: 5mm 0 0 !important; overflow: visible !important; }
    .m-sec { padding: 0 0 4mm !important; break-inside: avoid-page; }
    .m-sec-head { display: block !important; margin: 0 0 2mm !important; opacity: 1 !important; transform: none !important; text-align: left !important; }
    .m-sec-head::after { display: none !important; }
    .m-sec-title { font: 700 12pt/1.2 Georgia, serif !important; color: #000 !important; text-transform: uppercase; border-bottom: 1px solid #000; padding-bottom: 1mm; margin: 0 !important; }
    .m-sec-title span { background: none !important; color: #000 !important; padding: 0 !important; transform: none !important; display: inline !important; }
    .m-sec-title span::before, .m-sec-title span::after { display: none !important; }
    .m-items { display: block !important; columns: 2; column-gap: 8mm; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
    .m-item { display: block !important; break-inside: avoid; opacity: 1 !important; transform: none !important; clip-path: none !important; background: none !important; border: 0 !important; border-bottom: .3pt dotted #666 !important; border-radius: 0 !important; padding: 1.2mm 0 !important; margin: 0 !important; min-height: 0 !important; width: auto !important; max-width: none !important; }
    .m-item::before, .m-item::after { display: none !important; }
    .m-item-body { opacity: 1 !important; transform: none !important; padding: 0 !important; margin: 0 !important; }
    .m-item-head { display: flex !important; flex-direction: row !important; align-items: baseline !important; justify-content: flex-start !important; gap: 2mm; flex-wrap: nowrap !important; }
    .m-item-name, .m-item-price, .m-leader { order: 0 !important; }
    .m-item-body { text-align: left !important; }
    .m-item { grid-template-columns: none !important; }
    .m-item-name { font: 600 10pt/1.25 Georgia, serif !important; color: #000 !important; padding: 0 !important; text-transform: none !important; letter-spacing: 0 !important; }
    .m-leader { flex: 1 !important; display: block !important; border-bottom: .5pt dotted #000 !important; transform: none !important; min-width: 6mm; }
    .m-item-price { display: inline !important; position: static !important; background: none !important; color: #000 !important; font: 700 10pt/1.25 Georgia, serif !important; padding: 0 !important; box-shadow: none !important; }
    .m-item-desc { display: block !important; -webkit-line-clamp: unset !important; font: 8pt/1.3 Arial, sans-serif !important; color: #444 !important; margin: .5mm 0 0 !important; }
    .m-footer { padding: 4mm 0 0 !important; text-align: left !important; color: #333 !important; font-size: 8pt !important; border-top: 1px solid #000 !important; margin: 4mm 0 0 !important; }
    .m-credit { display: none !important; }
}

