/* Gelişmiş II (gelismis2) — tek sayfa menü. Mobil öncelikli.
   Renk: palet değişkenleri (:root --mf-*, _core/palettes.php); yoksa varsayılan vurgu. Porto/Bootstrap ortak
   bileşenler (sepet, pencereler, alt bilgi) için yüklü kalır; tema kuralları .mm kapsamında. */

.mm {
    --mm-accent: var(--mf-primary, var(--mf-grad-from, var(--mf-active, #c8432b)));
    --mm-accent-2: var(--mf-grad-to, var(--mm-accent));
    --mm-accent-ink: var(--mm-accent); /* yazı rengi ya da beyaz yazının zemini olarak okunur ton (aşağıda koyulaştırılır) */
    --mm-bg: #f6f6f4;
    --mm-surface: #ffffff;
    --mm-text: #1d1d1f;
    --mm-muted: #6b6b70;
    --mm-line: #e7e6e2;
    --mm-radius: 14px;
    --mm-nav-h: 112px;
    --mm-font-display: var(--mm-font);
    --mm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--mm-bg);
    color: var(--mm-text);
    font-family: var(--mm-font);
    font-size: 15px;
    line-height: 1.45;
    min-height: 100vh;
}
/* Açık paletlerde (sarı, turkuaz …) okunurluk: vurgu rengi yazıda/beyaz yazı zemininde %62 + siyah (WCAG AA ≥ 4.5) */
@supports (color: color-mix(in oklab, red, black)) {
    .mm { --mm-accent-ink: color-mix(in oklab, var(--mm-accent) 62%, #000); }
}
.mm h1, .mm h2, .mm h3 { font-family: var(--mm-font); letter-spacing: -0.01em; text-transform: none; }

/* Kapak + firma */
.mm-hero {
    background: linear-gradient(135deg, var(--mm-accent), var(--mm-accent-2));
    background-size: cover; background-position: center;
}
.mm-hero.has-cover { background-image: var(--mm-cover); }
.mm-hero {
    position: relative; color: #fff;
}
.mm-hero.has-cover::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.65) 100%);
}
.mm-hero-inner { position: relative; max-width: 720px; margin: 0 auto; padding: 28px 16px 22px; text-align: center; }
.mm-hero.has-cover .mm-hero-inner { padding-top: 96px; }
.mm-brand, .mm-brand:hover { color: #fff; text-decoration: none; display: inline-block; }
.mm-logo { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; background: #fff; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 6px 18px rgba(0,0,0,.25); display: block; margin: 0 auto 10px; }
.mm .mm-title { color: #fff; font-size: 24px; font-weight: 700; line-height: 1.2; margin: 0; }
.mm-title small { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.2); padding: 2px 10px; border-radius: 999px; }
.mm-title br { display: none; }
.mm-langs { margin-top: 12px; display: flex; justify-content: center; gap: 6px; }
.mm-lang { color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); text-decoration: none; }
.mm-lang:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.15); }
.mm-lang.is-active { background: #fff; color: var(--mm-text); border-color: #fff; }

.mm-main { max-width: 720px; margin: 0 auto; padding: 0 0 96px; }

.mm-info { background: var(--mm-surface); margin: 12px 12px 0; padding: 14px 16px; border-radius: var(--mm-radius); color: var(--mm-muted); font-size: 14px; }
.mm-info p { margin: 0 0 6px; line-height: 1.45; }
.mm-info p:last-child { margin-bottom: 0; }
.mm-notes { color: var(--mm-text); font-weight: 500; }
.mm-status:empty { display: none; }
.mm-status > .row, .mm-view > .row { margin-left: 0; margin-right: 0; } /* ortak bileşenlerin kapsayıcısız .row'u taşmasın */
.mm-status { padding: 0 12px; }

/* Yapışkan arama + çipler */
.mm-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(246,246,244,.92);
    -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
    padding: 10px 0 8px; border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.mm-nav.is-stuck { border-bottom-color: var(--mm-line); box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.mm-search { position: relative; margin: 0 12px 8px; }
.mm-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: var(--mm-muted); pointer-events: none; }
.mm-search input {
    width: 100%; height: 42px; border: 1px solid var(--mm-line); border-radius: 12px; background: var(--mm-surface);
    padding: 0 40px 0 38px; font-size: 16px; color: var(--mm-text); -webkit-appearance: none; appearance: none;
}
.mm-search input:focus { outline: none; border-color: var(--mm-accent); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.mm-search input::-webkit-search-cancel-button { display: none; }
.mm-search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--mm-muted); }
.mm-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 12px; scrollbar-width: none; scroll-behavior: smooth; }
.mm-chips::-webkit-scrollbar { display: none; }
.mm-chip {
    flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: var(--mm-surface); border: 1px solid var(--mm-line);
    color: var(--mm-text); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.mm-chip:hover { color: var(--mm-text); text-decoration: none; }
.mm-chip.is-active { background: var(--mm-accent-ink); border-color: var(--mm-accent-ink); color: #fff; }

/* Kategoriler ve ürün kartları */
.mm-group { padding: 18px 12px 4px; scroll-margin-top: var(--mm-nav-h); }
.mm .mm-group-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--mm-text); margin: 0 4px 10px; }
.mm-group-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.mm-list { display: grid; gap: 10px; }
.mm-card {
    position: relative; display: flex; gap: 12px; align-items: stretch;
    background: var(--mm-surface); border-radius: var(--mm-radius); padding: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
    -webkit-tap-highlight-color: transparent;
}
.mm-card:active { transform: scale(.99); }
.mm-card:focus-visible { outline: 2px solid var(--mm-accent); outline-offset: 2px; }
.mm-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mm .mm-card-title { font-size: 16px; font-weight: 650; line-height: 1.3; margin: 0 0 4px; color: var(--mm-text); }
.mm-card-desc {
    color: var(--mm-muted); font-size: 13.5px; line-height: 1.4; margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.mm-price { font-weight: 700; font-size: 16px; color: var(--mm-text); white-space: nowrap; }
.mm-card-media { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--mm-bg); align-self: center; }
.mm-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-card-cart { position: absolute; right: 10px; bottom: 8px; }
.mm-card-cart .btn { min-width: 36px; }
.mm-card:has(.mm-card-cart) .mm-card-body { padding-bottom: 34px; }
/* görselli kartta +/− görselin altında (görselin üstüne binmesin) */
.mm-card:has(.mm-card-cart):has(.mm-card-media) { padding-bottom: 54px; }
.mm-card:has(.mm-card-cart):has(.mm-card-media) .mm-card-media { align-self: flex-start; }
.mm-card:has(.mm-card-cart):has(.mm-card-media) .mm-card-body { padding-bottom: 0; }
.mm-card.is-hidden, .mm-group.is-hidden { display: none; }
.mm-noresult { text-align: center; color: var(--mm-muted); padding: 32px 16px; }

