/* Genel body ayarları */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  position: relative; /* position relative yaparak ::before kapsaması için */
  z-index: 0;
  /* background: #84170a12; (kaldırıldı) */
}

/* Arka plan için sabit görsel ::before ile */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('https://menu.muratiskender.com/assets/uploads/arkaplankebap.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  opacity: 0.1;
}

/* Kategori menüsü */
.category-nav {
  background-color: #800000;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.category-nav .nav-link {
  color: #fff;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: background-color 0.3s;
}

.category-nav .nav-link:hover,
.category-nav .nav-link.active {
  background-color: #4d0000;
  color: #fff;
}

/* Mobil kategori menüsü gizli */
.mobile-category-nav {
  display: none;
}

/* Banner */
.category-banner {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.category-banner img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.category-banner .overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  user-select: none;
}

/* --- Ana içerik wrapper --- */
.content-wrapper {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  justify-content: center; /* Her durumda ortala */
}

/* Kampanya paneli sağda sticky */
.campaign-panel {
  width: 320px;
  flex-shrink: 0;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  position: sticky;
  top: 40px;
  align-self: flex-start;
}

/* Kampanya yoksa boş yer tutar ama görünmez olur */
.content-wrapper.no-campaign .campaign-panel {
  visibility: hidden;
  pointer-events: none;
}

/* Ürün listesi */
.product-list {
  max-width: 70%; /* Her durumda %70 genişlik */
  width: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 20px;
  border-radius: 8px;
}

.product-list h2 {
  text-align: center;
  color: #800000;
  margin-bottom: 30px;
}

.list-group-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
}

.list-group-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
}

.list-group-item > div.flex-grow-1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-grow: 1;
  gap: 15px;
  flex-wrap: wrap;
}

/* Ürün bilgileri */
.product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 4px;
  min-width: 60%;
  word-break: break-word;
}

.product-name {
  font-weight: bold;
  color: #333;
  white-space: normal;
}

.product-detail {
  font-size: 0.9rem;
  color: #555;
  font-style: italic;
  white-space: pre-wrap;
  margin-top: 4px;
  user-select: text;
  text-align: left;
}

/* Fiyat kutusu */
.product-price {
  font-weight: bold;
  color: #800000;
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

/* Footer */
footer {
  background-color: #800000;
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  user-select: none;
  margin-top: auto;
}

.footer-contact a {
  color: white;
  text-decoration: none;
  display: inline-block;
  margin: 8px;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* ----------- MOBİL ÖZEL CSS ----------- */
@media (max-width: 768px) {
  .category-nav {
    display: none;
  }

  .mobile-category-nav {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .content-wrapper {
    display: block !important;
  }

  .campaign-panel {
    margin-bottom: 2rem;
    width: 100% !important;
    position: relative !important;
    top: auto !important;
    box-shadow: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .content-wrapper.no-campaign .campaign-panel {
    display: none !important; /* Mobilde kampanya yoksa panel gizle */
  }

  .product-list {
    max-width: 100% !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding: 10px 15px !important;
  }

  .list-group-item {
    padding: 15px 10px;
    min-height: 75px;
    padding-bottom: 35px; /* Fiyat kutusu için alt boşluk */
  }

  .list-group-item img {
    width: 25px;
    height: 25px;
  }

  .product-price {
    position: absolute;
    right: 16px;
    bottom: 10px;
    background-color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.95rem;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
  }

  .product-info {
    padding-right: 0; /* Mobilde ek sağ boşluk gerekmez */
  }
}

/* ----------- STICKY NAV ----------- */
@media (min-width: 768px) {
  .category-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
  }
}


/* Grid görünüm alanı */
.grid-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Grid öğesi */
.grid-item {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Grid görsel - kare oranlı */
.grid-item img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Kare oran */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Grid metin */
.grid-text h5 {
  font-weight: bold;
  color: #800000;
  margin-bottom: 6px;
}

.grid-text p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.grid-text .price {
  font-weight: bold;
  color: #800000;
  font-size: 1rem;
}

/* Responsive: mobilde 1 sütun, tablette 2 */
@media (max-width: 768px) {
  .grid-view {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-view {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Grid görsel - kare oranlı ve alt çizgi */
.grid-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(128, 0, 0, 0.3); /* Silik bordo çizgi */
}


.grid-view {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Masaüstü: 4 sütun */
  gap: 20px;
}

@media (max-width: 768px) {
  .grid-view {
    grid-template-columns: repeat(2, 1fr); /* Mobil: 2 sütun */
  }
}

.category-header {
  max-width: 960px;
  margin: 40px auto;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  text-align: center;
  padding: 20px;
}

.category-header h2 {
  font-size: 2.8rem;
  font-weight: 600;
  color: #800000;
  margin: 0;
}

/* Mobil uyumlu başlık */
@media (max-width: 576px) {
  .category-header h2 {
    font-size: 1.8rem;
  }
}


@media (max-width: 576px) {
  .btn-group-sm > .btn,
  .btn-sm {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-border-radius: var(--bs-border-radius-sm);
  }
}

#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  background-color: #960000;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  opacity: 0.8;
  transition: opacity 0.3s ease;

  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  padding: 0;
}
#scrollTopBtn:hover {
  opacity: 1;
}

