/* ==========================================================================
   Online sipariş (order-page), sipariş takibi (track-page) ve kurye paneli (courier-page).
   Sipariş sayfası menu.css üzerine kurulur ve işletmenin --m-* değişkenlerini kullanır.
   Takip ve kurye sayfaları menu.css yüklemez; aşağıdaki varsayılan değerleri kullanır.
   ========================================================================== */

.track-page, .courier-page {
  --m-primary: #1F3D33; --m-on-primary: #fff; --m-accent: #C8873A; --m-bg: #F5F3EE; --m-surface: #fff;
  --m-surface-2: #F0EDE6; --m-text: #1D211F; --m-muted: #6B706C; --m-border: #E3DFD6; --m-radius: 16px; --m-radius-sm: 10px;
  margin: 0; background: var(--m-bg); color: var(--m-text);
  font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased;
}
.track-page *, .courier-page * { box-sizing: border-box; }
.track-page h1, .track-page h2, .courier-page h1, .courier-page h2 { margin: 0; line-height: 1.25; }
.track-page p, .courier-page p { margin: 0; }

/* ------------------------------------------------------------ sipariş sayfası */
.order-page .o-item-btn { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; padding: 0; font: inherit; color: inherit; display: flex; }
.order-page .m-item-link.o-item-btn { padding: inherit; }
.order-page .o-item-btn:disabled { cursor: not-allowed; }
.order-page .m-item.is-soldout { opacity: .55; }
.o-add-ico {
  margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--m-primary); color: var(--m-on-primary); font-size: 20px; font-weight: 600; line-height: 1;
}
.o-info { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 14px 16px 4px; }
.o-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--m-surface); border: 1px solid var(--m-border); color: var(--m-text);
}
.o-chip.is-open { color: #146C43; border-color: #B7E1C9; background: #EEF8F2; }
.o-chip.is-closed { color: #9A3412; border-color: #F5C9B3; background: #FDF1EA; }
.o-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.o-notice { margin: 10px 16px 0; padding: 10px 14px; border-radius: var(--m-radius-sm); background: var(--m-surface); border: 1px solid var(--m-border); font-size: 13.5px; text-align: center; }
.o-notice-warn { background: #FDF3E1; border-color: #F1D9AE; color: #6E3C02; }
.o-main { padding-bottom: 24px; }
body.has-cart .o-footer-space { padding-bottom: 96px; }
.o-subtitle { margin: 18px 0 8px; font-size: 15px; }
.o-hours { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.o-hours li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--m-border); }

.o-cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--m-bg) 92%, transparent) 30%); }
.o-cartbar-btn {
  width: 100%; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; cursor: pointer;
  border-radius: var(--m-radius); background: var(--m-primary); color: var(--m-on-primary); font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}
.o-cartbar-btn strong { margin-left: auto; }
.o-cartbar-count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-size: 13px; }

