/* CAFEFOR QR menü — sekmeli + aramalı, koyu + altın marka kimliği.
   Renk ve tipografi jetonları temadan (style.css :root) miras alınır; tema
   yoksa yedek değerler devreye girer. */

.cf-menu {
  --cfm-dark:      var(--cf-dark, #16120f);
  --cfm-card:      #211b15;
  --cfm-card-2:    #2a2219;
  --cfm-gold:      var(--cf-gold, #c9a24b);
  --cfm-gold-soft: var(--cf-gold-soft, #e3c989);
  --cfm-cream:     var(--cf-cream, #f6efe2);
  --cfm-muted:     #a99e8d;
  --cfm-line:      #33291f;
  --cfm-display:   var(--cf-font-display, Georgia, serif);
  --cfm-body:      var(--cf-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);

  background: var(--cfm-dark);
  color: var(--cfm-cream);
  font-family: var(--cfm-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px;
}

/* Menü sayfasının tamamı koyu (basılı menüyle aynı kimlik) */
body.cf-menu-page,
body.page-template-default .cf-menu {
  background: var(--cf-dark, #16120f);
}

/* ============================================================
   ARAMA + SEKME ÇUBUĞU (yapışkan)
   ============================================================ */
.cf-menu-bar {
  position: sticky;
  top: var(--cf-head-now, 100px);
  z-index: 30;
  background: rgba(22, 18, 15, .97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cfm-line);
}
.cf-menu-bar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Arama kutusu */
.cf-search {
  position: relative;
  flex: 0 0 296px;
  display: flex;
  align-items: center;
}
.cf-search__icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--cfm-muted);
  pointer-events: none;
}
/* .cf-menu ile öngüllük artırıldı: üst temanın input[type="search"] kuralı
   yalnız sınıf seçicisini eziyordu (padding ve köşe yarıçapı kayboluyordu). */
.cf-menu .cf-search__input {
  width: 100%;
  padding: 11px 38px 11px 42px;
  border-radius: 999px;
  border: 1px solid var(--cfm-line);
  background: var(--cfm-card);
  color: var(--cfm-cream);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}
.cf-menu .cf-search__input::placeholder { color: #7d7365; }
.cf-menu .cf-search__input:focus {
  outline: none;
  border-color: var(--cfm-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, .16);
}
.cf-menu .cf-search__input::-webkit-search-cancel-button { display: none; }
.cf-search__clear {
  position: absolute;
  right: 8px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--cfm-card-2);
  color: var(--cfm-cream);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.cf-search__clear:hover { background: var(--cfm-gold); color: #1a1510; }
/* Üst temanın button display kuralı hidden'ı ezmesin */
.cf-search__clear[hidden] { display: none; }

/* Sekmeler */
.cf-menu-tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cf-chips {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}
.cf-chips::-webkit-scrollbar { display: none; }
/* Kaydırılabilir sekme satırının sağ kenarında daha fazla kategori olduğunu
   ima eden hafif bir soluklama — mobilde overflow fark edilmiyordu. */
.cf-chips::after {
  content: "";
  position: sticky;
  top: 0;
  right: 0;
  margin-left: -22px;
  flex: 0 0 0;
  width: 22px;
  align-self: stretch;
  background: linear-gradient(90deg, transparent, rgba(22, 18, 15, .97));
  pointer-events: none;
}

.cf-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--cfm-line);
  background: transparent;
  color: var(--cfm-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.cf-chip:hover { color: var(--cfm-cream); border-color: var(--cfm-gold); }
.cf-chip.is-active {
  background: var(--cfm-gold);
  border-color: var(--cfm-gold);
  color: #1a1510;
}
.cf-chip__count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: inherit;
}
.cf-chip.is-active .cf-chip__count { background: rgba(26, 21, 16, .18); }

/* "Tümü" açılır paneli */
.cf-menu-all {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--cfm-gold);
  background: transparent;
  color: var(--cfm-gold);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cf-menu-all svg { width: 17px; height: 17px; }
.cf-menu-all:hover,
.cf-menu-all[aria-expanded="true"] { background: var(--cfm-gold); color: #1a1510; }

.cf-menu-panel {
  border-top: 1px solid var(--cfm-line);
  background: rgba(20, 16, 13, .99);
  padding: 20px 20px 24px;
}
.cf-menu-panel[hidden] { display: none; }
.cf-menu-panel__title {
  max-width: 1180px;
  margin: 0 auto 14px;
  font-family: var(--cfm-display);
  font-size: 17px;
  color: var(--cfm-gold);
}
.cf-menu-panel__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.cf-panel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--cfm-line);
  background: var(--cfm-card);
  color: var(--cfm-cream);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.cf-panel-item:hover { background: var(--cfm-gold); border-color: var(--cfm-gold); color: #1a1510; }
.cf-panel-item__count { font-size: 12px; color: var(--cfm-muted); }
.cf-panel-item:hover .cf-panel-item__count { color: rgba(26, 21, 16, .7); }

/* ============================================================
   DURUM SATIRLARI
   ============================================================ */
.cf-menu-status,
.cf-menu-noresult {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px 0;
  font-size: 14px;
  color: var(--cfm-muted);
}
.cf-menu-noresult { text-align: center; padding: 60px 20px; font-size: 15px; }
.cf-menu-status[hidden],
.cf-menu-noresult[hidden] { display: none; }

/* ============================================================
   KATEGORİ BÖLÜMÜ
   ============================================================ */
.cf-cat {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 0;
}
.cf-cat[hidden] { display: none; }

.cf-cat__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
}
.cf-cat__title {
  font-family: var(--cfm-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  margin: 0;
  color: var(--cfm-gold);
}
.cf-cat__count {
  font-size: 12.5px;
  color: var(--cfm-muted);
  white-space: nowrap;
}
.cf-cat__head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 162, 75, .5), transparent);
}
.cf-cat__desc {
  color: var(--cfm-muted);
  font-size: 14px;
  margin: 0 0 4px;
}

/* --- Fotoğraflı ürün kartları --- */
.cf-cat__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 20px;
  margin: 24px 0 8px;
  /* Kartlar içeriği kadar yüksek olsun; kısa açıklamalı kartta boşluk kalmasın */
  align-items: start;
}
.cf-cat__cards[hidden] { display: none; }

.cf-dish {
  position: relative;
  background: var(--cfm-card);
  border: 1px solid var(--cfm-line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, border-color .25s;
}
.cf-dish[hidden] { display: none; }
.cf-dish:hover { transform: translateY(-3px); border-color: rgba(201, 162, 75, .45); }
.cf-dish.is-featured { border-color: rgba(201, 162, 75, .4); }

/* Aspect-ratio masaüstü/mobil arasında sabit tutulur; aksi halde object-fit:cover
   her kırılım noktasında farklı bir kırpma penceresi seçip görseli "kaymış"
   gösteriyordu. */
.cf-dish__img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.cf-dish__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-dish__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--cfm-gold);
  color: #1a1510;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
}

.cf-dish__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cf-dish__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.cf-dish__name {
  font-family: var(--cfm-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--cfm-cream);
}
.cf-dish__price {
  font-family: var(--cfm-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--cfm-gold);
  white-space: nowrap;
}
.cf-dish__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cfm-muted);
  flex: 1;
}

