/* assets/css/menu.css */
:root {
  --accent: #84cc16;
  --accent-ink: #111827;
  --coral: #f97316;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body.device-shell {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.touch-target {
  min-width: 44px;
  min-height: 44px;
}

/* Üst Başlık ve Hero */
.top-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.status-dot {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-dot.is-open {
  background: color-mix(in srgb, var(--accent) 22%, #ffffff);
  color: #1a2e05;
}

.status-dot.is-closed {
  background: #fee2e2;
  color: var(--danger);
}

.table-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn,
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.lang-switch {
  padding: 0 12px;
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.hero-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 112px;
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.72) 100%);
  color: #ffffff;
  padding: 16px;
}

.hero-overlay p,
.hero-strip p {
  margin: 0 auto;
  max-width: 1180px;
  font-size: 0.9rem;
}

.hero-strip {
  background: var(--surface-muted);
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}

.closed-notice {
  background: #fef2f2;
  color: #991b1b;
  border-bottom: 1px solid #fecaca;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Ana Konteyner ve Arama */
.menu-container,
.detail-container,
.bill-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 16px 24px;
}

.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.search-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 42px 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.clear-btn {
  position: absolute;
  right: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

/* Kampanyalar */
.campaigns-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.campaigns-strip::-webkit-scrollbar {
  display: none;
}

.campaign-card {
  flex: 0 0 270px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.camp-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--coral) 16%, #ffffff);
  color: #9a3412;
  margin-bottom: 6px;
}

.campaign-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.campaign-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Yatay Kategoriler */
.category-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-scroller::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.cat-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Ürün Izgarası (Mobil 1, Tablet 2, Masaüstü 3 Sütun) */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:active {
  transform: scale(0.99);
}

.product-card.is-sold-out {
  opacity: 0.72;
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-muted);
  cursor: pointer;
  overflow: hidden;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--coral);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.fav-btn.is-fav {
  background: var(--coral);
  color: #ffffff;
}

.sold-out-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.product-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.product-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.price-box {
  text-align: right;
  flex-shrink: 0;
}

.old-price {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  text-decoration: line-through;
}

.current-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--coral);
}

.product-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
}

.chip-chef {
  background: color-mix(in srgb, var(--accent) 24%, #ffffff);
  color: #1a2e05;
}

.chip-allergen {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Butonlar ve Form Alanları */
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 0;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.primary-btn {
  background: var(--accent);
  color: var(--accent-ink);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-btn {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.link-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--coral);
}

/* Sepet Paneli */
.cart-drawer-panel,
.bill-summary-card,
.empty-card,
.order-card,
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cart-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-weight: 700;
  cursor: pointer;
}

.cart-note-box {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-note-box input,
.option-group input[type="text"],
.feedback-form input,
.feedback-form select,
.feedback-form textarea,
.modal-sheet textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.cart-total-row,
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.total-row {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 1.05rem;
}

.feedback-msg {
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Detay ve Hesabım Sayfaları */
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-topbar h1 {
  margin: 0;
  font-size: 1.2rem;
}

.back-link {
  font-weight: 700;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .detail-card {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 24px;
    padding: 22px;
  }
}

.detail-media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-muted);
}

.detail-media img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
}

.detail-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 768px) {
  .detail-header-row {
    margin-top: 0;
  }
}

.detail-header-row h1 {
  margin: 0;
  font-size: 1.35rem;
}

.option-group {
  margin: 14px 0;
}

.option-group h2,
.info-block h2 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  cursor: pointer;
}

.removable-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 0.82rem;
  cursor: pointer;
}

.bill-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 600px) {
  .bill-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.orders-timeline {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
}

.order-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-item-list li {
  padding: 6px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-note {
  width: 100%;
  color: var(--muted);
}

.cancel-reason {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 600;
}

/* Sabit Alt Menü (İçeriği Kapatmaz) */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.nav-item {
  position: relative;
  min-height: 48px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.nav-item.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, #ffffff);
}

.nav-icon {
  font-size: 1.05rem;
}

.cart-badge {
  position: absolute;
  top: 3px;
  right: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--coral);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Modallar */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop[hidden] {
  display: none;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 16px;
  }
}

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-md);
}

@media (min-width: 640px) {
  .modal-sheet {
    border-radius: var(--radius-lg);
    padding: 22px;
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  cursor: pointer;
}

.call-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0;
}

.call-choice {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.call-choice.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}