/* ==========================================================================
   SyncResto — V3 "AURORA" · components.css
   Kategori kapak ızgarası · ürün kartları · rozetler · banner'lar
   NOT: .card/.card-img/.card-body/.price/.add-btn gibi class'ları home.js ÜRETİR
   (tüm temalarda ortak). v3 onları yeniden giydirir, DOM'a dokunmaz.
   ========================================================================== */

/* ==========================================================================
   KATEGORİ KAPAK IZGARASI (referansın 4:5 kartları)
   İçeriği home.js doldurur — YALNIZ #v3CategoryGrid varsa (diğer temalarda yok).
   ========================================================================== */
.v3-theme .v3-catgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 16px 6px;
}
.v3-theme .v3-catgrid:empty { display: none; }

/* 26 Ağu — Mustafa: "kategorilerdeki görseller kampanyalardaki gibi gözüksün".
   Kampanya/öne çıkan kartlarıyla AYNI dil: 16:10 yatay, görselin TAMAMI (contain),
   alttan perde, aynı tipografi. Sabit oran → görsel inerken zıplama yok (CLS 0). */
.v3-theme .v3-catcard {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-m);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-1);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.v3-theme .v3-catcard:hover { border-color: var(--gold); }
.v3-theme .v3-catcard:active { transform: scale(0.97); }
.v3-theme .v3-catcard .v3-ph { position: absolute; inset: 0; }
.v3-theme .v3-catcard img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;      /* kampanya kartlarıyla aynı — kırpma yok */
  background: var(--bg-2);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.v3-theme .v3-catcard img.is-loaded { opacity: 1; }
.v3-theme .v3-catcard__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 12, 10, 0) 0%, rgba(15, 12, 10, 0.72) 42%, rgba(15, 12, 10, 0.95) 100%);
}
.v3-theme .v3-catcard__label {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 40px 12px 12px;
  z-index: 1;
}
/* foto perdesi üstü — açık modda da KOYU kalır (--on-dark sabit token) */
.v3-theme .v3-catcard__label h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--on-dark);
  line-height: 1.2;
  margin: 0;
}
.v3-theme .v3-catcard__label span {
  display: block;
  width: 24px; height: 2px;
  background: var(--on-dark-gold);
  margin-top: 7px;
}
.v3-theme .v3-catcard__count {
  font-size: 0.74rem;
  color: var(--on-dark-mute);
  margin-top: 5px;
  font-family: var(--font-body);
}

/* ==========================================================================
   ÜRÜN KARTLARI — home.js'in dikey .card'ı, referansın YATAY liste kartına
   dönüştürülür (yalnız CSS; DOM aynı kalır).
   ========================================================================== */
.v3-theme .grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

/* 🔴 Temel CSS `.card`a min-height:280px, `.card-img`e aspect-ratio+min-height
   veriyor (dikey kart tasarımı için). v3'ün YATAY liste kartında bu, görsel
   kutusunu 250px'e esnetip kartı devasa yapıyordu → hepsi nötrlendi. */
