/* =====================================================
   QR MENÜ - Özel Menü Stilleri
   (Mevcut tasarım diline uyumlu, Firebase/React'tan bağımsız)
   ===================================================== */

/* ---- PRELOADER ---- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--color-two);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.preloader.hidden {
  opacity: 0;
  pointer-events: none;
}
.preloader .icon img {
  width: 60px;
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- HEADER ---- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  background: rgba(14,13,11,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(228,197,144,0.15);
  transition: all 300ms ease;
}
.main-header.scrolled {
  background: rgba(14,13,11,0.98);
}

/* ---- HIDDEN BAR (Hamburger Panel) ---- */
.hidden-bar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 320px;
  background-color: var(--side-menu-background-color) !important;
  z-index: 9999;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 500ms ease-in-out;
  border-right: 1px solid rgba(228,197,144,0.1);
}
.hidden-bar.visible {
  transform: translateX(0);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.menu-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

.hidden-bar .inner-box {
  padding: 70px 0 50px;
}
.hidden-bar .cross-icon {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--side-menu-close-icon-color, #ffffff) !important;
  font-size: 14px;
  transition: all 200ms;
}
.hidden-bar .cross-icon span,
.hidden-bar .cross-icon::before,
.hidden-bar .cross-icon::after {
  color: var(--side-menu-close-icon-color, #ffffff) !important;
}
.hidden-bar .cross-icon:hover {
  border-color: var(--main-color);
  color: var(--main-color) !important;
}

.hidden-bar .logo-box {
  text-align: center;
  padding: 0 30px 40px;
}

.hidden-bar .navigation {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hidden-bar .navigation li {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background-color: var(--side-menu-item-bg-color) !important;
}
.hidden-bar .navigation li a {
  display: block;
  padding: 14px 30px;
  color: var(--side-menu-text-color) !important;
  background-color: var(--side-menu-item-bg-color) !important;
  font-family: var(--font-family-DMsans);
  font-size: 14px;
  text-decoration: none;
  transition: all 200ms;
}
.hidden-bar .navigation li a:hover,
.hidden-bar .navigation li.current a,
.hidden-bar .navigation li.active a {
  color: var(--side-menu-active-text-color) !important;
  background-color: var(--side-menu-item-active-bg-color) !important;
  padding-left: 38px;
}
.hidden-bar .separator {
  height: 1px;
  background: rgba(228,197,144,0.2);
  margin: 20px 30px;
}

/* ---- BANNER / HERO ---- */
.banner-section {
  position: relative;
  overflow: hidden;
  background: var(--color-two);
}
.banner-section .image-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.banner-section .image-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(14,13,11,0.85) 100%);
}
.banner-section .content-box {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-section .inner {
  text-align: center;
}

/* ---- KATEGORİ HIZLI NAV ---- */
/* ── Kategori Navigasyonu ──
   position: sticky — hero'nun altında başlar, scroll ile üste yapışır.
   JS, header yüksekliğini ölçerek top değerini dinamik günceller.
   -webkit-sticky iOS Safari için gerekli. ── */
.category-quick-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 65px; /* JS tarafından header.offsetHeight ile güncellenir */
  background: var(--category-nav-background-color, var(--color-four));
  border-bottom: 1px solid rgba(228,197,144,0.12);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  padding: 8px 0;
  z-index: 800;
}

/* ── Pill wrapper ── */
.cat-pills-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 2px 8px;
}

/* ── İkon Pill ── */
.cat-pill.cat-icon-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid rgba(228,197,144,0.22);
  border-radius: 10px;
  color: var(--category-nav-text-color, rgba(255,255,255,0.70));
  background-color: var(--category-nav-button-bg-color, rgba(255,255,255,0.04));
  text-decoration: none;
  transition: background 180ms, border-color 180ms, color 180ms;
  cursor: pointer;
  user-select: none;
  min-width: 54px;
  text-align: center;
}

/* ── FA ikon — currentColor, tek renk ── */
.cat-pill-icon {
  font-size: 16px;
  line-height: 1;
  color: currentColor;
  display: block;
}

.pill-label {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: currentColor;
  line-height: 1;
}

.cat-pill.cat-icon-pill:hover,
.cat-pill.cat-icon-pill.active {
  background: var(--category-nav-active-bg-color, var(--main-color));
  border-color: var(--category-nav-active-bg-color, var(--main-color));
  color: var(--category-nav-active-text-color, #000);
}

/* ── Cat section: scroll offset (JS tarafından dinamik güncellenir) ── */
.cat-section {
  scroll-margin-top: 150px;
}

/* ── Mobil ── */
@media (max-width: 768px) {
  .category-quick-nav {
    padding: 6px 0;
  }
  .cat-pills-wrapper {
    gap: 5px;
    padding: 2px 6px;
  }
  .cat-pill.cat-icon-pill {
    padding: 6px 9px;
    min-width: 48px;
    border-radius: 9px;
  }
  .cat-pill-icon {
    font-size: 15px;
  }
  .pill-label {
    font-size: 9px;
  }
}

/* ---- MENÜ BÖLÜM ---- */
.menu-section {
  padding: 70px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.auto-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.title-box.centered {
  text-align: center;
  margin-bottom: 50px;
}
.title-box .subtitle span {
  font-family: var(--font-family-Forum);
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--main-color);
  text-transform: uppercase;
}
.title-box .pattern-image {
  margin: 15px 0;
}
.title-box .pattern-image img {
  height: 20px;
  opacity: 0.6;
}
.title-box h2 {
  font-family: var(--font-family-Forum);
  font-size: clamp(28px, 4vw, 48px);
  color: var(--heading-color);
  margin: 0;
}

/* ---- ÜRÜN GRID ---- */
.menu-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.menu-product-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 200ms, border-color 200ms;
}
.menu-product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(228,197,144,0.25);
}

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms;
}
.menu-product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 16px;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.product-name {
  font-family: var(--font-family-Forum);
  font-size: 17px;
  color: var(--heading-color);
  margin: 0;
  flex: 1;
}

