/* Anasayfa banner'ları — Banner / Vitrin oluşturucu (durum.md 7.16).
   Vitrin (anasayfa) ve panel önizlemesi bu dosyayı ortak kullanır. Tailwind'siz, önek `kb-`.
   İçerik kapsayıcı birimleriyle (cqw/cqh) kutuya göre ölçeklenir: aynı tasarım 1920 px masaüstünde de,
   375 px telefonda da, paneldeki küçük önizlemede de aynı oranda görünür. Kutunun boyutunu çağıran verir. */

.kb {
  position: absolute; inset: 0; overflow: hidden;
  container: kb / size;
  font-family: inherit; color: #fff; isolation: isolate;
  -webkit-font-smoothing: antialiased;
}
.kb *, .kb *::before, .kb *::after { box-sizing: border-box; }

/* ---------- Fotoğraf banner ---------- */
.kb-foto { background: #0b1220; }
/* Oranı kutuya uymayan fotoğrafın kenarları aynı fotoğrafın bulanık hâliyle dolar (kesilme, şerit yok) */
.kb-foto::before {
  content: ""; position: absolute; inset: -40px; z-index: 0;
  background: var(--kb-zemin) center / cover no-repeat;
  filter: blur(26px) saturate(1.15) brightness(.85); transform: scale(1.08);
}
.kb-foto picture, .kb-bag { position: absolute; inset: 0; display: block; z-index: 1; }
.kb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.kb-bag { cursor: pointer; }
.kb-bag:focus-visible { outline: 3px solid #fde047; outline-offset: -3px; }
/* Vitrin slaytında alttaki noktalar/oklar her fotoğrafta okunsun */
.kb-yer-vitrin.kb-foto::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(2, 6, 23, .55), rgba(2, 6, 23, 0));
}

/* ---------- Vitrin oluşturucu (tasarım) ---------- */
.kb-tasarim {
  --kb-bg: #b91c1c; --kb-yazi: #fff; --kb-vurgu: #fde047;
  --kb-etiket-bg: rgba(255, 255, 255, .16); --kb-etiket-yazi: #fff; --kb-etiket-kenar: rgba(255, 255, 255, .28);
  --kb-dugme-bg: #fff; --kb-dugme-yazi: #b91c1c; --kb-desen: rgba(255, 255, 255, .22);
  --kb-perde: rgba(127, 16, 16, .92); --kb-kart: #fff; --kb-kart-yazi: #0f172a; --kb-kart-marka: #d30f0f;
  background: var(--kb-bg); color: var(--kb-yazi);
}
/* .kb kapsayıcının kendisi cq birimini kendine göre değil üst kapsayıcıya göre ölçer; bu yüzden dolgu içteki
   .kb-ic'dedir. Vitrin slaytında alttaki nokta/ok satırı için .kb'ye px dolgu verilir (kapsayıcı kutusu küçülür). */
.kb-yer-vitrin.kb-tasarim { padding-bottom: 46px; }
.kb-ic { position: relative; height: 100%; display: flex; align-items: center; gap: 4cqw; padding: 7cqh 5.5cqw; }
.kb-arka { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.kb-gorselli::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--kb-perde) 0%, var(--kb-perde) 28%, transparent 78%);
}
.kb-desen {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, var(--kb-desen) 1.1px, transparent 1.6px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 75%); mask-image: linear-gradient(100deg, transparent 30%, #000 75%);
  opacity: .55;
}
.kb-desen::before, .kb-desen::after {
  content: ""; position: absolute; border-radius: 50%; border: 2px solid var(--kb-desen);
}
.kb-desen::before { width: 90cqh; height: 90cqh; right: -22cqh; top: -38cqh; opacity: .7; }
.kb-desen::after { width: 52cqh; height: 52cqh; right: 18cqw; bottom: -30cqh; opacity: .45; }
.kb-gorselli .kb-desen { opacity: .25; }

.kb-sol {
  position: relative; z-index: 2; flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3.4cqh;
}
.kb-etiket {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: min(4.2cqh, 1.55cqw); font-weight: 800; line-height: 1; letter-spacing: .09em; text-transform: uppercase;
  padding: .7em 1.1em; border-radius: 999px;
  background: var(--kb-etiket-bg); color: var(--kb-etiket-yazi); border: 1px solid var(--kb-etiket-kenar);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kb-etiket::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--kb-vurgu); flex: none; box-shadow: 0 0 0 .25em color-mix(in srgb, var(--kb-vurgu) 30%, transparent); }