.v3-theme .card {
  display: flex;
  align-items: center;   /* stretch KAPALI — görsel kutusu boyunca uzamasın */
  gap: 14px;
  padding: 12px;
  min-height: 0;
  height: auto;
  border-radius: var(--radius-m);
  background: var(--bg-1);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.v3-theme .card:hover { border-color: var(--gold); }
.v3-theme .card:active { transform: scale(0.985); }

/* 🔴 MENÜDE GÖRSEL KIRPILMAZ: `cover` yemeğin yarısını kesiyordu (geniş tabak
   fotoğrafı kare kutuya sığmıyor). `contain` ile TAMAMI görünür; artan alan
   kartın kendi zeminiyle dolar, bilinçli bir çerçeve gibi durur. */
/* 27 Ağu — Mustafa: "ürün listesi görsellerini biraz büyült". 104→128 (masaüstü/tablet),
   88→104 (mobil, aşağıda). aspect-ratio 1/1 → kare kutu deterministik (auto iken flex
   satırında yükseklik resme çöküyordu). object-fit:contain görselin tamamını korur. */
.v3-theme .card-img {
  position: relative;
  width: 128px;
  height: 128px;
  min-height: 0;
  max-height: 128px;
  aspect-ratio: 1 / 1;         /* kare — temel CSS 550/378'i ez, flex satırda çökme yok */
  align-self: center;
  flex: 0 0 128px;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--bg-2);
}
.v3-theme .card-img img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.v3-theme .card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.v3-theme .card-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink-0);
  line-height: 1.22;
}
.v3-theme .card-desc {
  color: var(--ink-2);
  font-size: 0.82rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v3-theme .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.v3-theme .price-wrapper { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.v3-theme .price {
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
}
.v3-theme .market-price {
  color: var(--ink-2);
  font-size: 0.8rem;
  text-decoration: line-through;
  white-space: nowrap;
}

.v3-theme .add-btn {
  width: 38px; height: 38px;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--gold);
  cursor: pointer;
  padding: 0;
  transition: background .2s var(--ease), transform .15s var(--ease), border-color .2s var(--ease);
}
.v3-theme .add-btn svg { width: 20px; height: 20px; fill: currentColor; }
.v3-theme .add-btn:hover { background: var(--gold); color: var(--bg-0); border-color: var(--gold); }
.v3-theme .add-btn:active { transform: scale(0.9); }
.v3-theme .add-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ==========================================================================
   ROZETLER
   ========================================================================== */
.v3-theme .badge {
  position: absolute;
  top: 6px; inset-inline-start: 6px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(20, 17, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--on-dark-border);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.v3-theme .badge.out-of-stock {
  inset-inline-start: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 17, 15, 0.86);
  color: var(--danger);
  border-color: rgba(226, 105, 75, 0.4);
}
.v3-theme .happy-hour-badge { color: var(--on-dark-gold-soft); }
.v3-theme .combo-badge { top: auto; bottom: 6px; }

/* ==========================================================================
   BANNER'LAR (flash / kampanya / puan / hızlı tekrar sipariş)
   home.js + view id'leri korunur, yalnız görünüm değişir.
   ========================================================================== */
.v3-theme .v3-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  cursor: pointer;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
/* Temel temanın MOR gölgesi (rgba(124,58,237,.35)) kampanya kutusunda kalıyordu */
.v3-theme .v3-banner,
.v3-theme .campaigns-banner-card,
.v3-theme .loyalty-banner,
.v3-theme .flash-banner { box-shadow: none; }
.v3-theme .v3-banner:hover { border-color: var(--gold); }
.v3-theme .v3-banner:active { transform: scale(0.99); }
.v3-theme .v3-banner.hidden { display: none; }
.v3-theme .v3-banner__icon {
  width: 42px; height: 42px;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--gold);
}
.v3-theme .v3-banner__body { flex: 1; min-width: 0; }
.v3-theme .v3-banner__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-0);
}
.v3-theme .v3-banner__sub {
  font-size: 0.8rem;
  color: var(--ink-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v3-theme .v3-banner__cta {
  flex: none;
  color: var(--gold);
  display: flex;
  align-items: center;
}

/* 🔴 YERLEŞİM: temel CSS `.banners-row`u YATAY kaydırmalı flex satırı yapıyor
   (klasik temada banner'lar yan yana kayar). v3'te banner'lar ALT ALTA ve sayfa
   genişliğinde; flex satırı bırakılınca flash alanı 1664px'e uzayıp taşıyordu. */
/* 🔴 27 Ağu — Mustafa: "sadakat/flash/kampanya yoksa hero ile menü arası boşluk çok".
   Temel CSS `.banners-row`a SABİT height:92px (yatay şerit yüksekliği) veriyordu; v3
   display'i block yapmış ama height'ı sıfırlamamıştı → tüm banner'lar gizliyken bile
   92px boş şerit kalıyordu. height:auto + min-height:0 → banner yoksa 0'a iner (menü
   hero'nun hemen altında başlar), banner varsa doğal yüksekliğe büyür (kırpılmaz). */
.v3-theme .banners-row {
  display: block;
  overflow: visible;
  padding: 0;
  margin: 0;
  gap: 0;
  height: auto;
  min-height: 0;
}
.v3-theme .featured-slider,
.v3-theme .banners-row > * {
  width: auto;
  min-width: 0;
  max-width: none;
  flex: none;
}
.v3-theme .flash-banner,
.v3-theme .banners-row .flash-banner,
.v3-theme .banners-row .campaigns-banner-card,
.v3-theme .banners-row .loyalty-banner {
  min-width: 0;
  height: auto;
}

/* 🔴 GÖRÜNÜRLÜK ANAHTARLARI — temel CSS'teki toggle'ları KORU.
   pages/home.css: .flash-banner{display:none} / .visible{display:block},
   .quick-reorder{display:none} / .visible{display:block}.
   Yukarıdaki .v3-banner{display:flex} bunları ezip BOŞ banner gösterirdi. */
.v3-theme .flash-banner { display: none; }
.v3-theme .flash-banner.visible { display: flex; }
/* 🔴 Kampanya kutusu: temel CSS `.campaigns-banner-card{display:flex}` ile HER ZAMAN
   görünüyordu; JS `.visible`ı doğru ekleyip kaldırıyor ama CSS onu yok sayıyordu →
   aktif kampanya YOKKEN de "0 aktif kampanya" kutusu çıkıyordu. Artık toggle'a uyar. */
.v3-theme .campaigns-banner-card { display: none; }
.v3-theme .campaigns-banner-card.visible { display: flex; }
/* Sadakat kutusu `hidden` class'ı ile yönetiliyor (common.css !important) → program
   kapalıysa zaten gizli; burada ek kural gerekmez, bilinçli olarak eklenmedi. */
.v3-theme .quick-reorder { display: none; padding: 0 16px; }
.v3-theme .quick-reorder.visible { display: block; }
/* .loyalty-banner ve .featured-slider `hidden` class'ıyla yönetiliyor →
   common.css `.hidden{display:none!important}` zaten kazanıyor, ek kural gerekmez. */

/* flash ürün banner'ı — görsel + fiyat */
.v3-theme .v3-banner__img {
  width: 54px; height: 54px;
  flex: none;
  border-radius: var(--radius-s);
  object-fit: cover;
  border: 1px solid var(--border);
}
/* Temel CSS `.flash-name`i BEYAZ yapıyor (klasik temada koyu degrade kutu içinde).
   v3'te banner zemine oturuyor → AÇIK modda beyaz-üstü-beyaz kalıyordu. */
.v3-theme .flash-name { color: var(--ink-0); }
.v3-theme .flash-price { color: var(--gold); font-weight: 700; }
/* indirim yüzdesi rozeti başlığa yapışıyordu */
.v3-theme .flash-title-pct {
  display: inline-block;
  margin-inline-start: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}
.v3-theme .flash-old-price {
  color: var(--ink-2);
  text-decoration: line-through;
  font-size: 0.8rem;
  margin-inline-start: 8px;
}

/* ==========================================================================
   ÖNE ÇIKANLAR ŞERİDİ (#featuredSlider / .featured-card — SSR + JS ortak)
   ========================================================================== */
.v3-theme .featured-slider { padding: 4px 0 0; }
.v3-theme .featured-inner-wrapper { overflow-x: auto; scrollbar-width: none; }
.v3-theme .featured-inner-wrapper::-webkit-scrollbar { display: none; }
.v3-theme .featured-inner {
  display: flex;
  gap: 12px;
  padding: 12px 16px 4px;
}
.v3-theme .featured-card {
  position: relative;
  flex: none;
  width: 232px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-1);
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.v3-theme .featured-card:hover { border-color: var(--gold); }
.v3-theme .featured-card:active { transform: scale(0.97); }
.v3-theme .featured-card .v3-featured__img,
.v3-theme .featured-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; /* menüde ürünün TAMAMI görünsün — kırpma yok */
  background: var(--bg-2);
}
/* fiyat temel temanın yeşilinde kalıyordu — accent'e bağlandı */
.v3-theme .featured-price {
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 700;
}
/* Yazı, yemek fotoğrafının üstünde duruyor — parlak tabaklarda okunmuyordu.
   Daha erken başlayan ve daha koyu biten perde. */
.v3-theme .featured-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;
  padding: 40px 12px 12px;
  background: linear-gradient(180deg, rgba(15, 12, 10, 0) 0%, rgba(15, 12, 10, 0.72) 42%, rgba(15, 12, 10, 0.95) 100%);
}
/* foto üstü → her iki modda koyu zemin (--on-dark sabit) */
.v3-theme .featured-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-bottom: 6px;
  border-radius: 100px;
  border: 1px solid var(--on-dark-border);
  background: rgba(20, 17, 15, 0.5);
  color: var(--on-dark-gold-soft);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.v3-theme .featured-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--on-dark);
  line-height: 1.2;
}
.v3-theme .featured-desc {
  font-size: 0.76rem;
  color: var(--on-dark-mute);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   BUTONLAR
   ========================================================================== */
.v3-theme .v3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--ink-0);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.v3-theme .v3-btn:active { transform: scale(0.97); }
.v3-theme .v3-btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg-0);
}
.v3-theme .v3-btn--primary:hover { filter: brightness(1.06); }
.v3-theme .v3-btn--block { width: 100%; }

