/* ==========================================================================
   Kİ - müşteri sayfaları (menü, sipariş takibi, hesabım)
   Renk ve yazı ki.css token'larından gelir. Süs yok: gradyan, bulanık
   cam, renkli parıltı, sırayla beliren içerik kullanılmaz. Hareket yalnızca
   bir işe yarıyorsa var: alt sayfanın açılması, sepete eklenen ürünün
   şeride gitmesi, seçili kategorinin göstergesi, sipariş ilerlemesi.
   ========================================================================== */

body.km {
    /* Çini şeridi: tabelaların alt kenarındaki eşkenar dörtgen dizisi (yeşil zemin üstüne açık) */
    --cini: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M8 1.2 12.6 5 8 8.8 3.4 5z' fill='none' stroke='%23fff' stroke-opacity='.6' stroke-width='1.1'/%3E%3Ccircle cx='8' cy='5' r='1.3' fill='%23fff' fill-opacity='.75'/%3E%3Ccircle cx='0' cy='5' r='.9' fill='%23fff' fill-opacity='.45'/%3E%3Ccircle cx='16' cy='5' r='.9' fill='%23fff' fill-opacity='.45'/%3E%3C/svg%3E");
    /* Fiyat kartonu zemini: tentenin açık şeridiyle aynı ton */
    --karton: var(--accent-acik);
    --mini-h: 54px;
    --wrap: 680px;
    --sheet-ease: cubic-bezier(.32, .72, 0, 1);
    font-size: 15px;
}
:where(body.km) :where(button, input, textarea) { font-family: inherit; color: inherit; }
:where(body.km) :where(button) { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(body.km) :where(a) { -webkit-tap-highlight-color: transparent; }
body.km { overflow-x: clip; }
body.km.km-lock { overflow: hidden; }
body.km [hidden] { display: none !important; }

.km-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* --------------------------------------------------------------------------
   Restoran başlığı
   -------------------------------------------------------------------------- */
/* Restoranın tabelası gibi: marka yeşili blok, altında tente */
.km-hero { position: relative; padding: 12px 0 34px; background: var(--accent); color: #fff; }
/* Vitrin tabelasının alt kenarı: çini şeridi, hemen altında tente sarkar */
.km-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 10px; height: 10px; background: var(--cini) center / 16px 10px repeat-x; }
.km-tente { margin-bottom: 4px; }
.km-hero-top { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 40px; }
.km-icon-btn {
    height: 38px; min-width: 38px; padding: 0 11px; border-radius: var(--r-sm);
    border: 1px solid rgba(255, 255, 255, .28); background: transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 13.5px; font-weight: 500; color: #fff;
}
.km-icon-btn .km-acc-name { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.km-icon-btn.is-in { background: rgba(255, 255, 255, .14); }

.km-lang { position: relative; }
.km-lang-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 600; min-width: 150px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2); padding: 4px;
    display: none;
}
.km-lang-menu.open { display: block; }
.km-lang-menu a { color: var(--ink-2);
    display: flex; align-items: center; justify-content: space-between; padding: 11px 12px;
    border-radius: var(--r-sm); color: var(--ink-2); font-size: 14.5px;
}
.km-lang-menu a.active { color: var(--accent); font-weight: 600; }

.km-brand { display: flex; align-items: center; gap: 14px; padding: 6px 0 0; }
.km-logo {
    width: 60px; height: 60px; flex-shrink: 0; border-radius: var(--r-lg); overflow: hidden;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.km-logo img { width: 100%; height: 100%; object-fit: cover; }
.km-logo-mono {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--accent); font-size: 22px; font-weight: 800; letter-spacing: -.02em;
}
.km-brand-text { min-width: 0; }
.km-name { font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; }
.km-desc { margin-top: 4px; color: rgba(255, 255, 255, .82); font-size: 14px; line-height: 1.5; }
.km-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.km-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-sm);
    font-size: 13px; font-weight: 500; background: rgba(255, 255, 255, .14); color: #fff;
}
.km-pill i { font-size: 11px; color: rgba(255, 255, 255, .7); }