.o-sheet .m-sheet-inner { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.o-groups { display: grid; gap: 14px; margin: 16px 0; }
.o-group { margin: 0; padding: 12px 14px; border: 1px solid var(--m-border); border-radius: var(--m-radius-sm); background: var(--m-surface); }
.o-group legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 0 4px; font-weight: 700; }
.o-group legend small { font-weight: 600; font-size: 12px; color: var(--m-muted); }
.o-group legend small.is-required { color: #B45309; }
.o-option { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px dashed var(--m-border); cursor: pointer; }
.o-option:last-child { border-bottom: 0; }
.o-option input { width: 20px; height: 20px; accent-color: var(--m-primary); flex-shrink: 0; }
.o-option-name { flex: 1; }
.o-option-price { font-size: 13.5px; font-weight: 600; color: var(--m-muted); }
.o-option.is-off { opacity: .5; cursor: not-allowed; }
.o-field { display: grid; gap: 6px; margin-top: 12px; font-size: 13.5px; font-weight: 600; }
.o-field small { font-weight: 500; color: var(--m-muted); }
.o-field.has-error .o-input, .o-check.has-error, .o-radio-list.has-error { border-color: #DC2626; }
.o-field-error { color: #B91C1C !important; font-weight: 600 !important; }
.o-input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--m-radius-sm); border: 1.5px solid var(--m-border);
  background: var(--m-surface); color: var(--m-text); font: inherit; font-weight: 500; outline: none; -webkit-appearance: none; appearance: none;
}
select.o-input { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea.o-input { resize: vertical; min-height: 64px; }
.o-input:focus { border-color: var(--m-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-accent) 22%, transparent); }
.o-sheet-foot { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; margin-top: 16px; padding-top: 12px; background: var(--m-surface); }
.o-qty { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; border: 1.5px solid var(--m-border); background: var(--m-surface); }
.o-qty-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--m-surface-2); font-size: 20px; font-weight: 700; cursor: pointer; line-height: 1; }
.o-qty-sm .o-qty-btn { width: 30px; height: 30px; font-size: 17px; }
.o-qty-value { min-width: 26px; text-align: center; font-weight: 700; }
.o-add-btn, .o-wide { flex: 1; justify-content: center; min-height: 50px; }
.o-wide { width: 100%; margin-top: 16px; }
.o-error { margin-top: 12px; padding: 10px 12px; border-radius: var(--m-radius-sm); background: #FEF2F2; color: #991B1B; font-size: 13.5px; font-weight: 600; }
.o-warn { margin-top: 8px; color: #9A3412; font-size: 13.5px; font-weight: 600; }
.o-lines { list-style: none; margin: 16px 0 0; padding: 0; }
.o-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--m-border); }
.o-line-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.o-line-main small { color: var(--m-muted); font-size: 12.5px; }
.o-line-note { font-style: italic; }
.o-line-side { display: grid; justify-items: end; gap: 6px; }
.o-line-price { font-weight: 700; }
.o-link { justify-self: start; padding: 2px 0; border: 0; background: none; color: var(--m-accent); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: underline; }
.o-center { display: block; margin: 12px auto 0; }
.o-sum { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.o-sum-total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--m-border); font-size: 17px; }
.o-form { display: grid; gap: 4px; margin-top: 12px; }
.o-seg { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--m-surface-2); }
.o-seg-item { flex: 1; position: relative; }
.o-seg-item input { position: absolute; opacity: 0; inset: 0; }
.o-seg-item span { display: block; padding: 10px 8px; text-align: center; border-radius: 999px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.o-seg-item input:checked + span { background: var(--m-primary); color: var(--m-on-primary); }
.o-seg-item input:focus-visible + span { outline: 2px solid var(--m-accent); }
.o-block { margin-top: 10px; padding-top: 4px; }
.o-label { margin-top: 12px; font-weight: 700; font-size: 14px; }
.o-radio-list { display: grid; gap: 8px; margin-top: 8px; border: 1.5px solid transparent; border-radius: var(--m-radius-sm); }
.o-radio, .o-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--m-radius-sm); border: 1.5px solid var(--m-border); background: var(--m-surface); cursor: pointer; font-size: 14px; }
.o-radio input, .o-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--m-primary); flex-shrink: 0; }
.o-check { margin-top: 14px; font-size: 12.5px; color: var(--m-muted); }
.o-summary { margin-top: 14px; padding: 12px 14px; border-radius: var(--m-radius-sm); background: var(--m-surface-2); }
.o-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.m-btn.is-loading { opacity: .7; }
.m-toast[data-type="success"] { background: #146C43; color: #fff; }

/* ------------------------------------------------------------ takip ve kurye ortak */
.t-wrap, .k-wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; display: grid; gap: 14px; }
.t-card { padding: 18px; border-radius: var(--m-radius); background: var(--m-surface); border: 1px solid var(--m-border); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); display: grid; gap: 10px; }
.t-card h2 { font-size: 17px; }
.t-loading { place-items: center; min-height: 160px; color: var(--m-muted); }
.t-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--m-border); border-top-color: var(--m-primary); animation: t-spin .8s linear infinite; }
@keyframes t-spin { to { transform: rotate(360deg); } }
.t-head { display: flex; gap: 14px; align-items: center; }
.t-head h1 { font-size: 22px; }
.t-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--m-border); }
.t-muted { color: var(--m-muted); font-size: 13px; }
.t-center { text-align: center; }
.t-failed { border-color: #F5C9B3; background: #FDF6F2; }
.t-failed h2 { color: #9A3412; }
.t-eta { padding: 10px 12px; border-radius: var(--m-radius-sm); background: var(--m-surface-2); font-weight: 600; }
.t-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; }
.t-step { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 0 9px 2px; color: var(--m-muted); }
.t-step::before { content: ''; position: absolute; left: 10px; top: 28px; bottom: -10px; width: 2px; background: var(--m-border); }
.t-step:last-child::before { display: none; }
.t-step-dot { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--m-border); background: var(--m-surface); flex-shrink: 0; }
.t-step.is-done { color: var(--m-text); }
.t-step.is-done .t-step-dot { background: var(--m-primary); border-color: var(--m-primary); }
.t-step.is-done::before { background: var(--m-primary); }
.t-step.is-current { color: var(--m-text); font-weight: 700; }
.t-step.is-current .t-step-dot { border-color: var(--m-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--m-primary) 20%, transparent); animation: t-pulse 1.6s ease-in-out infinite; }
@keyframes t-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--m-primary) 8%, transparent); } }
.t-step-label { flex: 1; }
.t-step time { font-size: 12.5px; color: var(--m-muted); font-weight: 500; }
.t-items { list-style: none; margin: 0; padding: 0; }
.t-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--m-border); }
.t-items li div { display: grid; gap: 2px; }
.t-items small { color: var(--m-muted); font-size: 12.5px; }
.t-sum { display: flex; justify-content: space-between; font-size: 14px; }
.t-total { padding-top: 8px; border-top: 1px solid var(--m-border); font-size: 16px; }
.t-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.t-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 0; background: var(--m-primary); color: var(--m-on-primary); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.t-btn:disabled { opacity: .6; cursor: not-allowed; }
.t-btn-ghost { background: var(--m-surface); color: var(--m-text); border: 1.5px solid var(--m-border); }
.t-btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.t-wide { width: 100%; }
.track-page .o-field, .courier-page .o-field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; }
.track-page .o-input, .courier-page .o-input { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--m-radius-sm); border: 1.5px solid var(--m-border); background: var(--m-surface); font: inherit; outline: none; }
.courier-page .o-input:focus { border-color: var(--m-primary); }
.courier-page .o-error { padding: 10px 12px; border-radius: var(--m-radius-sm); background: #FEF2F2; color: #991B1B; font-size: 13.5px; font-weight: 600; }

/* ------------------------------------------------------------ kurye paneli */
.k-login { margin-top: 8vh; gap: 14px; }
.k-login h1 { font-size: 24px; }
.k-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--m-radius); background: var(--m-primary); color: var(--m-on-primary); }
.k-top div { display: grid; }
.k-top small { opacity: .8; }
.k-top .t-btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.k-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--m-surface-2); }
.k-tab { flex: 1; min-height: 42px; border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 700; color: var(--m-muted); cursor: pointer; }
.k-tab.is-active { background: var(--m-surface); color: var(--m-text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.k-list { display: grid; gap: 12px; }
.k-order { padding: 16px; border-radius: var(--m-radius); background: var(--m-surface); border: 1px solid var(--m-border); border-left: 5px solid var(--m-border); display: grid; gap: 8px; }
.k-order.is-ready { border-left-color: #D97706; }
.k-order.is-picked_up, .k-order.is-on_the_way { border-left-color: #2563EB; }
.k-order.is-delivered { border-left-color: #16A34A; }
.k-order-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.k-badge { padding: 4px 10px; border-radius: 999px; background: var(--m-surface-2); font-size: 12px; font-weight: 700; }
.k-name { font-weight: 700; font-size: 16px; }
.k-address { font-size: 15px; }
.k-note { padding: 8px 10px; border-radius: var(--m-radius-sm); background: #FFFBEB; color: #78350F; font-size: 13.5px; }
.k-items { margin: 0; padding-left: 18px; font-size: 14px; color: var(--m-muted); }
.k-pay { font-size: 14.5px; }
.k-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.k-actions .t-btn { flex: 1; min-width: 140px; }
