:root {
  --button-color: #3dbfb3;
  --page: #eaf2f8;
  --ink: #202830;
  --muted: #6b747d;
  --line: #d9e1e7;
  --white: #fff;
  --danger: #ff4d4d;
  --shadow: 0 4px 12px rgba(31, 46, 58, .12);
  --radius: 7px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.closed-banner {
  position: relative;
  z-index: 1100;
  padding: 10px 16px;
  color: #714f00;
  background: #fff3cd;
  border-bottom: 1px solid #ecd88c;
  text-align: center;
  font-weight: 700;
}

.popup-container {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  background: var(--banner) center/cover no-repeat, #2a353c;
  transition: opacity .25s, visibility .25s;
}
.popup-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.55) 100%);
}
.popup-container.closed { opacity: 0; visibility: hidden; pointer-events: none; }
.popup-content {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  padding: 18px 16px 20px;
  background: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.popup-logo {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  margin: -78px auto 12px;
  overflow: hidden;
  color: var(--button-color);
  background: #fff;
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  font-size: 40px;
}
.popup-logo img { width: 100%; height: 100%; object-fit: cover; }
.popup-content h1 { margin: 4px 0 2px; font-size: 22px; color: #202830; }
.popup-content p { margin: 0 0 12px; color: #6b747d; font-size: 14px; }
.popup-content select {
  width: 100%;
  height: 42px;
  margin-bottom: 10px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.primary-button {
  min-height: 44px;
  padding: 10px 16px;
  color: #fff;
  background: var(--button-color);
  border: 0;
  border-radius: 5px;
  font-weight: 700;
}
.popup-content .primary-button { width: 100%; }
.primary-button:disabled { background: #9ba8ad; cursor: not-allowed; }
.popup-socials { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.popup-socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--button-color);
  border-radius: 50%;
  text-decoration: none;
  font-size: 17px;
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 195px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(rgba(0, 0, 0, .16), rgba(0, 0, 0, .25)), var(--banner) center/cover no-repeat, #445d68;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .14);
}
.logo {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  overflow: hidden;
  color: var(--button-color);
  background: #fff;
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
  font-size: 42px;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.cart-button {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: var(--button-color);
  border: 0;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  font-size: 18px;
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: #87939a;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.cart-badge.has-items { background: var(--danger); }
.table-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(30, 38, 43, .78);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

main { width: min(100%, 1120px); margin: 0 auto; padding-bottom: 90px; }
.category-scroll-wrapper {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
  padding: 12px 10px 6px;
}
.category-scroll {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.category-arrow {
  width: 34px;
  height: 56px;
  color: #53616a;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.category-card {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  color: #3a454c;
  background: #fff;
  border: 1px solid #cfd8de;
  border-radius: 4px;
}
.category-card span {
  display: inline-flex;
  color: var(--button-color);
  font-size: 14px;
}
.category-card b {
  display: block;
  max-width: 140px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-card.active { color: #fff; background: var(--button-color); border-color: var(--button-color); }
.category-card.active span { color: #fff; }
.category-section { padding: 4px 12px 12px; }
.category-section h2 {
  margin: 12px 0 10px;
  padding-left: 9px;
  border-left: 4px solid var(--button-color);
  font-size: 18px;
}
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d5dde3;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(31, 46, 58, .08);
}
.card-image {
  position: relative;
  display: grid;
  place-items: center;
  height: 175px;
  overflow: hidden;
  color: #83bdb7;
  background: #dfecea;
  font-size: 38px;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.price-tag {
  position: absolute;
  top: 10px;
  right: 0;
  padding: 8px 12px;
  color: #fff;
  background: rgba(38, 42, 44, .88);
  border-radius: 6px 0 0 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
  font-size: 15px;
  font-weight: 800;
}
.card-body { display: flex; flex-direction: column; min-height: 172px; padding: 11px; }
.card-body h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.3; }
.card-body p {
  display: -webkit-box;
  min-height: 38px;
  margin: 0 0 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.card-body small { margin-bottom: 9px; color: #7c868c; font-size: 11px; }
.card-body small i { color: #e97f45; }
.add-button {
  width: 100%;
  min-height: 38px;
  margin-top: auto;
  color: #fff;
  background: var(--button-color);
  border: 0;
  border-radius: 5px;
  font-weight: 700;
}

/* ---- Kart üzeri adet kontrolü ---- */
.card-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  margin-top: auto;
  padding: 3px;
  background: #edf6f5;
  border: 1px solid var(--button-color);
  border-radius: 5px;
}
.card-qty button {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #fff;
  background: var(--button-color);
  border: 0;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.card-qty b { min-width: 20px; text-align: center; font-size: 15px; }

/* ---- Izgara sütunları (2 / 3) ---- */
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---- Sürekli akış: kategoriye kaydırırken üst boşluk ---- */
.category-section { scroll-margin-top: 12px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(20, 28, 33, .62);
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 910;
  width: min(calc(100% - 24px), 580px);
  max-height: calc(100vh - 28px);
  padding: 18px;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  transform: translate(-50%, -50%);
}
.cart-modal {
  display: flex;
  flex-direction: column;
  width: min(calc(100% - 16px), 640px);
  max-height: min(92vh, 760px);
  padding: 0;
  overflow: hidden;
}
.cart-modal .modal-head { padding: 14px 16px 10px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.cart-body { flex: 1 1 auto; padding: 12px 16px; overflow-y: auto; }
.cart-footer {
  flex: 0 0 auto;
  padding: 10px 16px 14px;
  background: #f7fafb;
  border-top: 1px solid var(--line);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-head button {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  color: #4e5960;
  background: #edf1f3;
  border: 0;
  border-radius: 5px;
  font-size: 25px;
}
.modal-image {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: min(48vh, 360px);
  overflow: hidden;
  color: #83bdb7;
  background: #dfefed;
  border-radius: 6px;
  font-size: 45px;
}
.modal-image img,
.modal-image video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #111;
}
.product-modal > p { margin: 12px 0 4px; color: var(--muted); line-height: 1.5; }
.product-modal > small { color: #778087; }
.option-groups fieldset { margin: 16px 0 0; padding: 0; border: 0; }
.option-groups legend { margin-bottom: 8px; font-weight: 800; }
.option-groups fieldset > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.option-groups label { position: relative; }
.option-groups input { position: absolute; opacity: 0; }
.option-groups label span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
}
.option-groups input:checked + span { color: #197c73; background: #e8f8f6; border-color: var(--button-color); }
.option-groups label b { white-space: nowrap; }
.selected-box { margin: 14px 0 8px; padding: 10px; background: #f4f7f8; border-radius: 6px; font-size: 12px; }
.selected-box > b { display: block; margin-bottom: 5px; }
#selectedExtras { display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); }
#selectedExtras span { padding: 4px 6px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.price-breakdown { border-top: 1px solid var(--line); }
.price-breakdown div { display: flex; justify-content: space-between; padding: 7px 2px; }
.price-breakdown div:last-child { color: #147a72; border-top: 1px solid var(--line); font-size: 16px; }
.modal-actions { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-top: 10px; }
.quantity { display: flex; align-items: center; gap: 7px; }
.quantity button {
  width: 31px;
  height: 31px;
  color: var(--ink);
  background: #edf1f3;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.cancel-button {
  min-height: 44px;
  padding: 9px 14px;
  color: #4e5960;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 700;
}

.service-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px;
  background: #eef3f6;
  border-radius: 8px;
}
.service-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 8px;
  color: #5a656d;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  transition: .15s ease;
}
.service-tabs button i { font-size: 15px; }
.service-tabs button.active {
  color: #fff;
  background: var(--button-color);
  box-shadow: 0 2px 8px rgba(61, 191, 179, .35);
}
.service-pane { display: none; margin-bottom: 12px; }
.service-pane.active { display: block; }
.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 10px;
  color: #0f5f58;
  background: #e7f7f5;
  border: 1px solid #c9ebe6;
  border-radius: 6px;
  font-size: 12px;
}
.delivery-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  color: #334047;
  background: linear-gradient(135deg, #eef8f7, #f5f8fa);
  border: 1px solid #d5e7e4;
  border-radius: 7px;
}
.delivery-banner i { margin-top: 2px; color: var(--button-color); font-size: 16px; }
.delivery-banner b { display: block; margin-bottom: 2px; font-size: 13px; }
.delivery-banner small { color: var(--muted); font-size: 11px; }
.input-group { display: flex; gap: 0; }
.input-group input { border-radius: 5px 0 0 5px !important; }
.input-group .clear-input {
  flex: 0 0 42px;
  color: #5a656d;
  background: #edf1f3;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 5px 5px 0;
}
.field-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 0;
  color: #6b747d;
  font-size: 11px;
  line-height: 1.4;
}
.field-hint i { margin-top: 2px; color: var(--button-color); }
.order-details {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.modal label { display: grid; gap: 5px; margin-bottom: 8px; color: #424c53; font-size: 12px; font-weight: 700; }
.modal input, .modal select, .modal textarea {
  width: 100%;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  resize: vertical;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--button-color); box-shadow: 0 0 0 3px rgba(61,191,179,.15); }
.modal input[readonly] { color: #667178; background: #edf1f3; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 0 4px; }
.cart-items { max-height: 180px; overflow-y: auto; margin: 0 0 10px; }
.cart-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e4eaee;
}
.cart-thumb {
  width: 48px;
  height: 48px;
  overflow: hidden;
  background: #e8f0f0;
  border-radius: 6px;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-meta { display: grid; gap: 2px; min-width: 0; }
.cart-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cart-item small { min-height: 13px; color: var(--muted); font-size: 11px; }
.cart-item span { color: #147a72; font-weight: 700; font-size: 13px; }
.empty {
  padding: 18px 12px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #d5dde3;
  border-radius: 7px;
  text-align: center;
  font-size: 13px;
}
.empty i { margin-bottom: 6px; color: #9aa7af; font-size: 22px; }
.cart-checkout-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.cart-total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 8px 10px;
  background: #e8f6f4;
  border-radius: 6px;
  font-size: 12px;
}
.cart-total b { color: #147a72; font-size: 18px; }
.cart-checkout-bar .primary-button { min-width: 160px; white-space: nowrap; }

.fabs {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.fab {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  color: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .24);
  text-decoration: none;
  font-size: 20px;
}
.waiter-fab { background: var(--button-color); }
.whatsapp-fab { background: #25d366; }
.waiter-wrap { position: relative; }
.waiter-actions {
  position: absolute;
  right: 58px;
  bottom: 0;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.waiter-actions button { padding: 9px 11px; color: var(--ink); background: #f2f5f6; border: 0; border-radius: 5px; white-space: nowrap; }
.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--bq-dock-h, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 8700;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px 12px;
  color: #58636a;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  font-size: 11px;
  box-sizing: border-box;
}
.cookie-banner button { padding: 7px 10px; color: #fff; background: var(--button-color); border: 0; border-radius: 5px; font-weight: 700; }
.toast {
  position: fixed;
  top: calc(var(--bq-chrome-h, 52px) + 10px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 9800;
  max-width: calc(100% - 28px);
  padding: 11px 15px;
  color: #fff;
  background: rgba(32, 40, 48, .96);
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -15px);
  transition: .2s;
  font: 700 13px/1.35 system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .navbar { height: 185px; }
  .logo { width: 118px; height: 118px; }
  .card-grid, .card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .card-image { height: 145px; }
  .card-body { min-height: 165px; padding: 9px; }
  .category-card { flex-basis: 96px; }
}
@media (max-width: 480px) {
  .category-scroll-wrapper { grid-template-columns: 28px minmax(0, 1fr) 28px; padding-inline: 6px; }
  .category-arrow { width: 28px; }
  .category-section { padding-inline: 8px; }
  .card-image { height: 128px; }
  .price-tag { top: 8px; padding: 6px 8px; font-size: 12px; }
  .card-body h3 { font-size: 13px; }
  .card-body p { font-size: 11px; }
  .add-button { font-size: 12px; }
  .card-grid.cols-3 .card-image { height: 96px; }
  .card-grid.cols-3 .card-body { min-height: 0; padding: 6px; }
  .card-grid.cols-3 .card-body h3 { font-size: 11px; }
  .card-grid.cols-3 .card-body p { display: none; }
  .card-grid.cols-3 .price-tag { top: 5px; padding: 4px 5px; font-size: 10px; }
  .card-grid.cols-3 .add-button { min-height: 32px; font-size: 10px; }
  .card-grid.cols-3 .card-qty { min-height: 32px; gap: 2px; }
  .card-grid.cols-3 .card-qty button { flex-basis: 26px; width: 26px; height: 26px; }
  .modal { padding: 14px; }
  .modal-image { max-height: min(42vh, 300px); }
  .option-groups fieldset > div, .form-grid { grid-template-columns: 1fr; }
  .modal-actions { grid-template-columns: auto 1fr; }
  .modal-actions .cancel-button { grid-column: 1 / -1; }
  .cart-checkout-bar { grid-template-columns: 1fr; }
  .cart-checkout-bar .primary-button { width: 100%; }
  .service-tabs button { flex-direction: column; gap: 4px; font-size: 12px; }
  .service-tabs button span { line-height: 1.2; }
}

/* ---- Kazı Kazan modal ---- */
.scratch-hint{margin:0 0 12px;color:#5a656d;font-size:13px;line-height:1.5}
.scratch-card{position:relative;width:100%;max-width:300px;aspect-ratio:2/1;margin:0 auto 12px;border-radius:10px;overflow:hidden;background:#fff7e0;border:2px dashed #f0b43c}
.scratch-prize{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px;text-align:center;color:#202830}
.scratch-prize b{font-size:17px;line-height:1.25}
.scratch-prize code{padding:4px 10px;background:#202830;color:#ffd666;border-radius:5px;font-size:15px;letter-spacing:.08em;user-select:all}
#scratchCanvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair;transition:opacity .5s}
#scratchCanvas.revealed{opacity:0;pointer-events:none}
.scratch-actions{display:flex;justify-content:center}
#scratchStart{width:100%}