.product-price {
  font-size: 15px;
  color: var(--main-color);
  font-weight: 600;
  white-space: nowrap;
}
.tl-sign {
  font-size: 13px;
  margin-left: 2px;
}

.product-desc {
  font-size: 13px;
  color: var(--color-one);
  margin: 0 0 10px;
  line-height: 1.5;
}

/* ---- ÜRÜN META (enerji + alerjenler) ---- */
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.meta-item {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 12px;
  line-height: 1.4;
}
.energy-item {
  background: rgba(255, 160, 30, 0.12);
  color: #ffa01e;
  border: 1px solid rgba(255, 160, 30, 0.25);
}
.allergen-item {
  background: rgba(231, 76, 60, 0.1);
  color: #e07070;
  border: 1px solid rgba(231, 76, 60, 0.2);
}
.meta-item i { margin-right: 4px; }

/* ---- ÜRÜN İKONLARI ---- */
.product-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.product-icon-badge {
  font-size: 17px;
  line-height: 1;
  cursor: default;
  /* GF gibi metin ikonları için */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
}
.product-icon-badge[title*="gluten"] {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--heading-color);
  letter-spacing: 0.5px;
}

.section-divider {
  margin-top: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(228,197,144,0.2), transparent);
}

/* ---- MOBİL ---- */
@media (max-width: 768px) {
  .menu-products-grid {
    grid-template-columns: 1fr;
  }
  .banner-section .content-box {
    height: 50vh !important;
    min-height: 300px !important;
  }
  .menu-section {
    padding: 50px 0 30px;
  }
}
@media (max-width: 480px) {
  .menu-products-grid {
    grid-template-columns: 1fr;
  }
  .cat-pill {
    font-size: 12px;
    padding: 5px 12px;
  }
}

/* =====================================================
   HERO BANNER — Görünürlük Düzeltmesi
   style.css: .slide-item .subtitle / h1 / .pattern-image → opacity:0 varsayılan,
   yalnızca .swiper-slide-active ile görünür.
   .swiper-slide-active sınıfını slide-item'a ekledik; aşağıdaki kurallar
   content-box yüksekliğini ve geçiş hızını ayarlar.
   ===================================================== */

/* style.css'teki 880px / 100vh'yi 70vh ile baskıla */
.banner-section .slide-item .content-box.hero-content-box {
  height: 70vh !important;
  min-height: 400px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Geçiş animasyonu çok uzun; daha hızlı yap */
.banner-section .swiper-slide-active .subtitle,
.banner-section .swiper-slide-active .pattern-image,
.banner-section .swiper-slide-active h1 {
  transition: all 600ms ease 100ms !important;
}

/* Hero h1 boyutunu responsive tut */
.banner-section .slide-item h1 {
  font-size: clamp(40px, 6vw, 90px);
  color: var(--heading-color);
  font-family: var(--font-family-Forum);
  line-height: 1.05;
}

/* Separator görsel boyutu */
.banner-section .slide-item .pattern-image img {
  height: 22px;
  opacity: 0.75;
  filter: brightness(1.2);
}

/* Mobil */
@media (max-width: 768px) {
  .banner-section .slide-item .content-box.hero-content-box {
    height: 55vh !important;
    min-height: 300px !important;
  }
  .banner-section .slide-item h1 {
    font-size: clamp(32px, 8vw, 60px);
  }
}

/* ── Besin Değerleri ── */
.product-nutrition {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #bbb;
}
.nutrition-row {
  margin-bottom: 3px;
  line-height: 1.4;
}
.nutrition-label {
  font-weight: 600;
  color: #ccc;
  margin-right: 4px;
}
.nutrition-value {
  color: #aaa;
}
.nutrition-macros {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.macro-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.macro-protein { background: rgba(59,130,246,0.18); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.macro-fat     { background: rgba(234,179,8,0.15);  color: #facc15; border: 1px solid rgba(234,179,8,0.3); }
.macro-carb    { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }

/* Alerjen satırı (nutrition bloğu içinde) */
.allergen-row {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.allergen-label {
  color: #f87171 !important;
  font-weight: 600;
}
.allergen-label i {
  font-size: 0.75rem;
}