/* mağaza kapalı / bilgi şeridi */
.v3-theme .closed-banner,
.v3-theme .v3-notice {
  margin: 0;
  padding: 11px 16px;
  background: linear-gradient(90deg, rgba(226, 105, 75, 0.16), transparent);
  border-bottom: 1px solid rgba(226, 105, 75, 0.3);
  color: var(--ink-0);
  font-size: 0.86rem;
  text-align: center;
}

/* çağrı butonu (mevcut #floatingCallBtn) */
.v3-theme .floating-call-btn {
  position: fixed;
  inset-inline-end: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold);
  color: var(--bg-0);
  box-shadow: var(--shadow-2);
  z-index: 55;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
/* 🔴 MOBİL: "Günün Fırsatı" banner'ı dar ekranda sığmıyordu — görsel/ok/başlık
   aynı satırda çok yer kaplıyor. Ölçüler küçültülüp taşma kapatıldı. */
@media (max-width: 560px) {
  .v3-theme .v3-banner {
    gap: 10px;
    padding: 12px;
    margin: 12px;
    overflow: hidden;
  }
  .v3-theme .v3-banner__img { width: 46px; height: 46px; }
  .v3-theme .v3-banner__icon { width: 36px; height: 36px; }
  .v3-theme .v3-banner__icon svg { width: 17px; height: 17px; }
  .v3-theme .v3-banner__title { font-size: 0.96rem; line-height: 1.25; }
  .v3-theme .v3-banner__sub { font-size: 0.74rem; }
  .v3-theme .v3-banner__cta { flex: none; opacity: .7; }
  .v3-theme .v3-banner__cta svg { width: 15px; height: 15px; }
  .v3-theme .flash-title-pct { margin-inline-start: 6px; font-size: 0.62rem; padding: 2px 6px; }
  .v3-theme .flash-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .v3-theme .flash-price { font-size: 0.98rem; }
  .v3-theme .flash-old-price { font-size: 0.76rem; margin-inline-start: 0; }
  .v3-theme .quick-reorder { padding-inline: 12px; }
  .v3-theme .quick-reorder .quick-reorder-btn { width: 100% !important; margin: 0; }
  /* kategori kapakları telefonda tek sütun daha okunur (16:10 yatay kart) */
  .v3-theme .v3-catgrid { gap: 12px; padding: 16px 12px 4px; }
  .v3-theme .card-img { width: 104px; height: 104px; flex-basis: 104px; max-height: 104px; }
  .v3-theme .card { padding: 10px; gap: 12px; }
  .v3-theme .card-title { font-size: 1rem; }
}

