/* =========================
   QR SİPARİŞ — FINAL STYLE.CSS
   (Borderlı Kartlar + Masa No Görünür + Sabit Header)
   ========================= */

:root {
  /* --- Renk Paleti --- */
  --primary: #0f766e;         /* Zümrüt Yeşili (Ana Renk) */
  --primary-dark: #134e4a;    /* Koyu Tonu */
  --accent: #f59e0b;          /* Altın Sarısı (Vurgu) */
  
  --text-main: #1e293b;       /* Koyu Lacivert/Siyah */
  --text-muted: #64748b;      /* Gri Yazılar */
  --danger: #ef4444;
  
  --border-color: #cbd5e1;    /* Kart Kenarlıkları için Gri */
  
  --radius: 12px;
}

/* --- Temel Ayarlar --- */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text-main);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  
  /* Header sabit olduğu için içeriği aşağı itiyoruz */
  padding-top: 135px; 
  
  /* --- ARKA PLAN --- */
  background: linear-gradient(135deg, #0f766e 0%, #0f172a 100%);
  background-attachment: fixed;
  background-size: cover;
}

/* =========================================
   HEADER VE KATEGORİ NAVİGASYONU (SABİT)
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  
  /* Modern Blur Efekti */
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  border-bottom: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  
  padding-top: 8px;
  padding-bottom: 0;
  transition: all 0.3s ease;
}

/* Aşağı kaydırılınca header görünümü */
header.header-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 25px rgba(0,0,0,0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Üst Satır: Logo, Masa No ve Sepet */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Masa Numarası */
.masa-chip {
  background: #f1f5f9;
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* Sepet Butonu */
.header-cart-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-cart-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Alt Satır: Kategori Butonları */
.category-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;      /* Yanlamasına kaydırma */
  padding: 5px 0 12px 0; /* Alt boşluk */
  scrollbar-width: none; /* Firefox scrollbar gizle */
  -webkit-overflow-scrolling: touch; /* Mobilde akıcı kaydırma */
}

.category-nav::-webkit-scrollbar { display: none; }

.cat-btn {
  flex: 0 0 auto;
  background: #f8fafc;
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid #e2e8f0; /* Kategori butonlarında da ince sınır */
  transition: all 0.3s ease;
}

.cat-btn:hover, .cat-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

/* =========================================
   ANA İÇERİK IZGARASI
   ========================================= */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  padding-bottom: 100px;
}

/* Tablet ve Altı için Grid Düzeni */
@media (max-width: 992px) {
  .app-grid { grid-template-columns: 1fr; }
}

/* --- Menü Başlıkları --- */
.menu-section h3 {
  font-size: 1.5rem;
  color: #ffffff;
  margin: 30px 0 15px;
  font-weight: 800;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
  border-left: 5px solid var(--accent);
  padding-left: 15px;
  scroll-margin-top: 160px; /* Header altında kalmasın diye */
}

/* --- Menü Listesi (Grid) --- */
.menu-list {
  display: grid;
  /* Desktop varsayılan: Sığabildiği kadar */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* --- Ürün Kartı (Border Geri Geldi) --- */
.menu-item {
  background: #ffffff;
  /* İstenilen Kenarlık Burada: */
  border: 1px solid var(--border-color); 
  border-radius: var(--radius);
  /* Hafif gölge */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); 
  padding: 12px;
  
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  
  background-size: cover;
  background-position: center;
}

.menu-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary); /* Üzerine gelince kenarlık yeşil olsun */
}

/* Resim Overlay */
.menu-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}
.menu-item[style*="background-image"]::before { opacity: 1; }

/* Yazılar */
.menu-item-title, .menu-item-desc, .menu-item-price, .btn {
  position: relative; 
  z-index: 2;
}

.menu-item-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
  line-height: 1.3;
  color: var(--text-main);
}

.menu-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 10px;
  line-height: 1.4;
}