/* --- Fotoğrafsız ürün satırları (noktalı çizgili) --- */
.cf-cat__list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 46px;
}
.cf-cat__list[hidden] { display: none; }

.cf-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--cfm-line);
}
.cf-row[hidden] { display: none; }
.cf-row.is-featured { border-bottom-color: rgba(201, 162, 75, .35); }

.cf-row__head {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.cf-row__name {
  font-family: var(--cfm-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--cfm-cream);
  flex: 0 1 auto;
}
.cf-row__star { color: var(--cfm-gold); font-size: 13px; margin-left: 4px; }
.cf-row__dots {
  flex: 1 1 auto;
  min-width: 18px;
  border-bottom: 1px dotted #4a3d2e;
  transform: translateY(-5px);
}
.cf-row__price {
  flex: 0 0 auto;
  font-family: var(--cfm-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--cfm-gold);
  white-space: nowrap;
}
.cf-row__desc {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--cfm-muted);
  max-width: 46em;
}

/* --- Etiketler (vejetaryen, paylaşımlık…) --- */
.cf-tags { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.cf-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--cfm-gold-soft);
  background: rgba(201, 162, 75, .11);
  border: 1px solid rgba(201, 162, 75, .24);
  padding: 3px 9px;
  border-radius: 6px;
}

.cf-menu-empty {
  text-align: center;
  color: var(--cfm-muted);
  padding: 48px 16px;
}

/* ============================================================
   DUYARLILIK
   ============================================================ */
@media (max-width: 900px) {
  .cf-menu-bar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }
  .cf-search { flex: 1 1 auto; }
  .cf-cat { padding: 26px 16px 0; }
  .cf-cat__list { grid-template-columns: 1fr; column-gap: 0; }
  .cf-menu-status, .cf-menu-noresult { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 560px) {
  .cf-cat__cards { grid-template-columns: 1fr; gap: 16px; }
  .cf-menu-all { padding: 9px 12px; font-size: 13px; gap: 5px; }
  .cf-menu-all svg { width: 15px; height: 15px; }
  .cf-search__clear { width: 32px; height: 32px; }
}

/* --- "Bugün yok" (tükendi) işaretli ürünler ---
   Ürün menüde kalır ama soluklaşır ve fiyatı üstü çizili gösterilir; misafir
   ürünün var olduğunu ama bugün verilemediğini görür. */
.cf-dish.is-sold-out,
.cf-row.is-sold-out { opacity: .55; }
.cf-dish.is-sold-out .cf-dish__img img { filter: grayscale(1); }
.cf-dish.is-sold-out .cf-dish__price,
.cf-row.is-sold-out .cf-row__price { text-decoration: line-through; }
.cf-dish__badge--out { background: #6b6257; color: var(--cfm-cream); }
.cf-row__out {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #3a3128;
  color: var(--cfm-muted);
  font-family: var(--cfm-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  vertical-align: middle;
}