/* Arama */
.km-search { position: relative; margin-top: 16px; }
.km-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; pointer-events: none; }
.km-search input {
    width: 100%; height: 46px; border-radius: var(--r); border: none; background: #fff;
    padding: 0 42px; font-size: 16px; outline: none; -webkit-appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
.km-search input::placeholder { color: var(--ink-3); }
.km-search input:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.km-search input::-webkit-search-cancel-button { display: none; }
.km-search-clear {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: none;
    border-radius: var(--r-sm); background: transparent; color: var(--ink-3); display: none; align-items: center; justify-content: center;
}
.km-search-clear.visible { display: flex; }

.km-notice {
    margin-top: 14px; display: flex; gap: 10px; align-items: flex-start;
    background: rgba(255, 255, 255, .12); color: #fff; border-radius: var(--r); padding: 11px 13px; font-size: 13.5px; line-height: 1.5;
}
.km-notice i { margin-top: 3px; }

/* --------------------------------------------------------------------------
   Küçük üst şerit (başlık kaydırılınca görünür)
   -------------------------------------------------------------------------- */
.km-mini {
    position: fixed; top: 0; left: 0; right: 0; z-index: 300; height: var(--mini-h);
    background: var(--accent); color: #fff;
    transform: translateY(-100%); transition: transform .2s var(--ease);
}
.km-mini .km-wrap { height: 100%; display: flex; align-items: center; gap: 10px; }
.km-mini-logo { width: 30px; height: 30px; border-radius: var(--r-sm); overflow: hidden; flex-shrink: 0; }
.km-mini-logo img { width: 100%; height: 100%; object-fit: cover; }
.km-mini-logo .km-logo-mono { font-size: 12px; }
.km-mini-name { flex: 1; min-width: 0; font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.km-mini-search { width: 36px; height: 36px; border-radius: var(--r-sm); border: none; background: rgba(255, 255, 255, .14); color: #fff; }
body.km-scrolled .km-mini { transform: none; }

/* --------------------------------------------------------------------------
   Kategori şeridi
   -------------------------------------------------------------------------- */
.km-cats { position: sticky; top: 0; z-index: 200; background: var(--bg); border-bottom: 1px solid var(--line); transition: top .2s var(--ease); }
body.km-scrolled .km-cats { top: var(--mini-h); }
.km-cats-track { position: relative; display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.km-cats-track::-webkit-scrollbar { display: none; }
.km-chip {
    position: relative; z-index: 1; flex-shrink: 0; height: 36px; padding: 0 13px; border: none; border-radius: var(--r-sm);
    background: transparent; color: var(--ink-2); font-size: 14.5px; font-weight: 500; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 7px; transition: color .15s;
}
.km-chip i { font-size: 12px; color: var(--ink-3); }
.km-chip.active { color: #fff; }
.km-chip.active i { color: rgba(255, 255, 255, .75); }
/* Seçili kategorinin zemini: kaydırdıkça bir sonrakine kayar */
.km-chip-ink {
    position: absolute; z-index: 0; top: 8px; left: 0; height: 36px; width: 60px; border-radius: var(--r-sm);
    background: var(--ink); transition: transform .25s var(--ease), width .25s var(--ease);
}

/* --------------------------------------------------------------------------
   Bölümler
   -------------------------------------------------------------------------- */
.km-body { padding-top: 4px; padding-bottom: 130px; }
.km-section { padding-top: 22px; }
.km-section-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; }
.km-section-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.km-section-count { font-size: 13px; color: var(--ink-3); }
.km-section-desc { margin: -4px 0 12px; color: var(--ink-3); font-size: 14px; }

/* Esnaf tabelası: kategori başlığı yeşil levha. Üstte iki vida, altta çini şeridi;
   levha ürün listesinin üstüne oturur. */
.km-sign {
    position: relative; display: block; margin: 0; padding: 15px 20px 26px;
    background-color: var(--accent); color: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0;
    background-image:
        radial-gradient(circle at 10px 10px, rgba(255, 255, 255, .5) 0 1.8px, rgba(0, 0, 0, .22) 2.3px, transparent 2.9px),
        radial-gradient(circle at calc(100% - 10px) 10px, rgba(255, 255, 255, .5) 0 1.8px, rgba(0, 0, 0, .22) 2.3px, transparent 2.9px);
}
.km-sign::after { content: ''; position: absolute; left: 0; right: 0; bottom: 8px; height: 10px; background: var(--cini) center / 16px 10px repeat-x; }
.km-sign-row { display: flex; align-items: baseline; gap: 10px; }
.km-sign .km-section-title { color: #fff; font-size: 21px; line-height: 1.2; }
.km-sign .km-section-count { margin-left: auto; flex-shrink: 0; color: rgba(255, 255, 255, .75); font-size: 13px; font-weight: 500; }
.km-sign .km-section-desc { margin: 3px 0 0; color: rgba(255, 255, 255, .82); font-size: 13.5px; }
.km-sign + .km-list { border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.km-feat .km-sign { border-radius: var(--r-lg); margin-bottom: 12px; padding-bottom: 24px; }

/* Öne çıkanlar: görselli yatay şerit */
.km-feat { padding-top: 18px; }
.km-feat-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.km-feat-track::-webkit-scrollbar { display: none; }
.km-feat-card {
    flex: 0 0 200px; scroll-snap-align: start; scroll-margin-left: 16px; background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
    border: 1px solid var(--line); text-align: left; padding: 0;
}
.km-feat-card .km-thumb { width: 100%; height: 130px; border-radius: 0; }
.km-feat-info { padding: 10px 12px 12px; }
.km-feat-name { font-weight: 500; font-size: 14.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.km-feat-price { margin-top: 6px; font-size: 14px; }

/* --------------------------------------------------------------------------
   Ürün satırı
   -------------------------------------------------------------------------- */
.km-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.km-card { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px; cursor: pointer; }
.km-card + .km-card { border-top: 1px solid var(--line); }
.km-card:active { background: var(--surface-2); }
.km-card.is-out { cursor: default; }
.km-card.is-out .km-card-name, .km-card.is-out .km-price { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.km-card.is-out .km-thumb img { filter: grayscale(1); opacity: .6; }
.km-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* Ad uzunsa alt satıra geçer; noktalı çizgi ve fiyat son satırla hizalanır */
.km-card-line { display: flex; align-items: flex-end; gap: 6px; }
.km-card-name { flex: 0 1 auto; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
/* Basılı menüdeki noktalı çizgi */
.km-lead { flex: 1 0 18px; border-bottom: 2px dotted var(--line-2); margin-bottom: 10px; }
.km-card-desc {
    margin-top: 3px; color: var(--ink-3); font-size: 14px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Fiyat kartonu: ucu sivri, delikli etiket; noktalı çizgi ipi gibi ona bağlanır */
.km-price, .km-feat-price, .km-detail-price {
    display: inline-block; flex-shrink: 0; white-space: nowrap; align-self: flex-end;
    padding: 3px 10px 3px 17px; background-color: var(--karton); color: var(--accent);
    font-size: 15px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.45;
    background-image: radial-gradient(circle at 9px 50%, var(--surface) 0 2.1px, transparent 2.6px);
    -webkit-clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
            clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}
.km-card.is-out .km-price { background-color: var(--surface-2); }
.km-badge { font-size: 12.5px; font-weight: 500; color: var(--accent); margin-bottom: 2px; }
.km-out { align-self: flex-start; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--danger); }

.km-card-media { position: relative; flex-shrink: 0; width: 96px; }
.km-thumb {
    position: relative; width: 96px; height: 96px; border-radius: var(--r); overflow: hidden;
    background: var(--surface-2); display: flex; align-items: center; justify-content: center;
}
.km-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.km-thumb-ph { font-size: 22px; color: var(--ink-3); opacity: .55; }

/* Sepete ekle: görselin altına oturan düğme, adet seçince sayaca döner */
.km-qty { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); display: flex; }
.km-add {
    height: 32px; min-width: 64px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface);
    color: var(--accent); font-size: 13.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.km-add:active { background: var(--surface-2); }
.km-stepper {
    display: flex; align-items: center; height: 32px; border-radius: var(--r-sm);
    background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.km-step { width: 30px; height: 32px; border: none; background: transparent; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.km-step-count { min-width: 18px; text-align: center; font-weight: 600; font-size: 14px; display: inline-block; }

.km-empty { text-align: center; padding: 48px 20px 20px; color: var(--ink-3); display: none; }
.km-empty.visible { display: block; }
.km-empty-ic { font-size: 26px; margin-bottom: 10px; opacity: .45; }
.km-empty b { display: block; color: var(--ink-2); font-size: 16px; font-weight: 600; margin-bottom: 4px; }

/* --------------------------------------------------------------------------
   Sepet şeridi
   -------------------------------------------------------------------------- */
.km-cartbar {
    position: fixed; z-index: 350; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
    width: calc(100% - 28px); max-width: calc(var(--wrap) - 28px);
    height: 56px; border: none; border-radius: var(--r); padding: 0 16px;
    background: var(--accent); color: #fff; display: flex; align-items: center; gap: 12px;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35);
    transform: translate(-50%, 160%); transition: transform .25s var(--ease);
}
.km-cartbar.visible { transform: translate(-50%, 0); }
.km-cartbar.bump { animation: km-bar-bump .3s var(--ease); }
@keyframes km-bar-bump { 50% { transform: translate(-50%, -3px); } }
.km-cart-count {
    min-width: 26px; height: 26px; padding: 0 7px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .2);
    display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.km-cart-label { flex: 1; text-align: left; font-weight: 600; font-size: 15.5px; }
.km-cart-label small { display: none; }
.km-cart-total { font-weight: 600; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.km-cart-go { display: none; }

/* Eklenen ürün sepet şeridine gider */
.km-fly { position: fixed; z-index: 900; left: 0; top: 0; pointer-events: none; }
.km-fly-dot { width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: var(--accent) center / cover no-repeat; border: 2px solid #fff; }

/* --------------------------------------------------------------------------
   Alt sayfalar
   -------------------------------------------------------------------------- */
.km-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; transition: opacity .25s; }
.km-overlay.open { opacity: 1; pointer-events: auto; }
.km-sheet {
    position: fixed; z-index: 500; left: 50%; bottom: 0; width: 100%; max-width: var(--wrap);
    max-height: 92vh; max-height: 92dvh; background: var(--surface); border-radius: 14px 14px 0 0;
    display: flex; flex-direction: column; overflow: hidden;
    transform: translate(-50%, 105%); transition: transform .35s var(--sheet-ease);
}
.km-sheet.open { transform: translate(-50%, 0); }
.km-sheet.dragging { transition: none; }
.km-grab { padding: 8px 0 0; touch-action: none; flex-shrink: 0; }
.km-grab::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto; }
.km-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 10px; flex-shrink: 0; touch-action: none; border-bottom: 1px solid var(--line); }
.km-sheet-head h3 { font-size: 18px; font-weight: 600; }
.km-close {
    width: 36px; height: 36px; border-radius: var(--r-sm); border: none; background: var(--surface-2); color: var(--ink-2);
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.km-sheet-body { overflow-y: auto; flex: 1; padding: 14px 18px 18px; overscroll-behavior: contain; }
.km-sheet-foot { flex-shrink: 0; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

/* Ürün detayı */
.km-detail .km-sheet-body { padding-top: 0; }
.km-detail .km-detail-media { position: relative; margin: 0 -18px; }
.km-detail .km-thumb { width: 100%; height: 240px; border-radius: 0; }
.km-detail .km-thumb-ph { font-size: 40px; }
.km-detail .km-grab { position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: 30px; }
.km-detail .km-grab::before { background: rgba(255, 255, 255, .85); }
.km-detail .km-close { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(255, 255, 255, .92); }
.km-detail-body { padding-top: 16px; }
.km-detail-name { font-size: 21px; line-height: 1.25; font-weight: 700; }
.km-detail-desc { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.km-detail-price { margin-top: 12px; font-size: 18px; padding: 4px 12px 4px 19px; }
.km-detail-foot { display: flex; gap: 10px; align-items: center; }
.km-stepper-lg { display: flex; align-items: center; height: 48px; border-radius: var(--r); border: 1px solid var(--line-2); flex-shrink: 0; }
.km-stepper-lg button { width: 42px; height: 46px; border: none; background: transparent; font-size: 12px; color: var(--ink); }
.km-stepper-lg span { min-width: 20px; text-align: center; font-weight: 600; font-size: 16px; display: inline-block; }

/* Form ve düğmeler */
.km-field { margin-bottom: 14px; }
.km-label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.km-label span { color: var(--ink-3); font-weight: 400; }
.km-input {
    width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r); padding: 12px 13px;
    font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none;
}
.km-input::placeholder { color: var(--ink-3); }
.km-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
textarea.km-input { resize: vertical; min-height: 84px; line-height: 1.5; }

.km-btn {
    width: 100%; height: 50px; border: none; border-radius: var(--r);
    display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15.5px; font-weight: 600;
    text-decoration: none; transition: background .15s, opacity .15s;
}
.km-btn:disabled { opacity: .5; cursor: not-allowed; }
.km-btn-primary { background: var(--accent); color: #fff; }
.km-btn-primary:active { background: var(--accent-2); }
.km-btn-dark { background: var(--ink); color: #fff; }
.km-btn-soft { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.km-btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(180, 35, 24, .3); }
.km-btn .km-btn-sub { font-weight: 500; opacity: .85; font-variant-numeric: tabular-nums; }
.km-spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: km-spin .7s linear infinite; }
@keyframes km-spin { to { transform: rotate(360deg); } }

/* Sepet */
.km-cart-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; }
.km-cart-item + .km-cart-item { border-top: 1px solid var(--line); }
.km-cart-item .km-thumb { width: 52px; height: 52px; border-radius: var(--r-sm); flex-shrink: 0; }
.km-cart-item .km-thumb-ph { font-size: 15px; }
.km-cart-info { flex: 1; min-width: 0; }
.km-cart-name { font-weight: 500; font-size: 15px; line-height: 1.3; }
.km-cart-unit { font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.km-cart-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.km-cart-sub { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.km-mini-stepper { display: flex; align-items: center; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line-2); }
.km-mini-stepper button { width: 32px; height: 30px; border: none; background: transparent; font-size: 10px; color: var(--ink); }
.km-mini-stepper span { min-width: 18px; text-align: center; font-weight: 600; font-size: 14px; }
.km-note-btn { margin-top: 4px; background: none; border: none; padding: 2px 0; font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; max-width: 100%; text-align: left; }
.km-note-btn.filled { color: var(--ink-2); }
.km-note-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.km-note-input { width: 100%; margin-top: 8px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 9px 11px; font-size: 16px; outline: none; }
.km-note-input:focus { border-color: var(--accent); }
.km-remove { width: 32px; height: 32px; border-radius: var(--r-sm); border: none; background: transparent; color: var(--ink-3); font-size: 13px; flex-shrink: 0; }
.km-remove:active { color: var(--danger); }
.km-cart-item.leaving { opacity: .3; transition: opacity .2s; }
.km-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.km-total-row span { color: var(--ink-2); }
.km-total-row strong { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }

/* Hesap sekmeleri */
.km-seg { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.km-seg button { flex: none; height: 42px; margin-right: 20px; border: none; border-bottom: 2px solid transparent; background: transparent; font-weight: 500; font-size: 15px; color: var(--ink-3); }
.km-seg button.on { color: var(--ink); border-bottom-color: var(--accent); }
.km-seg-ink { display: none; }
.km-msg { border-radius: var(--r); padding: 10px 13px; font-size: 14px; margin-bottom: 14px; }
.km-msg.err { background: var(--danger-bg); color: var(--danger); }
.km-msg.ok { background: var(--success-bg); color: var(--success); }
.km-profile { display: flex; align-items: center; gap: 12px; padding: 2px 0 16px; }
.km-avatar {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; color: var(--ink-2); font-weight: 600; font-size: 18px;
    background: var(--surface-2); display: flex; align-items: center; justify-content: center;
}
.km-profile-name { font-weight: 600; font-size: 16px; }
.km-profile-mail { color: var(--ink-3); font-size: 13.5px; }
.km-link-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; margin-bottom: 14px; }
.km-link-row i:first-child { color: var(--ink-3); width: 18px; text-align: center; }
.km-link-row i:last-child { margin-left: auto; color: var(--ink-3); font-size: 12px; }

/* Bildirim */
.km-toast {
    position: fixed; z-index: 1000; left: 50%; top: calc(12px + env(safe-area-inset-top)); max-width: calc(100% - 32px);
    background: var(--ink); color: #fff; border-radius: var(--r); padding: 11px 15px; font-size: 14px;
    display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-pop);
    transform: translate(-50%, -160%); visibility: hidden; transition: transform .25s var(--ease), visibility .25s;
}
.km-toast.show { transform: translate(-50%, 0); visibility: visible; }
.km-toast.err i { color: #ff9b85; }

/* --------------------------------------------------------------------------
   Sipariş takibi
   -------------------------------------------------------------------------- */
.km-top { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--line); }
.km-top .km-wrap { height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.km-back { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: 15px; }
.km-back i { font-size: 14px; color: var(--ink-2); }

.os-page { padding-top: 16px; padding-bottom: 48px; }
.os-hero { padding: 6px 0 18px; }
.os-mark { width: 52px; height: 52px; margin-bottom: 14px; }
.os-mark svg { width: 52px; height: 52px; display: block; }
.os-mark .c { fill: var(--success); }
.os-mark .k { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: os-draw .4s .15s var(--ease) forwards; }
@keyframes os-draw { to { stroke-dashoffset: 0; } }
.os-hero.is-cancelled .c { fill: var(--danger); }
.os-hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.os-hero p { margin-top: 6px; max-width: 460px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.os-num { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.os-num b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.os-card { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.os-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.os-card-head h2 { font-size: 16px; font-weight: 600; }
.os-fisno { text-align: right; font-size: 12.5px; color: var(--ink-3); line-height: 1.1; }
.os-fisno b { display: block; font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.os-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; }
.os-chip.s-pending   { background: var(--warning-bg); color: var(--warning); }
.os-chip.s-confirmed { background: var(--info-bg); color: var(--info); }
.os-chip.s-preparing { background: var(--primary-bg); color: var(--primary); }
.os-chip.s-ready, .os-chip.s-delivered { background: var(--success-bg); color: var(--success); }
.os-chip.s-cancelled { background: var(--danger-bg); color: var(--danger); }

.os-steps { position: relative; }
.os-track { position: absolute; left: 13px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.os-track i { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--p, 0) * 100%); background: var(--success); transition: height .6s var(--ease); }
.os-step { position: relative; display: flex; align-items: center; gap: 14px; height: 48px; }
.os-dot {
    position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: var(--surface); border: 2px solid var(--line-2); color: transparent; display: flex; align-items: center; justify-content: center; font-size: 11px;
    transition: background .3s, border-color .3s, color .3s;
}
.os-step.done .os-dot { background: var(--success); border-color: var(--success); color: #fff; }
.os-step.current .os-dot { background: var(--surface); border-color: var(--success); color: var(--success); }
.os-step.current.is-final .os-dot { background: var(--success); color: #fff; }
.os-step-title { font-weight: 500; font-size: 15px; color: var(--ink-3); }
.os-step.done .os-step-title { color: var(--ink); }
.os-step.current .os-step-title { font-weight: 600; }
.os-step-time { font-size: 13px; color: var(--ink-3); }
.os-steps.is-cancelled { opacity: .45; }

.os-line { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.os-line + .os-line { border-top: 1px solid var(--line); }
.os-qty { min-width: 28px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); padding-top: 1px; }
.os-line-name { flex: 1; min-width: 0; font-size: 15px; line-height: 1.4; }
.os-line-note { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.os-line-price { font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.os-sum { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.os-sum span { color: var(--ink-2); }
.os-sum strong { font-size: 19px; font-weight: 800; color: var(--accent); }
.os-info { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 14px; font-size: 14px; }
.os-info small { display: block; color: var(--ink-3); font-size: 13px; }
.os-info b { font-weight: 500; }
.os-note { margin-top: 12px; background: var(--surface-2); color: var(--ink-2); border-radius: var(--r); padding: 10px 12px; font-size: 14px; display: flex; gap: 10px; }
.os-note i { color: var(--ink-3); margin-top: 3px; }
.os-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

/* --------------------------------------------------------------------------
   Hesabım
   -------------------------------------------------------------------------- */
.ac-hero { display: flex; align-items: center; gap: 14px; padding: 6px 0 16px; }
.ac-hero .km-avatar { width: 52px; height: 52px; font-size: 20px; }
.ac-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.ac-stat { padding: 14px 12px; }
.ac-stat + .ac-stat { border-left: 1px solid var(--line); }
.ac-stat b { display: block; font-size: 19px; font-weight: 600; color: var(--ink); }
.ac-stat small { font-size: 13px; color: var(--ink-3); }
.ac-title { font-size: 17px; font-weight: 600; margin: 24px 0 10px; }
.ac-order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 8px; overflow: hidden; }
.ac-head { width: 100%; border: none; background: none; text-align: left; padding: 13px 14px; display: flex; align-items: center; gap: 12px; }
.ac-head-main { flex: 1; min-width: 0; }
.ac-rest { font-weight: 600; font-size: 15px; }
.ac-meta { font-size: 13px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ac-total { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.ac-chev { color: var(--ink-3); font-size: 12px; transition: transform .2s; }
.ac-order.open .ac-chev { transform: rotate(180deg); }
.ac-body { display: none; }
.ac-order.open .ac-body { display: block; }
.ac-inner { padding: 0 14px 12px; }
.ac-line { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ac-line span:first-child { flex: 1; }
.ac-line .q { color: var(--ink-3); }
.ac-line .p { font-weight: 500; }
.ac-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 500; font-size: 14px; color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
    body.km *, body.km *::before, body.km *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (min-width: 720px) { .km-name { font-size: 28px; } }
@media print { .km-top, .os-actions { display: none !important; } }

/* --------------------------------------------------------------------------
   İçindekiler: müşteri istemediği malzemeye dokunur, not yazmaz.
   Çıkarılan malzeme üstü çizili ve çarpılı görünür; mutfağa "Çıkarılacak" gider.
   -------------------------------------------------------------------------- */
.km-malz { margin-top: 18px; }
.km-malz-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.km-malz-head .km-label { margin-bottom: 0; }
.km-malz-hint { font-size: 12.5px; color: var(--ink-3); }
.km-malz-list { display: flex; flex-wrap: wrap; gap: 8px; }
.km-malz-chip {
    min-height: 38px; padding: 0 13px; border-radius: var(--r-sm);
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
    font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px;
}
span.km-malz-chip { min-height: 32px; color: var(--ink-2); font-weight: 400; }
.km-malz-chip.off {
    background: var(--danger-bg); border-color: rgba(180, 35, 24, .3); color: var(--danger);
    text-decoration: line-through; text-decoration-thickness: 1.5px;
}
.km-malz-chip.off i { font-size: 12px; }
.km-cikar { margin-top: 3px; font-size: 13px; color: var(--danger); display: flex; gap: 6px; align-items: baseline; }
.km-cikar i { font-size: 11px; }

/* Sepet ve sipariş aynı ekranda */
.km-sheet-sub { font-size: 13.5px; font-weight: 500; color: var(--ink-3); margin-inline-start: 6px; }
.km-checkout { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.km-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); margin: -4px 0 12px; cursor: pointer; }
.km-check input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Sağdan sola (Arapça). Akış kendiliğinden döner; burada yalnızca
   fiziksel konum verilmiş parçalar aynalanır.
   -------------------------------------------------------------------------- */
[dir="rtl"] .km-lang-menu { right: auto; left: 0; }
[dir="rtl"] .km-search > i { left: auto; right: 14px; }
[dir="rtl"] .km-search-clear { right: auto; left: 5px; }
[dir="rtl"] .km-sign .km-section-count { margin-left: 0; margin-right: auto; }
[dir="rtl"] .km-feat-card, [dir="rtl"] .km-cart-label, [dir="rtl"] .km-note-btn, [dir="rtl"] .ac-head { text-align: right; }
[dir="rtl"] .km-feat-card { scroll-margin-left: 0; scroll-margin-right: 16px; }
[dir="rtl"] .km-detail .km-close { right: auto; left: 12px; }
[dir="rtl"] .km-seg button { margin-right: 0; margin-left: 20px; }
[dir="rtl"] .km-link-row i:last-child { margin-left: 0; margin-right: auto; transform: scaleX(-1); }
[dir="rtl"] .km-back i { transform: scaleX(-1); }
[dir="rtl"] .os-track { left: auto; right: 13px; }
[dir="rtl"] .os-fisno { text-align: left; }
[dir="rtl"] .ac-stat + .ac-stat { border-left: none; border-right: 1px solid var(--line); }
[dir="rtl"] .km-price, [dir="rtl"] .km-cart-sub, [dir="rtl"] .km-cart-total, [dir="rtl"] .km-total-row strong { direction: ltr; unicode-bidi: isolate; }

/* Kalori: işletme girdiyse kartta ve detayda küçük, sakin bir satır */
.km-kalori { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.km-kalori i { font-size: 11px; }
.km-detail-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.km-detail-meta .km-detail-price { margin-top: 0; }
.km-kalori-lg { margin-top: 0; font-size: 14px; color: var(--ink-2); }
.km-kalori-lg small { font-size: 12.5px; color: var(--ink-3); }

/* Masa değişti şeridi (menü başlığında ve sipariş takibinde) */
.km-masa-notice b { display: block; color: #fff; font-weight: 600; }
.km-masa-notice a { color: #fff; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; opacity: .85; }
.os-masa-notice { margin: 0 0 12px; }
.km-toast:not(.err) i { display: none; }

.km-gizlilik { text-align: center; padding: 26px 0 100px; font-size: 13px; }
.km-gizlilik a, .km-metin a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.km-metin { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.km-metin h1 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 8px 0 6px; }
.km-metin h2 { font-size: 16.5px; font-weight: 600; color: var(--ink); margin: 22px 0 6px; }
.km-metin ul { padding-inline-start: 20px; display: grid; gap: 4px; }
.ac-sil { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.ac-sil summary { cursor: pointer; font-size: 14px; color: var(--ink-3); min-height: 36px; }
.ac-sil p { font-size: 14px; color: var(--ink-2); margin: 6px 0 12px; line-height: 1.5; }