@media (min-width: 640px) {
  .v3-theme .v3-catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-inline: 32px; }
  .v3-theme .v3-banner { margin-inline: 32px; }
  .v3-theme .card-img { width: 128px; height: 128px; max-height: 128px; flex-basis: 128px; }
}
@media (min-width: 960px) {
  /* 27 Ağu — Mustafa: "menü görsellerini biraz büyült, daha yer var". Geniş ekranda
     kapak ızgarası 1160px'de sıkışıyordu (kart 264×165, yanlarda ~290px boş). max-width
     1360 → kart 314×196 (+%19), 16:10 oran korunur, ekran genişliğini daha iyi kullanır. */
  .v3-theme .v3-catgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1360px; margin-inline: auto; }
  .v3-theme .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ── 28 Ağu 2026: Özel metin bloğu + görsel blokları (tema düzenleyici) ────────
   Renkler tema değişkenlerinden gelir; bayi CSS yazmaz, yalnız içerik girer. */
.v3-theme .v3-textblock { max-width: 1200px; margin: 26px auto 6px; padding: 0 16px; text-align: center; }
.v3-theme .v3-textblock.is-left { text-align: left; }
.v3-theme .v3-textblock__title { font-size: 22px; font-weight: 700; margin: 0 0 8px; color: var(--text, #e8e8e8); letter-spacing: -.01em; }
/* Başlığın altındaki şerit — TEMA RENGİ (accent), Mustafa isteği */
.v3-theme .v3-textblock__rule { display: inline-block; width: 54px; height: 3px; border-radius: 3px;
  background: var(--v3-accent, var(--primary, #d4af6a)); margin-bottom: 12px; }
.v3-theme .v3-textblock.is-left .v3-textblock__rule { margin-left: 0; }
.v3-theme .v3-textblock__text { font-size: 14px; line-height: 1.65; color: var(--text-muted, #b9b9b9);
  white-space: pre-line; margin: 0; }

.v3-theme .v3-gallery { max-width: 1200px; margin: 18px auto; padding: 0 16px; display: grid;
  grid-template-columns: repeat(var(--v3-gal-cols, 3), minmax(0, 1fr)); gap: 12px; }
.v3-theme .v3-gallery__item { display: block; border-radius: 14px; overflow: hidden; background: var(--card, #1a1a1a);
  border: 1px solid var(--border, rgba(255,255,255,.08)); transition: transform .18s ease, box-shadow .18s ease; }
.v3-theme .v3-gallery__item:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
/* Urun secili gorsel: tiklanabilir oldugu belli olsun + klavye odagi gorunur */
.v3-theme .v3-gallery__item.is-urun { cursor: pointer; }
.v3-theme .v3-gallery__item.is-urun:focus-visible { outline: 3px solid var(--gold, #d4af6a); outline-offset: 2px; }
.v3-theme .v3-gallery__item img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (max-width: 860px) { .v3-theme .v3-gallery { grid-template-columns: repeat(min(var(--v3-gal-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 520px) { .v3-theme .v3-gallery { grid-template-columns: 1fr; } }


/* ── 28 Ağu 2026: Sayfa düzeni motoru ─────────────────────────────────────────
   Gizleme için AYRI sınıf: JS'in yönettiği .hidden/.visible sınıflarıyla ÇAKIŞMAZ.
   Blok DOM'da kalır (kategori ızgarasını dolduran fonksiyon şeridin içinden çağrılıyor,
   DOM'dan çıkarsak ızgara sonsuza dek boş kalırdı). */
.v3-theme .layout-gizli { display: none !important; }


/* ── 28 Ağu 2026: Sayfa düzeni motorunda flaş ürün, öne çıkanlar kapsayıcısının DIŞINDA ──
   Eski yapıda flash #featuredSlider içindeydi; bu yüzden home.js flash gelince slider'ın
   'hidden' sınıfını söküyordu (flash kaybolmasın diye). Ayrıldıktan sonra o satır boş bir
   öne-çıkanlar kapsayıcısını görünür yapabilir. Paylaşılan home.js'e DOKUNMADAN çözüm:
   kart yoksa kapsayıcıyı CSS ile gizle. Kural YALNIZ layout view'da (.layout-motor) geçerli —
   eski v3 şablonunda flash hâlâ içeride, orada uygulanırsa flash da kaybolurdu. */
.v3-theme.layout-motor .featured-slider:not(:has(.featured-card)) { display: none !important; }
/* :has() desteklemeyen eski tarayıcı: en azından boş iç kapsayıcıyı kaldır */
.v3-theme.layout-motor .featured-inner:empty { display: none; }


/* ── 28 Ağu 2026: ÖNİZLEMEDE TÜM BLOKLAR GÖRÜNÜR ──────────────────────────────
   Mustafa: "tekrar sipariş gibi alanlar tema düzenleyicide HER ZAMAN gözükmeli".
   Müşteri sitesinde bu bloklar veri koşuluna bağlı (sadakat kapalı, geçmiş sipariş yok,
   flaş ürün seçilmemiş → JS göstermiyor). Bayi düzeni kurarken hepsini görmeli.
   Kural YALNIZ önizlemede (body.te-onizleme) geçerli; müşteri sitesinde hiçbir şey değişmez. */
.v3-theme.te-onizleme .flash-banner,
.v3-theme.te-onizleme .loyalty-banner,
.v3-theme.te-onizleme .loyalty-banner.hidden,
.v3-theme.te-onizleme .campaigns-banner-card { display: flex !important; }
.v3-theme.te-onizleme .quick-reorder,
.v3-theme.te-onizleme .featured-slider,
.v3-theme.te-onizleme .featured-slider.hidden { display: block !important; }
.v3-theme.te-onizleme .featured-inner:empty { display: none; }

/* Bayi bloğu KENDİ gizlediyse önizlemede de gizli kalsın — bu kural yukarıdakilerden
   SONRA geldiği icin esit ozgullukte kazanir. */
.v3-theme.te-onizleme .layout-gizli { display: none !important; }

/* Önizlemede boş bloğun ne olduğu anlaşılsın */
.v3-theme.te-onizleme .flash-banner::after,
.v3-theme.te-onizleme .loyalty-banner::after,
.v3-theme.te-onizleme .quick-reorder::after {
  content: 'önizleme'; position: absolute; top: 6px; right: 10px;
  font-size: 9px; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(0,0,0,.55); color: #fff; padding: 2px 7px; border-radius: 20px; pointer-events: none;
}
.v3-theme.te-onizleme .flash-banner,
.v3-theme.te-onizleme .loyalty-banner,
.v3-theme.te-onizleme .quick-reorder { position: relative; }