/* Seçenekler: kart görseli solda/üstte, kategori numaraları, noktalı fiyat çizgisi (varsayılan kapalı) */
.mm-card.media-left { flex-direction: row-reverse; }
.mm-card.media-top { flex-direction: column; }
.mm-card.media-top .mm-card-media { flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; align-self: stretch; order: -1; }
.mm-card-body .mm-price { margin-top: auto; }
.mm-leader { display: none; }
.mm-num { font-variant-numeric: tabular-nums; margin-right: .5em; opacity: .55; }
.mm-chip .mm-num { margin-right: .35em; }

/* Ürün paneli (alttan açılır) */
.mm-sheet { position: fixed; inset: 0; z-index: 1000; }
.mm-sheet[hidden] { display: none; }
.mm-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; }
.mm-sheet-panel {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--mm-surface); border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform .25s ease;
    max-width: 720px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom);
}
.mm-sheet.is-open .mm-sheet-backdrop { opacity: 1; }
.mm-sheet.is-open .mm-sheet-panel { transform: translateY(0); }
.mm-sheet-close {
    position: sticky; top: 10px; float: right; margin: 10px 10px -46px 0; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92);
    box-shadow: 0 2px 8px rgba(0,0,0,.2); font-size: 24px; line-height: 34px; color: var(--mm-text);
}
.mm-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--mm-bg); }
.mm-gallery::-webkit-scrollbar { display: none; }
.mm-gallery img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: start; display: block; }
.mm-gallery.is-multi img { flex-basis: 88%; }
.mm-pd { padding: 18px 18px 28px; }
.mm .mm-pd-title { font-size: 22px; font-weight: 700; margin: 0 48px 6px 0; color: var(--mm-text); line-height: 1.25; }
.mm-pd-price { font-size: 20px; font-weight: 700; color: var(--mm-accent-ink); margin-bottom: 12px; }
.mm-pd-desc { color: #3a3a3c; font-size: 15px; line-height: 1.5; }
.mm-pd-desc p { margin: 0 0 8px !important; }
.mm-pd-allergens { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.mm-allergen { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--mm-bg); padding: 4px 10px 4px 6px; border-radius: 999px; }
body.mm-lock { overflow: hidden; }

/* Ortak görünümler (sepet, hakkında, sonuç) */
.mm-view { background: var(--mm-surface); margin: 12px; border-radius: var(--mm-radius); padding: 4px 0; overflow: hidden; }

/* Alt bilgi */
.mm-footer { background: #1d1d1f; color: #d2d2d7; padding-top: 18px; }
.mm-footer a { color: #fff; }
.mm-footer .contact, .mm-footer .contact a { color: #d2d2d7 !important; font-size: 14px !important; }
.mm-footer-bar { background: #111; padding: 8px 0 88px; }


@media (min-width: 768px) {
    .mm-list { grid-template-columns: 1fr 1fr; }
    .mm-hero.has-cover .mm-hero-inner { padding-top: 140px; }
}
@media (prefers-reduced-motion: reduce) {
    .mm-sheet-panel, .mm-sheet-backdrop, .mm-card { transition: none; }
    .mm-chips { scroll-behavior: auto; }
}