.menu-item-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

/* Resim varsa yazı beyaz */
.menu-item[style*="background-image"] .menu-item-title,
.menu-item[style*="background-image"] .menu-item-desc,
.menu-item[style*="background-image"] .menu-item-price {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Butonlar */
.btn {
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.btn.add {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid #e2e8f0;
}
.btn.add:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 14px;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
}

.btn.danger {
  background: #fee2e2;
  color: var(--danger);
  width: auto;
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* =========================================
   SEPET PANELİ
   ========================================= */
.panel {
  position: sticky;
  top: 160px;
  height: fit-content;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.panel-header {
  padding: 15px 20px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
}

.panel-body { padding: 20px; }

.cart-row {
  display: grid;
  grid-template-columns: 1fr 45px 65px auto;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.cart-name { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.cart-qty {
  width: 100%; text-align: center; padding: 5px;
  border: 1px solid #cbd5e1; border-radius: 6px;
  font-weight: 600; font-size: 0.9rem;
}
.cart-price { text-align: right; font-weight: 700; font-size: 0.9rem; }

select {
  width: 100%; padding: 10px; border: 1px solid #cbd5e1;
  border-radius: 8px; margin-bottom: 15px;
}

.summary-table { width: 100%; margin-top: 15px; }
.summary-table td { padding: 5px 0; font-size: 0.9rem; }
.summary-table tr:last-child td {
  border-top: 2px solid #f1f5f9;
  padding-top: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

/* =========================================
   MOBİL İÇİN ÖZEL DÜZENLEMELER
   (Yemeksepeti Tarzı + Masa No Görünür)
   ========================================= */
@media (max-width: 768px) {
  
  /* Header Yüksekliği */
  body {
    padding-top: 60px;
  }
  .container {
    padding: 0 15px;
  }
  
  /* Header Üst Kısım Sıkıştırma */
  .header-row {
    gap: 8px; /* Öğeler arası boşluğu azalt */
  }

  .brand {
    font-size: 1.1rem; /* Logo biraz küçülsün */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Masa No GÖRÜNÜR (Boyutu küçültüldü) */
  .masa-chip {
    display: inline-flex; /* Geri getirdik */
    font-size: 0.75rem;
    padding: 4px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
  }

  .header-cart-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  /* Kategori Navigasyonu */
  .category-nav {
    padding-bottom: 8px;
    gap: 8px;
  }
  .cat-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  /* Menü Grid: Yan Yana 2 Sütun */
  .menu-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  /* Mobil Kart Tasarımı */
  .menu-item {
    min-height: 200px;
    padding: 10px;
    border-radius: 10px;
    /* Kenarlık mobilde de görünsün: */
    border: 1px solid var(--border-color);
  }

  .menu-item-title {
    font-size: 0.85rem;
    margin-bottom: 4px;
    /* Başlık 2 satırda kessin */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .menu-item-desc {
    /* Mobilde açıklamalar kısa olsun */
    font-size: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    line-height: 1.2;
  }

  .menu-item-price {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .btn.add {
    padding: 6px;
    font-size: 0.8rem;
  }
  
  /* Sepet Alanı Boşluğu */
  .app-grid {
    padding-bottom: 80px;
    gap: 20px;
  }
}

/* Küçük Ekranlar (iPhone SE vb.) */
@media (max-width: 380px) {
  .brand { font-size: 1rem; } /* Logoyu daha da küçült */
  .masa-chip { font-size: 0.7rem; padding: 2px 6px; }
  .menu-list { gap: 8px; }
  .menu-item { padding: 8px; min-height: 180px; }
}

/* Helper Sınıflar */
.hidden { display: none !important; }
.text-right { text-align: right; }
.mb-10 { margin-bottom: 10px; }
.mt-10 { margin-top: 10px; }
.block-lbl { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: var(--text-muted); }
.muted { font-size: 0.75rem; color: var(--text-muted); }

/* User Badge (Sol Alt) */
.user-badge {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: white;
  padding: 6px 12px;
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  display: flex; gap: 8px; align-items: center;
  z-index: 200;
  border: 1px solid #e2e8f0;
}
.user-badge__name { font-size: 0.85rem; font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-badge__points {
  background: var(--accent); color: white;
  padding: 2px 8px; border-radius: 12px; font-weight: bold; font-size: 0.75rem;
}
/* =========================
   MODAL (ONAY PENCERESİ) STİLLERİ
   ========================= */

/* Arka plan karartması */
.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Yarı saydam siyah */
  display: flex;
  justify-content: center; /* Yatay ortala */
  align-items: center;     /* Dikey ortala */
  z-index: 1000;           /* En üstte dursun */
}

/* Gizleme sınıfı */
.hidden {
  display: none !important;
}

/* Beyaz kutu */
.modal-box {
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px; /* Çok geniş olmasın */
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  animation: popIn 0.3s ease; /* Açılırken hafif efekt */
}

/* Liste satırları */
.confirm-list {
  max-height: 300px;
  overflow-y: auto;
  margin: 15px 0;
  border-bottom: 1px solid #eee;
}

.confirm-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f9f9f9;
  font-size: 15px;
}

/* 🔥 YENİ EKLENEN: Hediye Ürün Rengi (Yeşil) */
.gift-item {
  color: #27ae60; 
  font-weight: 600;
  background-color: #f0fdf4; /* Çok açık yeşil arka plan */
  padding: 8px;
  border-radius: 4px;
}

/* Fiyat Özeti Alanı */
.confirm-prices {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.confirm-prices .row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
}

.confirm-prices .total {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #eee;
}

/* Butonlar */
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.btn-ok {
  background: #27ae60;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

/* Ufak bir açılma animasyonu */
@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
/* Gizleme sınıfı */
.hidden {
  display: none !important;
}

/* Not alanı stili */
.note-container {
  border-top: 1px dashed #eee;
  padding-top: 10px;
}

/* =========================================
   🎁 GELİŞMİŞ KAMPANYA MODALI (CSS)
   ========================================= */

/* Modalın içindeki scroll davranışı */
.campaign-box {
  display: flex;
  flex-direction: column;
  max-height: 85vh; /* Ekranın %85'ini geçmesin */
  padding: 0; /* İç boşluğu sıfırla, header/footer yönetecek */
}

.modal-header {
  padding: 20px 20px 15px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0; /* Küçülmesin */
  position: sticky;
  top: 0;
  z-index: 10;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}
.btn-close:hover { color: #ef4444; }

/* --- AŞAMA 1: LİSTE --- */
#campaignListStep {
  padding: 20px;
  overflow-y: auto; /* İçerik taşarsa kaydır */
}

.camp-group {
  margin-bottom: 25px;
}

.camp-group-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px 5px;
  font-weight: 700;
}

.camp-list {
  display: grid;
  gap: 12px;
}

/* Kampanya Kartı */
.camp-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.camp-item:hover {
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(15, 118, 110, 0.1);
  transform: translateY(-2px);
}

/* Sol taraf: İsim ve Açıklama */
.camp-info {
  flex: 1;
  padding-right: 10px;
}

.camp-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 4px;
  display: block;
}

.camp-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sağ taraf: Rozet/Puan */
.camp-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Pasif Durum (Puan yetmiyor veya koşul sağlanmadı) */
.camp-item.disabled {
  background: #f8fafc;
  border-color: #f1f5f9;
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(1);
}
.camp-item.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: #f1f5f9;
}

/* Boş Mesaj */
.empty-msg {
  text-align: center;
  padding: 20px;
  border: 2px dashed #f1f5f9;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* --- AŞAMA 2: DETAY EKRANI --- */
#campaignDetailStep {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  align-self: flex-start;
  padding: 0;
  margin-bottom: 15px;
}
.btn-text:hover { color: var(--primary); text-decoration: underline; }

.camp-detail-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  display: inline-block;
}

.section-lbl {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 10px;
  font-weight: 700;
}

/* Koşul Listesi (Tikli) */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.check-list li {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.check-icon {
  font-size: 1.2rem;
}
.check-icon.ok { color: #10b981; } /* Yeşil Tik */
.check-icon.no { color: #ef4444; } /* Kırmızı Çarpı */

/* Ödül Seçimi (Radio Button Grubu) */
.reward-group {
  display: grid;
  gap: 8px;
}

.reward-option {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.reward-option:hover {
  border-color: var(--primary);
  background: #f0fdfa; /* Açık yeşil */
}

.reward-option input[type="radio"] {
  margin-right: 12px;
  accent-color: var(--primary);
  transform: scale(1.2);
}

/* Modal Footer (Uygula Butonu) */
.modal-footer {
  margin-top: auto; /* En alta it */
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.full-width { width: 100%; }

/* --- SİHİRBAZ MODU --- */
.wizard-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.wizard-grid {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Ufak kartlar */
  gap: 15px;
}

/* Seçim Kartı */
.w-card {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  position: relative;
}

.w-card.selected {
  border-color: var(--primary);
  background-color: #f0fdfa;
  box-shadow: 0 0 0 2px var(--primary);
}

.w-card img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  margin-bottom: 5px;
}

.w-title { font-size: 0.85rem; font-weight: 600; line-height: 1.2; margin-bottom: 5px; }
.w-price { font-size: 0.8rem; color: #666; }

/* Adet Rozeti (Sağ üst) */
.w-badge {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--primary);
  color: white;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  display: none; /* Seçilince görünür */
}
.w-card.selected .w-badge { display: flex; }


/* =========================================
   🎁 GELİŞMİŞ KAMPANYA MODALI (DÜZELTİLMİŞ)
   ========================================= */

/* 1. Modal Dış Çerçevesi (Karanlık Arka Plan) */
.modal-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Hafif koyu */
  backdrop-filter: blur(3px); /* Arkadaki menüyü bulanıklaştır */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center; /* Tam ortala */
  padding: 10px; /* Kenarlardan biraz boşluk bırak */
}

.modal-container.hidden {
  display: none;
}

/* 2. Modal Kutusu (Beyaz Alan) */
.campaign-box {
  background: #ffffff;
  width: 100%;
  max-width: 550px; /* Tablette çok geniş olmasın */
  height: 85vh; /* Ekranın %85'i kadar olsun (Taşmayı önler) */
  max-height: 800px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  
  display: flex;          /* İç yapıyı Flex yap */
  flex-direction: column; /* Alt alta diz */
  overflow: hidden;       /* Köşeleri ve taşanları kırp */
  position: relative;
}

/* 3. Sabit Üst Başlık (Header) */
.modal-header {
  flex-shrink: 0; /* Asla küçülmesin */
  padding: 15px 20px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #1e293b;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 10px;
}

/* 4. Ekranlar (Wizard Screens) */
/* Bu kısım çok önemli: İçeriğin kayması için burası ayarlandı */
.wizard-screen {
  flex: 1;            /* Kalan tüm boşluğu kapla */
  display: flex;
  flex-direction: column;
  overflow: hidden;   /* Taşan içeriği gizle (Grid kaydıracak) */
  min-height: 0;      /* Flexbox scroll hatasını düzeltir */
}

/* 5. Kaydırılabilir İçerik Alanı (Liste ve Grid) */
#wizardListScreen,
.wizard-grid {
  flex: 1;            /* Dikeyde kalan alanı doldur */
  overflow-y: auto;   /* SADECE BURASI KAYSIN */
  padding: 15px;
  background: #f8fafc; /* Hafif gri arka plan */
}

/* Ürün Grid Yapısı */
.wizard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); /* Responsive kolonlar */
  gap: 15px;
  align-content: start; /* Kartları yukarı yasla */
}

/* 6. Sabit Alt Kısım (Footer) */
.modal-footer {
  flex-shrink: 0; /* Asla küçülmesin */
  padding: 15px 20px;
  background: #fff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* 7. Kampanya ve Ürün Kartları Tasarımı */
.camp-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.1s;
}
.camp-item:active { transform: scale(0.98); }

.w-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.w-card img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  margin-bottom: 8px;
}

/* Seçili Kart Efekti */
.w-card.selected {
  border-color: #10b981; /* Yeşil Çerçeve */
  background-color: #ecfdf5; /* Açık yeşil zemin */
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.w-badge {
  position: absolute;
  top: -8px; right: -8px;
  background: #10b981;
  color: white;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Bilgilendirme Kutusu (Adım 1/2 gibi) */
#wizardStepInfo {
  background: #fff;
  padding: 12px 20px;
  font-size: 0.95rem;
  color: #0f766e;
  border-bottom: 1px solid #ccfbf1;
  background-color: #f0fdfa;
  flex-shrink: 0;
}

/* --- SEPET DÜZENİ DÜZELTMESİ --- */

.cart-row {
  display: flex;
  justify-content: space-between; /* Sol, Orta, Sağ olarak yay */
  align-items: center; /* Dikey ortala */
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px; /* Öğeler birbirine girmesin (Kritik nokta) */
}

/* Ürün İsmi (Sola yaslı, gerekirse alt satıra geçsin) */
.cart-name {
  flex: 1; /* Boş alanı kapla */
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  padding-right: 5px;
}

/* Fiyat (Sağa yaslı, tek satır) */
.cart-price {
  font-weight: 700;
  color: #2c3e50;
  white-space: nowrap; /* Fiyat asla alt satıra inmesin */
  text-align: right;
  min-width: 70px; /* Fiyat için garanti yer ayır */
}

/* Artır/Azalt Butonlarının olduğu orta kısım */
/* JS'de inline style var ama bu CSS onu ezecek/düzenleyecek */
.cart-row > div:nth-child(2) {
  flex-shrink: 0; /* Butonlar asla ezilmesin */
  margin: 0 5px;  /* Yanlardan biraz daha aç */
}


/* Kilitli Kampanya (Üye Özel) */
.camp-item.locked {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

/* Kilit ikonu */
.camp-item.locked::after {
  content: "🔒 Üyelere Özel";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  pointer-events: none;
}

/* Ürün Kartı Puan Rozeti */
.menu-item {
  position: relative; /* Rozeti hizalamak için gerekli */
}

/* Ürün kartının kendisine relative pozisyon veriyoruz ki badge dışarı kaçmasın */
.menu-item {
  position: relative; 
}

/* Sağ üstteki yeşil sayaç topu */
.product-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 32px;
  height: 32px;
  background-color: #0f765c; /* Yeşil renk */
  color: #fff;              /* Beyaz yazı */
  border-radius: 50%;       /* Tam yuvarlak (küre) */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 10;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animasyon: Top ortaya çıkarken zıplasın */
@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
/* 2. SİPARİŞ NOTU (Sade Gri Blok) */
#toggleNoteBtn {
  background-color: #f1f5f9 !important; /* Açık gri zemin */
  color: #475569 !important;            /* Koyu gri yazı */
  border: 1px solid #e2e8f0 !important; /* Belli belirsiz çerçeve */
  
  padding: 12px 15px !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}

#toggleNoteBtn:hover {
  background-color: #e2e8f0 !important;
  color: #1e293b !important;
}

/* Not alanı açılınca */
#siparisNotuInput {
  background-color: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155;
  border-radius: 8px !important;
  padding: 10px !important;
  font-family: inherit;
  margin-top: 8px !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

