/* ==========================================================================
   SAHNE KARS — Dijital QR Menü
   Basılı menü kartının zarafeti, uygulama konforunda.
   Yazılım & Tasarım: MTR TEKNİK — Mete ERCAN
   ========================================================================== */
:root {
    --ivory: #F6F1E9; --ivory-2: #EFE7DA; --paper: #FBF8F3; --sand: #E4D8C4;
    --ink: #16120F; --ink-2: #211B16; --wine: #5B1621; --wine-deep: #2A0B11;
    --red: #B3202E; --gold: #B48C55; --gold-2: #D9BE8D; --muted: #6F655B; --muted-l: #B9AD9E;
    --line: rgba(30, 25, 21, .1); --green: #2F7D57; --amber: #C98A1B;
    --fd: 'Cormorant Garamond', 'Times New Roman', serif; --fb: 'Jost', system-ui, sans-serif;
    --ease: cubic-bezier(.22, .8, .25, 1);
    --dock-h: 74px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { font-family: var(--fb); background: var(--ivory); color: #1E1915; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) {
    .status-stack { margin: 0 !important; }
    body { background: radial-gradient(900px 600px at 50% -10%, #3a1018, var(--ink) 70%); background-attachment: fixed; }
    .qr-hero, .qr-nav, .qr-main, .status-stack { max-width: 640px; margin-left: auto; margin-right: auto; }
    .qr-main { background: var(--ivory); box-shadow: 0 40px 120px rgba(0, 0, 0, .5); }
    .qr-nav { box-shadow: none; }
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Hero */
.qr-hero {
    position: relative; overflow: hidden; color: var(--ivory); text-align: center; padding: 34px 20px 30px;
    background: radial-gradient(500px 260px at 90% 0%, rgba(209, 47, 61, .35), transparent 60%), linear-gradient(160deg, var(--wine), var(--wine-deep) 75%);
}
.qr-hero::before { content: ''; position: absolute; inset: 0; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23D9BE8D'%3E%3Cpath d='M28 3 L53 28 L28 53 L3 28Z'/%3E%3Cpath d='M28 15 L41 28 L28 41 L15 28Z'/%3E%3C/g%3E%3C/svg%3E"); }
.qr-hero-inner { position: relative; z-index: 1; }
.qr-logo-img { height: 54px; width: auto; margin: 0 auto 16px; }
.qr-greet { font-family: var(--fd); font-style: italic; font-size: 1.5rem; color: var(--gold-2); }
.qr-table-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 18px; border-radius: 99px; background: rgba(246, 241, 233, .1); border: 1px solid rgba(217, 190, 141, .3); font-size: .82rem; letter-spacing: .06em; }
.qr-table-chip strong { font-size: 1.05rem; color: #fff; }
.qr-table-chip span { color: var(--muted-l); }
.qr-table-chip i { color: var(--gold-2); }
.qr-table-chip.muted { font-size: .76rem; color: var(--muted-l); }
.qr-sprig { position: absolute; right: -10px; bottom: -30px; width: 90px; opacity: .14; transform: rotate(14deg); }

/* Durum şeridi */
.status-stack { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--dock-h) + 20px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 560px !important; z-index: 70; display: grid; gap: 8px; }
.st {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #fff; font-size: .86rem;
    background: var(--ink-2); border-radius: 18px; box-shadow: 0 14px 34px -8px rgba(0, 0, 0, .45); animation: slideUp .45s var(--ease);
}
.st .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: rgba(217, 190, 141, .14); color: var(--gold-2); }
.st.new .ic { animation: pulse 1.6s infinite; }
.st.seen { background: #1E3A2C; }
.st.seen .ic { background: rgba(255, 255, 255, .12); color: #9BE3BC; }
.st.done { background: var(--green); }
.st.done .ic { background: rgba(255, 255, 255, .18); color: #fff; }
.st .tx { flex: 1; line-height: 1.3; }
.st .tx b { display: block; font-weight: 500; }
.st .tx small { color: rgba(255, 255, 255, .65); font-size: .74rem; }
.st .steps { display: flex; gap: 4px; }
.st .steps i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .2); }
.st .steps i.on { background: var(--gold-2); }
.st.seen .steps i.on, .st.done .steps i.on { background: #9BE3BC; }
.st .x { width: 30px; height: 30px; color: rgba(255, 255, 255, .6); font-size: 1rem; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 190, 141, .5); } 70% { box-shadow: 0 0 0 12px rgba(217, 190, 141, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 190, 141, 0); } }

/* Sekmeler */
.qr-nav { position: sticky; top: 0; z-index: 50; background: rgba(246, 241, 233, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); display: flex; align-items: center; box-shadow: 0 8px 24px -18px rgba(0, 0, 0, .4); }
.qr-search-btn { width: 54px; height: 54px; flex-shrink: 0; color: var(--gold); font-size: 1rem; border-right: 1px solid var(--line); }
.qr-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 9px 12px; scroll-behavior: smooth; }
.qr-tabs::-webkit-scrollbar { display: none; }
.qr-tab { flex-shrink: 0; padding: 9px 15px; border-radius: 99px; font-size: .74rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: all .3s var(--ease); }
.qr-tab.active { background: var(--ink); color: var(--ivory); }
.qr-search { display: none; flex: 1; align-items: center; gap: 10px; padding: 0 8px 0 4px; }
.qr-search i { color: var(--gold); }
.qr-search input { flex: 1; border: 0; background: transparent; outline: none; font: inherit; padding: 16px 0; font-size: 1rem; }
.qr-search button { width: 40px; height: 40px; color: var(--muted); }
.qr-nav.searching .qr-tabs, .qr-nav.searching .qr-search-btn { display: none; }
.qr-nav.searching .qr-search { display: flex; }

/* Bölümler */
.qr-main { padding: 6px 0 0; }
.qr-sec { padding: 28px 16px 10px; }
.qr-sec-head { text-align: center; margin-bottom: 20px; }
.qr-eyebrow { font-size: .64rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--red); }
.qr-sec-head h2 { font-family: var(--fd); font-weight: 500; font-size: 2.1rem; line-height: 1.1; margin: 4px 0 6px; }
.qr-sec-head p { color: var(--muted); font-size: .85rem; max-width: 420px; margin: 0 auto; font-weight: 300; }
.qr-sec-head::after { content: '✦'; display: block; color: var(--gold); font-size: .7rem; margin-top: 10px; }

.tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .6rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; background: rgba(180, 140, 85, .14); color: #8A6A3A; }

/* Fix menü kartı */
.fx { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 14px; margin-bottom: 14px; box-shadow: 0 2px 10px rgba(30, 20, 10, .04); position: relative; overflow: hidden; }
.fx::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.fx-head { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.fx-no { width: 52px; height: 52px; border-radius: 14px; background: var(--ink); color: var(--ivory); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.fx-no span { font-size: .44rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.fx-no b { font-family: var(--fd); font-size: 1.55rem; font-weight: 600; }
.fx-title h3 { font-family: var(--fd); font-size: 1.28rem; font-weight: 600; line-height: 1.12; margin-bottom: 4px; }
.fx-price { font-family: var(--fd); font-size: 1.35rem; font-weight: 700; color: var(--red); white-space: nowrap; }
.fx-courses { margin-top: 12px; border-top: 1px dashed var(--line); }
.fx-courses summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 2px 2px; font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.fx-courses summary::-webkit-details-marker { display: none; }
.fx-courses summary i { transition: transform .3s var(--ease); color: var(--gold); }
.fx-courses[open] summary i { transform: rotate(180deg); }
.fx-courses ul { list-style: none; margin-top: 6px; }
.fx-courses li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .86rem; }
.fx-courses li b { font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--red); font-weight: 600; padding-top: 3px; }
.fx-courses li.main span { font-weight: 600; }
.fx-desc { color: var(--muted); font-size: .82rem; font-weight: 300; margin-top: 10px; font-style: italic; }
.fx-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; }
.link-btn { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 0; }
.link-btn i { color: var(--gold); }
.link-btn.center { display: flex; margin: 10px auto 0; }

/* A la carte liste */
.dl { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.dl-item { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.dl-item:last-child { border-bottom: 0; }
.dl-img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.dl-body { flex: 1; min-width: 0; }
.dl-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.dl-row h4 { font-family: var(--fd); font-size: 1.2rem; font-weight: 600; line-height: 1.15; }
.dl-price { font-family: var(--fd); font-size: 1.2rem; font-weight: 700; color: var(--red); white-space: nowrap; }
.dl-body p { color: var(--muted); font-size: .82rem; font-weight: 300; margin-top: 4px; }
.dl-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.dl-meta .prep { font-size: .72rem; color: var(--muted); }
.dl-meta .prep i { color: var(--gold); }
.dl-meta .stepper { margin-left: auto; }

/* Adet seçici */
.stepper { display: inline-flex; align-items: center; height: 38px; border-radius: 99px; background: var(--ink); color: var(--ivory); overflow: hidden; }
.stepper button { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ivory); font-size: .8rem; }
.stepper .q { min-width: 22px; text-align: center; font-weight: 600; font-size: .9rem; }
.stepper.zero { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.stepper.zero button { color: var(--ink); width: auto; padding: 0 16px; gap: 6px; display: inline-flex; font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.no-table .stepper, body.no-order .stepper { display: none; }

.qr-empty { display: none; text-align: center; padding: 50px 20px; color: var(--muted); }
.qr-empty i { font-size: 1.8rem; color: var(--gold); margin-bottom: 10px; }

.qr-footer { text-align: center; padding: 40px 20px 30px; color: var(--muted); font-size: .8rem; }
.qr-foot-sprig { width: 40px; margin: 0 auto 14px; opacity: .5; }
.qr-footer p { margin-bottom: 4px; }
.qr-footer .small { font-size: .7rem; margin: 10px 0 18px; }
.mtr-credit { display: inline-flex; gap: 6px; align-items: center; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); font-size: .66rem; color: var(--muted); cursor: default; }
.mtr-credit span { text-transform: uppercase; letter-spacing: .12em; font-size: .56rem; }
.mtr-credit strong { color: var(--red); letter-spacing: .14em; }
.mtr-credit em { font-style: normal; color: #1E1915; }

/* Dock */
.dock {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 80;
    width: calc(100% - 24px); max-width: 560px; height: var(--dock-h); padding: 8px;
    display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 8px;
    background: rgba(22, 18, 15, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 24px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.dock-btn { border-radius: 17px; color: var(--ivory); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; position: relative; transition: background .25s; }
.dock-btn i { font-size: 1.15rem; color: var(--gold-2); }
.dock-btn:active { background: rgba(255, 255, 255, .08); }
.dock-cart { background: var(--red); flex-direction: row; gap: 10px; }
.dock-cart i { color: #fff; }
.dock-cart em { font-style: normal; min-width: 22px; height: 22px; border-radius: 11px; background: #fff; color: var(--red); display: grid; place-items: center; font-size: .72rem; letter-spacing: 0; padding: 0 6px; }
.dock-cart b { display: none; font-family: var(--fd); font-size: 1.05rem; letter-spacing: 0; text-transform: none; }
.dock-cart.has b { display: inline; }
.dock-cart.has span { display: none; }
.dock-cart.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); } }
.no-table .dock-cart { background: var(--ink-2); }
.no-table .dock-cart em { display: none; }

/* Bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(22, 18, 15, .55); backdrop-filter: blur(3px); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .35s; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
    position: fixed; left: 50%; bottom: 0; z-index: 100; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
    background: var(--paper); border-radius: 26px 26px 0 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
    transform: translate(-50%, 105%); transition: transform .45s var(--ease); box-shadow: 0 -20px 60px rgba(0, 0, 0, .3);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--sand); margin: 0 auto 16px; }
.sheet h3 { font-family: var(--fd); font-size: 1.75rem; font-weight: 500; text-align: center; line-height: 1.15; }
.sheet-sub { text-align: center; color: var(--muted); font-size: .84rem; margin: 6px auto 18px; max-width: 380px; font-weight: 300; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.opt { padding: 16px 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--ivory); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .8rem; font-weight: 500; transition: all .25s var(--ease); }
.opt i { font-size: 1.3rem; color: var(--gold); }
.opt.active { border-color: var(--ink); background: var(--ink); color: var(--ivory); }
.opt.active i { color: var(--gold-2); }
.sheet-input { width: 100%; border: 1px solid var(--line); background: var(--ivory); border-radius: 14px; padding: 13px 14px; font: inherit; font-size: .9rem; resize: none; outline: none; margin-bottom: 14px; }
.sheet-input:focus { border-color: var(--gold); }
.sheet-cta { width: 100%; height: 56px; border-radius: 16px; background: var(--ink); color: var(--ivory); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .2s, opacity .2s; }
.sheet-cta.red { background: var(--red); }
.sheet-cta:active { transform: scale(.98); }
.sheet-cta[disabled] { opacity: .5; pointer-events: none; }
.nt-icon { width: 70px; height: 70px; border-radius: 50%; background: var(--ink); color: var(--gold-2); display: grid; place-items: center; font-size: 1.8rem; margin: 6px auto 14px; }
.card-img { width: 100%; border-radius: 12px; margin-top: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }

.cart-list { display: grid; gap: 0; margin-bottom: 14px; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-row b { font-family: var(--fd); font-size: 1.1rem; font-weight: 600; line-height: 1.15; display: block; }
.cart-row small { color: var(--muted); font-size: .76rem; }
.cart-empty { text-align: center; color: var(--muted); padding: 20px 0 10px; display: none; }
.cart-empty i { font-size: 1.8rem; color: var(--gold); margin-bottom: 8px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; padding: 4px 2px; }
.cart-total span { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cart-total b { font-family: var(--fd); font-size: 1.9rem; color: var(--red); }

/* Toast */
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -20px); z-index: 120; background: var(--ink); color: var(--ivory); padding: 13px 18px; border-radius: 14px; font-size: .86rem; max-width: calc(100% - 32px); width: max-content; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: all .35s var(--ease); display: flex; gap: 10px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