.kb-baslik {
  margin: 0; font-size: min(12.5cqh, 4.7cqw); font-weight: 900; line-height: 1.02; letter-spacing: -.02em;
  color: inherit; max-width: 21ch; text-wrap: balance; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .18);
}
.kb-baslik span { color: var(--kb-vurgu); }
.kb-alt {
  margin: 0; font-size: min(5.2cqh, 1.95cqw); line-height: 1.38; font-weight: 500; opacity: .92; max-width: 46ch;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.kb-dugme {
  display: inline-flex; align-items: center; gap: .55em; margin-top: .6cqh;
  font-size: min(4.8cqh, 1.8cqw); font-weight: 800; line-height: 1; text-decoration: none; white-space: nowrap;
  padding: .95em 1.45em; border-radius: 999px;
  background: var(--kb-dugme-bg); color: var(--kb-dugme-yazi);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.kb-dugme svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.kb-dugme:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .5); }
.kb-dugme:hover svg { transform: translateX(3px); }
.kb-dugme:focus-visible, .kb-urun:focus-visible { outline: 3px solid var(--kb-vurgu); outline-offset: 3px; }

.kb-urunler { position: relative; z-index: 2; flex: 0 0 auto; display: flex; align-items: center; gap: 1.6cqw; }
.kb-urun {
  --kb-gen: min(15cqw, 50cqh);
  width: var(--kb-gen); display: flex; flex-direction: column; gap: 1.2cqh;
  padding: 1.5cqh; border-radius: 2.6cqh; text-decoration: none;
  background: var(--kb-kart); color: var(--kb-kart-yazi);
  box-shadow: 0 18px 34px -18px rgba(2, 6, 23, .6), 0 2px 6px rgba(2, 6, 23, .12);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease;
}
.kb-u1 .kb-urun { --kb-gen: min(22cqw, 66cqh); }
.kb-u2 .kb-urun { --kb-gen: min(18cqw, 58cqh); }
.kb-urun:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -18px rgba(2, 6, 23, .7); }
@container kb (min-width: 561px) {
  .kb-u3 .kb-urun:nth-child(2) { transform: translateY(-3cqh); }
  .kb-u3 .kb-urun:nth-child(2):hover { transform: translateY(calc(-3cqh - 4px)); }
}
.kb-urun-gorsel { aspect-ratio: 1; border-radius: 1.8cqh; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.kb-urun-gorsel img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.kb-urun:hover .kb-urun-gorsel img { transform: scale(1.08); }
.kb-urun-yazi { display: flex; flex-direction: column; gap: .3em; min-width: 0; padding: 0 .3cqh .4cqh; }
.kb-urun-yazi small { font-size: min(3.9cqh, 1.25cqw); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--kb-kart-marka); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-urun-yazi b {
  font-size: min(4.3cqh, 1.4cqw); font-weight: 700; line-height: 1.22;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}

/* Telefon ve dar kutu: metin solda, ürünler sağda alt alta küçük kare */
@container kb (max-width: 560px) {
  .kb-ic { gap: 3.5cqw; padding: 6cqh 5cqw; }
  .kb-sol { gap: 3cqh; }
  .kb-etiket { font-size: min(4.6cqh, 2.9cqw); }
  .kb-baslik { font-size: min(11cqh, 7.6cqw); max-width: none; }
  .kb-alt { font-size: min(5.6cqh, 3.7cqw); }
  .kb-dugme { font-size: min(5.2cqh, 3.5cqw); }
  .kb-urunler { flex-direction: column; gap: 2.6cqh; }
  .kb-urun, .kb-u1 .kb-urun, .kb-u2 .kb-urun { --kb-gen: min(27cqh, 23cqw); padding: 1cqh; border-radius: 2.2cqh; }
  .kb-u1 .kb-urun { --kb-gen: min(46cqh, 30cqw); }
  .kb-u2 .kb-urun { --kb-gen: min(36cqh, 26cqw); }
  .kb-urun-yazi { display: none; }
  .kb-gorselli::before { background: linear-gradient(90deg, var(--kb-perde) 0%, var(--kb-perde) 45%, color-mix(in srgb, var(--kb-perde) 55%, transparent) 100%); }
}

/* ---------- Hazır temalar (anahtarlar panel/banner_modelleri.py BANNER_TEMALARI) ---------- */
.kb-t-kuzey { --kb-bg: radial-gradient(120% 140% at 0% 0%, #ef4444 0%, #c40f0f 38%, #7f1010 70%, #1e0a10 100%); --kb-perde: rgba(150, 14, 14, .93); }
.kb-t-gece {
  --kb-bg: radial-gradient(120% 140% at 100% 100%, #2563eb 0%, #1e3a8a 32%, #0f172a 70%, #020617 100%);
  --kb-vurgu: #7dd3fc; --kb-dugme-bg: #d30f0f; --kb-dugme-yazi: #fff; --kb-perde: rgba(15, 23, 42, .94);
}
.kb-t-altin {
  --kb-bg: linear-gradient(135deg, #fef3c7 0%, #fcd34d 30%, #f59e0b 65%, #b45309 100%);
  --kb-yazi: #1c1917; --kb-vurgu: #b91c1c; --kb-etiket-bg: #1c1917; --kb-etiket-yazi: #fde68a; --kb-etiket-kenar: #1c1917;
  --kb-dugme-bg: #1c1917; --kb-dugme-yazi: #fff; --kb-desen: rgba(28, 25, 23, .2); --kb-perde: rgba(253, 230, 138, .95);
}
.kb-t-altin .kb-baslik { text-shadow: none; }
.kb-t-turuncu { --kb-bg: radial-gradient(120% 140% at 0% 0%, #fb923c 0%, #ea580c 40%, #9a3412 75%, #431407 100%); --kb-vurgu: #fef08a; --kb-dugme-yazi: #c2410c; --kb-perde: rgba(154, 52, 18, .93); }
.kb-t-zumrut { --kb-bg: radial-gradient(120% 140% at 0% 100%, #34d399 0%, #059669 35%, #065f46 70%, #022c22 100%); --kb-vurgu: #fef08a; --kb-dugme-yazi: #047857; --kb-kart-marka: #047857; --kb-perde: rgba(6, 78, 59, .93); }
.kb-t-mor { --kb-bg: radial-gradient(120% 140% at 100% 0%, #c084fc 0%, #7c3aed 38%, #4c1d95 72%, #1e1b4b 100%); --kb-vurgu: #fde68a; --kb-dugme-yazi: #6d28d9; --kb-kart-marka: #6d28d9; --kb-perde: rgba(59, 7, 100, .93); }
.kb-t-grafit {
  --kb-bg: linear-gradient(135deg, #4b5563 0%, #1f2937 45%, #030712 100%);
  --kb-vurgu: #facc15; --kb-dugme-bg: #facc15; --kb-dugme-yazi: #111827; --kb-perde: rgba(17, 24, 39, .94);
}
.kb-t-grafit::after { /* sarı-siyah endüstriyel şerit */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; z-index: 1;
  background: repeating-linear-gradient(-45deg, #facc15 0 12px, #111827 12px 24px); opacity: .9;
}
.kb-t-acik {
  --kb-bg: linear-gradient(120deg, #ffffff 0%, #f8fafc 45%, #e2e8f0 100%);
  --kb-yazi: #0f172a; --kb-vurgu: #d30f0f; --kb-etiket-bg: #fee2e2; --kb-etiket-yazi: #b91c1c; --kb-etiket-kenar: #fecaca;
  --kb-dugme-bg: #d30f0f; --kb-dugme-yazi: #fff; --kb-desen: rgba(15, 23, 42, .14); --kb-perde: rgba(255, 255, 255, .95);
}
.kb-t-acik .kb-baslik { text-shadow: none; }
.kb-t-acik .kb-urun { box-shadow: 0 0 0 1px #e2e8f0, 0 16px 30px -18px rgba(15, 23, 42, .35); }

/* ---------- "Ürünlerin üstünde" alanı (katalog/_banner.html) ---------- */
/* Ürünler panelinin üstünde kendi başına durur; çevresinde ince açık çerçeve (ürünler paneliyle aynı cam zemin) */
.kb-alan {
  position: relative; padding: 8px; border-radius: 26px;
  background: rgba(241, 245, 249, .88); border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 30px 60px -30px rgba(2, 6, 23, .6);
}
/* Noktalar banner'ın içinde alt ortada (çerçeve dört kenarda eşit ince kalsın) */
.kb-alan .kb-noktalar {
  position: absolute; left: 50%; bottom: 14px; z-index: 6; margin: 0; padding: 0 6px; transform: translateX(-50%);
  border-radius: 999px; background: rgba(2, 6, 23, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.kb-alan .kb-nokta i { background: rgba(255, 255, 255, .6); }
.kb-alan .kb-nokta.aktif i { background: rgba(255, 255, 255, .35); }
@media (max-width: 639px) { .kb-alan { padding: 5px; border-radius: 19px; } .kb-alan .kb-noktalar { bottom: 9px; } }
.kb-sahne {
  position: relative; width: 100%; aspect-ratio: 16 / 5; border-radius: 18px; overflow: hidden;
  background: #0b1220; box-shadow: 0 20px 44px -24px rgba(15, 23, 42, .55), 0 2px 6px rgba(15, 23, 42, .08);
  isolation: isolate;
}
@media (max-width: 639px) {
  .kb-sahne { border-radius: 14px; }
  .kb-sahne.kb-mobil-oran { aspect-ratio: 3 / 2; }
}
.kb-slayt { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: scale(1.015); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .7s; }
.kb-slayt.aktif { opacity: 1; visibility: visible; transform: none; transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1), visibility 0s; z-index: 1; }
.kb-slayt .kb-sol > *, .kb-slayt .kb-urun { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.kb-slayt.aktif .kb-sol > *, .kb-slayt.aktif .kb-urun { opacity: 1; transform: none; }
@container kb (min-width: 561px) { .kb-slayt.aktif .kb-u3 .kb-urun:nth-child(2) { transform: translateY(-3cqh); } }
.kb-slayt.aktif .kb-sol > :nth-child(2), .kb-slayt.aktif .kb-urun:nth-child(1) { transition-delay: .08s; }
.kb-slayt.aktif .kb-sol > :nth-child(3), .kb-slayt.aktif .kb-urun:nth-child(2) { transition-delay: .16s; }
.kb-slayt.aktif .kb-sol > :nth-child(4), .kb-slayt.aktif .kb-urun:nth-child(3) { transition-delay: .24s; }

.kb-ok {
  position: absolute; top: 50%; z-index: 5; width: 42px; height: 42px; margin-top: -21px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .9); color: #0f172a; box-shadow: 0 8px 20px -8px rgba(2, 6, 23, .5);
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.kb-ok svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.kb-ok-sol { left: 12px; }
.kb-ok-sag { right: 12px; }
.kb-sahne:hover .kb-ok, .kb-ok:focus-visible { opacity: 1; }
.kb-ok:hover { transform: scale(1.08); }
.kb-ok:focus-visible { outline: 3px solid #d30f0f; outline-offset: 2px; }
@media (hover: none) {
  .kb-ok { opacity: .85; width: 34px; height: 34px; margin-top: -17px; }
  .kb-ok-sol { left: 6px; } .kb-ok-sag { right: 6px; }
}
/* Telefonda oklar yazının/ürünlerin üstüne biniyordu: parmakla kaydırma + büyük noktalar */
@media (max-width: 639px) {
  .kb-ok { display: none; }
  .kb-nokta { width: 38px; height: 32px; }
}
.kb-noktalar { display: flex; justify-content: center; align-items: center; gap: 2px; margin-top: 6px; }
.kb-nokta { width: 30px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.kb-nokta i { display: block; position: relative; overflow: hidden; width: 8px; height: 8px; border-radius: 999px; background: #94a3b8; transition: width .3s ease, background .3s ease; }
.kb-nokta.aktif i { width: 28px; background: #fecaca; }
.kb-nokta.aktif i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--dolum, 0%); background: #d30f0f; }
.kb-nokta:focus-visible { outline: 2px solid #d30f0f; outline-offset: 1px; border-radius: 6px; }

/* ---------- Vitrin (kampanya slaytları) içinde ---------- */
.banner-slayt.kb-vslayt { padding: 0; display: block; }
.banner-slayt.kb-vslayt::before, .banner-slayt.kb-vslayt::after { display: none; }
/* Masaüstü cam görünümünde de banner kendi renginde kalır */
.vitrin-bas .banner-slayt.kb-vslayt { background: #0b1220; }

@media (prefers-reduced-motion: reduce) {
  .kb-slayt, .kb-slayt.aktif, .kb-slayt .kb-sol > *, .kb-slayt .kb-urun, .kb-dugme, .kb-dugme svg, .kb-urun, .kb-urun-gorsel img, .kb-nokta i, .kb-ok { transition: none !important; }
  .kb-slayt .kb-sol > *, .kb-slayt .kb-urun { opacity: 1; transform: none; }
}
