/* Üst menü: kategori çubuğunun açılır geniş paneli (mega menü) ve mobil menünün alt kategori akordeonu.
   Şablon: sablonlar/_ust_menu.html · davranış: statik/site.js ("mega menü" bölümü) · veri: yd/site_menu.py.
   Renkler tasarımın paletinden: lacivert #0C1538, gri #4B5275, çizgi #E4E3EE, mor #5B4BE8 / #4636C4, açık mor #F5F3FF.
   v20: panel = başlık satırı + gruplar (CSS sütunları, yüksekliğe göre dengeli) + sağda öne çıkan alanı. Hiyerarşi:
   grup başlığı 14 px kalın lacivert (yanında ürün sayısı), 2. düzey bağlantı 600 lacivert, 3. düzey 500 gri. */

/* ---------- masaüstü: üst öğeler ---------- */
.yd-mm { position: relative; }
.yd-mm-liste { min-width: 0; }
.yd-mm-oge { position: static; }
.yd-mm-bas { position: relative; display: flex; align-items: center; }
/* alt menü düğmesi: çubuğun düzenini değiştirmesin diye öğeler arası boşluğa oturur; üzerine gelince, klavye
   odağında ya da panel açıkken görünür */
.yd-mm-ac { position: absolute; left: calc(100% + 1px); top: 50%; transform: translateY(-50%); width: 22px; height: 28px;
  display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: #4B5275; cursor: pointer; opacity: 0; transition: opacity .12s; }
.yd-mm-oge:hover .yd-mm-ac, .yd-mm-ac:focus-visible, .yd-mm-ac[aria-expanded="true"] { opacity: 1; }
.yd-mm-ac:hover { background: #F5F3FF; color: #4636C4; }
.yd-mm-ac svg { transition: transform .15s; }
.yd-mm-ac[aria-expanded="true"] svg { transform: rotate(180deg); }
.yd-mm-oge.acik > .yd-mm-bas > a { box-shadow: inset 0 -2px 0 #5B4BE8; }
.yd-mm-oge > .yd-mm-bas > a:hover { color: #4636C4; }
.yd-mm-yeni { display: inline-flex; align-items: center; padding: 1px 7px; line-height: 1.45; letter-spacing: .02em; }

/* ---------- masaüstü: panel ---------- */
.yd-mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: #FFFFFF;
  border-top: 1px solid #E4E3EE; border-bottom: 1px solid #E4E3EE;
  box-shadow: 0 28px 48px -16px rgba(12, 21, 56, .22); font-weight: 500;
  max-height: calc(100vh - 140px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.yd-mega-ic { display: flex; flex-direction: column; gap: 18px; padding: 20px 24px 24px; }
.yd-mega-bas { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px;
  padding-bottom: 14px; border-bottom: 1px solid #E4E3EE; }
.yd-mega-bas-sol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.yd-mega-govde { display: flex; align-items: flex-start; gap: 32px; }
.yd-mega-ana { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.yd-mega a:hover { color: #4636C4; }
.yd-mega-hepsi { white-space: nowrap; }
.yd-mega-listeli .yd-mega-ana, .yd-mega-kutulu .yd-mega-ana { gap: 18px; }
.yd-mega-kutulu .yd-mega-kutular + .yd-mega-tumu { margin-top: -6px; }
.yd-mega-yanli > .yd-mega-ana { padding-top: 2px; }
.yd-mega-grup-tekil, .yd-mega-grup-cok, .yd-mega-grup-urun { min-width: 0; }
.yd-mega-k2-ad { min-width: 0; }

/* gruplar: CSS sütunları (masonry). Grup bölünmez; 8'den uzun liste (yd-mega-akar) sütunlar arasında akar ve
   başlığı ilk satırlarından ayrılmaz. Sütun sayısı sunucudan (yd-mega-s<n>), en az genişlik dar ekranda azaltır. */
.yd-mega-gruplar { column-gap: 36px; column-fill: balance; }
.yd-mega-s1 { column-count: 1; max-width: 360px; }
.yd-mega-s2 { columns: 2 200px; max-width: 640px; }
.yd-mega-s3 { columns: 3 190px; }
.yd-mega-s4 { columns: 4 180px; }
.yd-mega-s5 { columns: 5 160px; }
.yd-mega-grup { display: block; break-inside: avoid; padding-bottom: 22px; }
.yd-mega-grup.yd-mega-akar { break-inside: auto; }
.yd-mega-baslik { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #0C1538; font-weight: 700;
  font-size: 14px; line-height: 1.35; break-after: avoid; }
a.yd-mega-baslik:hover .yd-mega-baslik-ad { text-decoration: underline; text-underline-offset: 3px; }
.yd-mega-baslik-ad { min-width: 0; }
.yd-mega-baslik-etiket { cursor: default; }
.yd-mega-sayi { flex: 0 0 auto; padding: 0 7px; border-radius: 999px; background: #F5F3FF; color: #4B5275;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; font-weight: 500; line-height: 1.6; }
.yd-mega-alt { display: block; }
.yd-mega-alt > li { break-inside: avoid; }
.yd-mega-alt a { display: flex; align-items: center; gap: 8px; min-height: 30px; margin: 0 -8px; padding: 3px 8px;
  border-radius: 8px; box-sizing: border-box; color: #4B5275; font-weight: 500; font-size: 13.5px; line-height: 1.35; }
.yd-mega-alt a:hover { background: #F5F3FF; color: #4636C4; }
.yd-mega-alt a.yd-mega-k2 { color: #0C1538; font-weight: 600; }
.yd-mega-alt a.yd-mega-k2:hover { color: #4636C4; }
.yd-mega-alt a.yd-mega-tumu, .yd-mega-tumu { color: #5B4BE8; font-weight: 600; }
.yd-mega-etiket { letter-spacing: .04em; line-height: 1.6; }
/* simgeli düzen: 2. düzeyin yanında küçük görsel ya da çizgi simge */
.yd-mega-simge { flex: 0 0 40px; width: 40px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; background: #F5F3FF; border: 1px solid #E9E5FF; overflow: hidden; box-sizing: border-box; }
.yd-mega-simge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yd-mega-simge svg { width: 28px; height: auto; }
.yd-mega-alt-simgeli a { min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
.yd-mega-simgeli .yd-mega-baslik { min-height: 32px; }

/* sağdaki öne çıkan alanı: tanıtım + ürün kartları (görsel, ad, gerçek fiyat) */
.yd-mega-yan { flex: 0 0 272px; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-left: 28px;
  border-left: 1px solid #E4E3EE; }
.yd-mega-yan-bas { letter-spacing: .04em; line-height: 1.6; }
.yd-mega-yan-liste { display: flex; flex-direction: column; gap: 2px; }
.yd-mega-urun { display: flex; align-items: center; gap: 12px; margin: 0 -8px; padding: 6px 8px; border-radius: 12px;
  color: #0C1538; }
.yd-mega-urun:hover { background: #F5F3FF; color: #0C1538; }
.yd-mega-urun-resim { position: relative; flex: 0 0 56px; width: 56px; height: 56px; display: flex; align-items: center;
  justify-content: center; border-radius: 10px; background: #F5F3FF; border: 1px solid #E9E5FF; overflow: hidden;
  box-sizing: border-box; }
.yd-mega-urun-resim img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yd-mega-urun-resim svg { width: 34px; height: auto; }
.yd-mega-urun-metin { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.yd-mega-urun-ad { font-weight: 600; font-size: 13.5px; line-height: 1.3; overflow: hidden; display: -webkit-box;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.yd-mega-urun:hover .yd-mega-urun-ad { color: #4636C4; }
.yd-mega-urun-fiyat { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; font-weight: 600; color: #0C1538; }
.yd-mega-kdv { font-weight: 500; color: #4B5275; }
.yd-mega-urun-fiyatsiz { font-family: inherit; font-weight: 500; color: #4B5275; }
.yd-mega-tanitim { min-width: 0; }
.yd-mega-tanitim:hover { color: #0C1538; }
.yd-mega-gorsel { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #F5F3FF; }
/* ürün kutuları: alt kategorisi olmayan kök (panelin tamamı) ve seyrek panelde genişleyen öne çıkan alanı */
.yd-mega-urunler { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.yd-mega-yan-genis .yd-mega-yan-liste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.yd-mega-urun-kutu, .yd-mega-yan-genis .yd-mega-urun { flex-direction: column; align-items: stretch; gap: 8px; margin: 0;
  padding: 0 0 6px; }
.yd-mega-urun-kutu:hover, .yd-mega-yan-genis .yd-mega-urun:hover { background: transparent; }
.yd-mega-urun-kutu .yd-mega-urun-resim, .yd-mega-yan-genis .yd-mega-urun-resim { width: 100%; height: auto; flex: 0 0 auto;
  aspect-ratio: 4 / 3; border-radius: 12px; transition: border-color .15s; }
.yd-mega-urun-kutu:hover .yd-mega-urun-resim, .yd-mega-yan-genis .yd-mega-urun:hover .yd-mega-urun-resim { border-color: #CFC8FF; }
.yd-mega-urun-kutu .yd-mega-urun-resim svg, .yd-mega-yan-genis .yd-mega-urun-resim svg { width: 30%; max-width: 64px; }
/* v31: seyrek panelde sol sütun içeriği kadar (en az 168, en çok 300 px), kalan genişlik ürünlere. v30.9'da sol sütun
   flex: 0 1 300px idi; büyük (1200 px) ürün görselleri sağ alanın içerik genişliğini büyütüp sol sütunu 68–71 px'e
   sıkıştırıyordu (Kartvizitler: "Çift Yön Kartvizit" kırılıp kenara yapışıyordu). */
.yd-mega-yan-genis .yd-mega-ana { flex: 0 0 auto; width: max-content; min-width: 168px; max-width: 300px; }
.yd-mega-yan-genis .yd-mega-yan { flex: 1 1 0; min-width: 0; }

/* v21 · sütun düzeni (elle): panelden kurulan 2–5 eşit sütun. Sütun bölünmez; başlık grup başlığıyla aynı.
   Ürün öğesi: isteğe bağlı küçük görsel (40×30, simgeli düzenle aynı kutu) ve gerçek fiyat. */
.yd-mega-elle { display: grid; grid-template-columns: repeat(var(--yd-elle-n, 3), minmax(0, 1fr)); gap: 4px 32px; align-items: start; }
.yd-mega-elle-s2 { --yd-elle-n: 2; max-width: 680px; }
.yd-mega-elle-s3 { --yd-elle-n: 3; }
.yd-mega-elle-s4 { --yd-elle-n: 4; }
.yd-mega-elle-s5 { --yd-elle-n: 5; gap: 4px 24px; }
.yd-mega-elle-sutun { padding-bottom: 10px; min-width: 0; }
.yd-mega-elle-liste a.yd-mega-elle-urun { align-items: center; gap: 10px; min-height: 40px; color: #0C1538; font-weight: 600; }
.yd-mega-elle-resim { flex-basis: 40px; }
.yd-mega-elle-metin { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.yd-mega-elle-metin > span:first-child { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.yd-mega-elle-metin .yd-mega-urun-fiyat { font-size: 12px; }
.yd-mega-elle-liste a.yd-mega-elle-urun:hover { color: #4636C4; }
@media (max-width: 1100px) {
  .yd-mega-elle-s4, .yd-mega-elle-s5 { --yd-elle-n: 3; }
}

/* v31 · Sütunlar görünümü (sahibin AFİŞLER şeması): her alt kategori bir sütun; başlık, bağlantılar, sonda "Tüm …" */
.yd-mega-sutunlu { display: grid; grid-template-columns: repeat(var(--yd-su-n, 4), minmax(0, 1fr)); gap: 4px 28px; align-items: start; }
.yd-mega-sutunlu-s1 { --yd-su-n: 1; max-width: 320px; }
.yd-mega-sutunlu-s2 { --yd-su-n: 2; max-width: 640px; }
.yd-mega-sutunlu-s3 { --yd-su-n: 3; }
.yd-mega-sutunlu-s4 { --yd-su-n: 4; }
.yd-mega-sutunlu-s5 { --yd-su-n: 5; gap: 4px 24px; }
.yd-mega-sutunlu-s6 { --yd-su-n: 6; gap: 4px 22px; }
.yd-mega-sutunlu-sutun { padding-bottom: 10px; min-width: 0; }
.yd-mega-sutunlu-sutun .yd-mega-alt a { overflow-wrap: anywhere; }
.yd-mega-alt a.yd-mega-sutunlu-tumu { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1240px) {
  .yd-mega-sutunlu-s5, .yd-mega-sutunlu-s6 { --yd-su-n: 4; }
}
@media (max-width: 1023px) {
  .yd-mega-sutunlu-s4, .yd-mega-sutunlu-s5, .yd-mega-sutunlu-s6 { --yd-su-n: 3; }
}

/* görsel yüklenemedi (site.js): boş kutu yerine genel çizgi simge */
.yd-mm-gorsel-hata > img { display: none; }
.yd-mm-gorsel-hata::before { content: ""; width: 46%; max-width: 64px; aspect-ratio: 56 / 44; background: center / contain no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 44' fill='none' stroke='%230C1538' stroke-width='1.6' stroke-linejoin='round'%3E%3Crect x='8' y='6' width='40' height='32' rx='3' fill='%23E9E5FF'/%3E%3Cpath d='M8 32l12-11 9 8 6-5 13 10'/%3E%3Ccircle cx='37' cy='15' r='3' fill='%23FFFFFF'/%3E%3C/svg%3E"); }

@media (max-width: 1240px) {
  .yd-mega-govde { gap: 24px; }
  .yd-mega-yan { flex-basis: 236px; padding-left: 22px; }
  .yd-mega-gruplar { column-gap: 28px; }
}
@media (max-width: 1100px) {
  .yd-mega-yan { flex-basis: 216px; padding-left: 18px; }
  .yd-mega-s4, .yd-mega-s5 { column-count: 3; }
  .yd-mega-urunler, .yd-mega-yan-genis .yd-mega-yan-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yd-mega-yan-genis .yd-mega-yan-liste > li:nth-child(n+7) { display: none; }   /* iki tam sıra */
}
@media (max-width: 900px) {
  .yd-mega-yan:not(:only-child) { display: none; }   /* dar masaüstünde gruplar öncelikli; ürünler kategori sayfasında */
  .yd-mega-yan-genis .yd-mega-yan { display: flex; }
}

/* ---------- mobil menü: alt kategori akordeonu ---------- */
.yd-mm-mobil > summary, .yd-mm-mobil-ic > summary { list-style: none; }
.yd-mm-mobil > summary::-webkit-details-marker, .yd-mm-mobil-ic > summary::-webkit-details-marker { display: none; }
.yd-mm-ok { flex: 0 0 auto; transition: transform .15s; }
.yd-mm-mobil[open] > summary .yd-mm-ok, .yd-mm-mobil-ic[open] > summary .yd-mm-ok { transform: rotate(180deg); }
.yd-mm-mobil[open] > summary { color: #4636C4; }
.yd-mm-mobil-liste { margin: 0 0 12px; padding: 0 0 0 14px; border-left: 2px solid #E9E5FF; font-size: 15px; }
.yd-mm-mobil-liste a { line-height: 1.35; }
.yd-mm-mobil-liste a, .yd-mm-mobil-liste summary { overflow-wrap: anywhere; }
.yd-mm-mobil-ic > ul { padding-left: 12px; font-size: 14.5px; }
.yd-mm-mobil-ic > summary { font-weight: 600; }
.yd-mm-mobil-ic[open] > summary { color: #4636C4; }
.yd-mm-mobil-etiket { padding: 14px 0 2px; letter-spacing: .04em; }
.yd-mm-mobil-urun { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 4px 0; color: #0C1538; }
.yd-mm-mobil-urun .yd-mega-urun-resim { flex-basis: 44px; width: 44px; height: 44px; border-radius: 8px; }
.yd-mm-mobil-urun .yd-mega-urun-resim svg { width: 28px; }
.yd-mm-mobil-urun .yd-mega-urun-ad { font-size: 14.5px; }

@media print { .yd-mega { display: none !important; } }

/* ---------- görselli düzen (ör. Reklam Malzemeleri): alt kategori kutuları ---------- */
.yd-mega-kutular { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 22px 16px; }
.yd-mega-kutu { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.yd-mega-kutu-bag { display: flex; flex-direction: column; gap: 8px; color: #0C1538; }
.yd-mega-kutu-resim { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 12px;
  background: #F5F3FF; border: 1px solid #E9E5FF; overflow: hidden; transition: border-color .15s, background .15s; }
.yd-mega-kutu-resim img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yd-mega-kutu-resim svg { width: 46%; max-width: 84px; height: auto; }
.yd-mega-kutu-bag:hover .yd-mega-kutu-resim { border-color: #CFC8FF; background: #EFEBFF; }
.yd-mega-kutu-ad { font-weight: 700; font-size: 14px; line-height: 1.3; }
.yd-mega-kutu-sayi { margin-top: -4px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px;
  font-weight: 500; color: #4B5275; }
.yd-mega-kutu-alt { display: flex; flex-direction: column; gap: 5px; }
.yd-mega-kutu-alt a { color: #4B5275; font-weight: 500; font-size: 13px; line-height: 1.35; }
.yd-mega-ek { padding-top: 14px; border-top: 1px solid #E4E3EE; letter-spacing: .02em; }
.yd-mega-ek-bag { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 14px 4px 4px;
  border: 1px solid #E4E3EE; border-radius: 12px; color: #0C1538; font-weight: 600; font-size: 14px; background: #FFFFFF; }
.yd-mega-ek-bag .yd-mega-kutu-resim { width: 52px; aspect-ratio: 4 / 3; border-radius: 8px; }
.yd-mega-ek-bag .yd-mega-kutu-resim svg { width: 34px; }
.yd-mega-ek-bag:hover { border-color: #CFC8FF; }

/* ---------- klavye: odaklanan bağlantı kaydırılan panelin kenarına yapışmasın (odak halkası sitenin ortak stilinden) */
.yd-mega a { scroll-margin: 12px 0; }

/* ---------- açılış hareketi (hareket.css'teki panel/grup hareketine ek: sağ alan) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .yd-mega:not([hidden]) .yd-mega-yan { animation: h-oge 280ms var(--h-egri-vurgu, ease) 80ms both; }
}
/* açık panelin altında kalan "yukarı çık" düğmesi panel açıkken gizlenir (site.js <html>'e yd-mm-acik verir) */
.yd-mm-acik .h-yukari { opacity: 0 !important; pointer-events: none !important; }

/* ---------- öne çıkarma: rozet (mor / lacivert / sarı), vurgulu bağlantı, öne çıkan ürün kartı ---------- */
.yd-mm-rozet { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; font-weight: 600; line-height: 1.5;
  letter-spacing: .02em; white-space: nowrap; vertical-align: 1px; position: relative; overflow: hidden; isolation: isolate; }
.yd-mm-rozet-mor { background: #5B4BE8; color: #FFFFFF; }
.yd-mm-rozet-lacivert { background: #0C1538; color: #FFFFFF; }
.yd-mm-rozet-sari { background: #FFD000; color: #0C1538; }
.yd-mm-one { color: #0C1538 !important; font-weight: 600 !important; }
.yd-mega-baslik.yd-mm-one, .yd-mega-kutu-bag.yd-mm-one .yd-mega-kutu-ad { font-weight: 700 !important; }
.yd-mega-kutu-ad .yd-mm-rozet { margin-left: 4px; }
.yd-mm-etiket { display: inline-flex; margin-left: 6px; font-size: 11px; }
/* öne çıkan ürün kartı (sağ alanın ilk kartı; panelde "görselli kart" işaretli ürün) */
.yd-mega-kart .yd-mega-urun-resim { flex-basis: 72px; width: 72px; height: 72px; }
.yd-mega-urun-ad .yd-mm-rozet { margin-left: 4px; }
.yd-mm-mobil-kart { padding: 6px 0; }
/* parıltı: rozetin üzerinden yumuşak bir ışık geçer (yalnız transform; yerleşim değişmez; hareket azaltmada yok) */
@media (prefers-reduced-motion: no-preference) {
  .yd-mm-parilti::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    transform: translateX(-120%); animation: yd-mm-parilti 2.8s var(--h-egri, ease) 1s infinite; }
  .yd-mm-rozet-lacivert.yd-mm-parilti::after, .yd-mm-rozet-mor.yd-mm-parilti::after {
    background: linear-gradient(105deg, transparent 30%, rgba(207, 200, 255, .55) 50%, transparent 70%); }
  .yd-mm-parilti { box-shadow: 0 0 0 0 rgba(91, 75, 232, .35); animation: yd-mm-hale 2.8s ease-out 1s infinite; }
  .yd-mm-rozet-sari.yd-mm-parilti { animation-name: yd-mm-hale-sari; }
}
@keyframes yd-mm-parilti { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
@keyframes yd-mm-hale { 0% { box-shadow: 0 0 0 0 rgba(91, 75, 232, .35); } 40%, 100% { box-shadow: 0 0 0 6px rgba(91, 75, 232, 0); } }
@keyframes yd-mm-hale-sari { 0% { box-shadow: 0 0 0 0 rgba(255, 208, 0, .5); } 40%, 100% { box-shadow: 0 0 0 6px rgba(255, 208, 0, 0); } }
@media (forced-colors: active) {
  .yd-mega-alt a:hover, .yd-mega-urun:hover { outline: 1px solid CanvasText; }
}

/* ---------- v31: kategori çubuğu her masaüstü genişliğinde TEK SATIR ----------
   v30.9'da 1101 px'ten genişte çubuk satır kırabiliyordu (canlıda dokuz öğe + "Tüm ürünler →" 1440'ta ikinci satıra
   düştü). JS'siz: liste tek satırda yatay kayar (aşağıdaki 761–1023 kuralıyla aynı). JS ile (site.js, nav'a yd-mm-tasma):
   sığmayan öğeler sondan başlayarak "Daha fazla" açılır listesine geçer (yd-mm-sigmaz: gizli); çubuk kesişmez.
   Öğeler sığdığında görünüm v30.9 ile aynıdır. */
@media (min-width: 761px) {
  .yd-kat-nav { flex-wrap: nowrap; }
  .yd-kat-nav .yd-mm-liste { flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; }
  .yd-kat-nav > a { flex: 0 0 auto; white-space: nowrap; }
  .yd-mm-oge > .yd-mm-bas > a { white-space: nowrap; }
  .yd-mm:not(.yd-mm-tasma) .yd-kat-nav .yd-mm-liste { overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    overscroll-behavior-x: contain; }
  .yd-mm:not(.yd-mm-tasma) .yd-kat-nav .yd-mm-liste::-webkit-scrollbar { display: none; }
  .yd-mm.yd-mm-tasma .yd-kat-nav .yd-mm-liste { overflow: visible; -webkit-mask-image: none; mask-image: none; padding-right: 0; }
  .yd-mm-oge.yd-mm-sigmaz { display: none; }
}
.yd-mm-daha { position: relative; flex: 0 0 auto; }
.yd-mm-daha[hidden] { display: none; }
.yd-mm-daha-dugme { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0; border: 0; background: transparent;
  color: #0C1538; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.yd-mm-daha-dugme:hover, .yd-mm-daha-dugme[aria-expanded="true"] { color: #4636C4; }
.yd-mm-daha-dugme svg { transition: transform .15s; }
.yd-mm-daha-dugme[aria-expanded="true"] svg { transform: rotate(180deg); }
.yd-mm-daha-liste { position: absolute; right: 0; top: 100%; z-index: 51; min-width: 220px; max-width: 320px; margin: 0; padding: 6px;
  list-style: none; background: #FFFFFF; border: 1px solid #E4E3EE; border-radius: 12px;
  box-shadow: 0 18px 36px -14px rgba(12, 21, 56, .28); }
.yd-mm-daha-liste[hidden] { display: none; }
.yd-mm-daha-liste a { display: flex; align-items: center; min-height: 40px; padding: 4px 12px; border-radius: 8px; color: #0C1538;
  font-weight: 600; font-size: 14px; white-space: normal; }
.yd-mm-daha-liste a:hover, .yd-mm-daha-liste a:focus-visible { background: #F5F3FF; color: #4636C4; }

/* ---------- dar masaüstü (761–1240 px): kategori çubuğu tek satırda kalır ----------
   Önce yazı ve aralık küçülür (ölçüm: 8 kök + "Tüm ürünler" 1240'ta 14/28, 1100'de 13,5/20, 1024'te 13/14 sığar);
   daha darda liste tek satırda yatay kayar, "Tüm ürünler →" sağda sabit kalır. Açılır panelin kapsayıcısı nav olduğu
   için kayan liste paneli kırpmaz. */
@media (min-width: 761px) and (max-width: 1240px) {
  .yd-kat-nav { font-size: 13.5px; column-gap: 20px; }
  .yd-kat-nav .yd-mm-liste { column-gap: 20px; }
  .yd-mm-ac { width: 16px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .yd-kat-nav { font-size: 13px; column-gap: 14px; flex-wrap: nowrap; }
  .yd-kat-nav .yd-mm-liste { column-gap: 14px; flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; }
  .yd-kat-nav > a { flex: 0 0 auto; white-space: nowrap; }
  .yd-mm-ac { width: 13px; left: 100%; }
  .yd-mm-oge > .yd-mm-bas > a { white-space: nowrap; }
}
@media (min-width: 761px) and (max-width: 1023px) {
  .yd-kat-nav .yd-mm-liste { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 24px; }
  .yd-kat-nav .yd-mm-liste::-webkit-scrollbar { display: none; }
}

/* ======================================================================================================================
   v11 — yapışık başlık, mobil başlık satırı ve arama satırı, mobil menü paneli, katman sırası.
   Şablon: sablonlar/taban.html ("ust" bloğu, mobil menü) · davranış: statik/site.js ("kaydırma kilidi", "mobil menü",
   "yapışık başlık").

   Katman sırası (z-index; tek yerde): sayfa < yapışık başlık 40 (içindeki mega menü ve arama listesi onunla birlikte)
   < yukarı çık düğmesi 55 < çerez kutusu 70 < pop-up 75 < mobil menü 78 < sepet çekmecesi 80 < uçan nokta 90
   < ürün görseli tam ekran görüntüleyici 95 (urun_galeri.css) < "İçeriğe geç" 100. Arama listesi açıkken başlık (ya da arama kutusu) çerez kutusunun üstüne çıkar (72): liste
   çerez kutusunun altında kalmasın. Aynı anda tek katman: menü açılınca sepet çekmecesi kapanır; pop-up menü
   kapanana kadar açılmaz (popup.js zaten bekler); açık pop-up ve çerez kutusu menünün altında kalır.

   --yd-ust-yukseklik: yapışık başlığın ekranın üstünde kapladığı yükseklik (masaüstü: arama satırı + kategori
   çubuğu, mobil: logo satırı; başlığı olmayan sayfada 0). site.js gerçek ölçüyü yazar; aşağıdaki değerler JS'siz
   ilk çizim içindir. Yapışık öğeler (ör. ürün sayfasının fiyat/önizleme sütunu) top: calc(var(--yd-ust-yukseklik,
   0px) + 16px) kullanır (urun.css .yd-stick, urun_secenek.css .yd-ozet-sutun, urun_tema.css .yd-a-sag); çapa ve odak kaydırması içerikteki öğelerin scroll-margin-top'u ile başlığın altında durur.
   ====================================================================================================================== */
:root { --yd-ust-yukseklik: 0px; }
@media (min-width: 761px) { :root:has(body > .yd-ust) { --yd-ust-yukseklik: 122px; } }
@media (min-width: 761px) and (max-height: 560px) { :root:has(body > .yd-ust) { --yd-ust-yukseklik: 0px; } }
@media (max-width: 760px) { :root:has(body > .yd-ust-m) { --yd-ust-yukseklik: 57px; } }
/* çapaya gitme, odak ve scrollIntoView: içerik yapışık başlığın altında kalmasın. html'e scroll-padding verilmez:
   Chrome yapışık başlığın içindeki arama kutusuna yazarken onu "örtülü" sayıp sayfayı her tuşta yukarı kaydırıyordu. */
:where(main, main *, footer *) { scroll-margin-top: calc(var(--yd-ust-yukseklik) + 12px); }

/* ---------- masaüstü: yapışık başlık ----------
   Üst şerit kayınca başlık durur; satırın 16 px'lik üst boşluğunun yarısı yukarıda kalır (top: -8px): yapışık hâl
   ince olur ama hiçbir şeyin yeri değişmez. Kısa yatay ekranlarda (telefon yatay, ≤560 px yükseklik) yapışmaz. */
@media (min-width: 761px) {
  .yd-ust { position: sticky; top: -8px; z-index: 40; transition: box-shadow var(--h-orta, 200ms) var(--h-egri, ease); }
  .yd-ust.yd-yapisik { box-shadow: 0 10px 28px -18px rgba(12, 21, 56, .35); }
  /* açık mega menü ekranın altını aşmasın (site.js panelin üstünden ekran sonuna kadar olan yüksekliği verir) */
  .yd-ust .yd-mega { max-height: var(--yd-mega-en-cok, calc(100vh - 140px)); }
}
@media (min-width: 761px) and (max-height: 560px) {
  .yd-ust { position: relative; }
}
/* dar masaüstünde (761–1023) satır kırılmasın: arama kutusu küçülür, aralık daralır */
@media (min-width: 761px) and (max-width: 1023px) {
  .yd-ust-satir { column-gap: 16px; flex-wrap: nowrap; }
  .yd-ust-arama { flex: 1 1 200px; }
  .yd-ust-satir > a:first-child { flex: 0 0 auto; }
}

/* ---------- mobil: başlık satırı (logo · ara · sepet · ☰) ve arama satırı ---------- */
@media (min-width: 761px) {
  .yd-ust-m, .yd-ust-m-arama { display: none !important; }
}
@media (max-width: 760px) {
  .yd-ust-m { position: sticky; top: 0; z-index: 40; min-height: 56px; box-sizing: border-box; padding: 4px 8px 4px 16px;
    border-bottom: 1px solid transparent; transition: box-shadow var(--h-orta, 200ms) var(--h-egri, ease), border-color var(--h-orta, 200ms); }
  .yd-ust-m-cizgi, .yd-ust-m.yd-yapisik { border-bottom-color: #E4E3EE; }
  .yd-ust-m.yd-yapisik { box-shadow: 0 10px 24px -18px rgba(12, 21, 56, .4); }
  .yd-ust-m > a:first-child { flex: 0 1 auto; min-width: 0; }
  .yd-ust-m > div { flex: 0 0 auto; }
  /* "ara" düğmesi yer tutar ama sayfanın arama kutusu görünürken gizlidir (logo/sepet kaymaz) */
  .yd-ust-ara-ac { visibility: hidden; opacity: 0; transition: opacity var(--h-orta, 200ms) var(--h-egri, ease), visibility 0s linear var(--h-orta, 200ms); }
  .yd-ust-m.yd-ara-goster .yd-ust-ara-ac { visibility: visible; opacity: 1; transition: opacity var(--h-orta, 200ms) var(--h-egri, ease), visibility 0s; }
  .yd-ust-ara-ac[aria-expanded="true"] { color: #4636C4; }
  /* başlığın altında açılan arama kutusu (yapışık başlığın parçası: başlıkla birlikte durur) */
  .yd-ust-ara { position: absolute; left: 0; right: 0; top: 100%; padding: 4px 16px 12px; border-bottom: 1px solid #E4E3EE;
    box-shadow: 0 16px 28px -20px rgba(12, 21, 56, .45); }
  .yd-ust-m-arama { padding: 0 16px 12px; }
  .yd-ust-m-arama form, .yd-ust-ara form { width: 100%; }
  /* ürün ve liste sayfalarının "geri · başlık" satırı (_urun_ortak.html, _kartlar.html) ☰ taşımaz. İçerik (icerik_makro)
     ve hesap (_hesap_menu) ekranlarının çubuğundaki ikinci ☰ yer tutar ama görünmez (o şablonlar başka ekibin) */
  .yd-ekran-baslik [data-menu-ac], .hesap-ust [data-menu-ac] { visibility: hidden; }
  .yd-urun-ust, .vt-mobil-ust { min-height: 56px; box-sizing: border-box; }
}
@media (max-width: 360px) {
  .yd-ust-m { padding-left: 12px; padding-right: 4px; }
  .yd-ust-m > div > :is(a, button) { width: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .yd-ust-ara:not([hidden]) { animation: h-asagi var(--h-orta, 200ms) var(--h-egri-vurgu, ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  .yd-ust, .yd-ust-m, .yd-ust-ara-ac, .yd-ust-m.yd-ara-goster .yd-ust-ara-ac { transition: none; }
}

/* ---------- arama listesi açıkken kutunun bulunduğu katman çerez kutusunun üstüne çıkar ---------- */
.ar-kap.ar-acik { z-index: 72; }
.yd-ust:has(.ar-acik), .yd-ust-m:has(.ar-acik) { z-index: 72; }

/* ---------- mobil menü: perde + panel ----------
   Panel kendi içinde kayar (sayfa değil), başlığı ("Menü ×") yapışıktır. Yükseklik dinamik görüntü alanıdır
   (100dvh; desteklemeyen tarayıcıda inset: 0). 440 px'ten geniş ekranda sağda panel, solunda tıklanınca kapatan perde. */
.yd-menu { z-index: 78; overflow: hidden; background: rgba(12, 21, 56, .38); overscroll-behavior: contain; }
.yd-menu-ic { box-sizing: border-box; width: min(100%, 440px); margin-left: auto; height: 100%; max-height: 100dvh; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: -24px 0 48px -24px rgba(12, 21, 56, .35); }
.yd-menu-bas { position: sticky; top: 0; z-index: 1; padding-top: max(8px, env(safe-area-inset-top, 0px)); }

/* ---------- mobil menü: hızlı bağlantılar (v12; sablonlar/taban.html) ----------
   Sitenin renkleri: İşlerim sarı (#FFD000, lacivert yazı), Giriş yap / Hesabım dolu mor (#5B4BE8, beyaz yazı), sipariş
   yardımı kutuları açık mor (#F5F3FF, mor yazı), WhatsApp lacivert. Kontrast (WCAG AA, ölçüldü): beyaz/#5B4BE8 5,8:1,
   #0C1538/#FFD000 12,1:1, #4636C4/#F5F3FF 7,4:1, #4B5275/#F5F3FF 6,9:1, #C9CDE6/#0C1538 11,3:1. Dokunma alanı ≥ 52 px.
   Odak halkası lacivert (mor düğmede de görünür). Basınca hafif küçülme yalnız transform (yerleşim değişmez). */
.yd-mh-ana { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.yd-mh-dugme { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 12px;
  box-sizing: border-box; border-radius: 14px; font-weight: 700; font-size: 15.5px; line-height: 1.2; text-align: center;
  transition: background-color .15s, box-shadow .15s, transform .1s; -webkit-tap-highlight-color: transparent; }
.yd-mh-dugme svg { flex: 0 0 auto; }
.yd-mh-mor, .yd-mh-mor:hover { background: #5B4BE8; color: #FFFFFF; box-shadow: 0 8px 18px -10px rgba(91, 75, 232, .85); }
.yd-mh-mor:hover { background: #4636C4; }
.yd-mh-sari, .yd-mh-sari:hover { background: #FFD000; color: #0C1538; box-shadow: 0 8px 18px -12px rgba(122, 96, 0, .8); }
.yd-mh-sari:hover { background: #F5C800; }
.yd-mh-destek { display: flex; flex-direction: column; gap: 10px; }
.yd-mh-baslik { margin: 0; padding: 2px 4px 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px;
  font-weight: 600; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: #4B5275; }
.yd-mh-izgara { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.yd-mh-kutu { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; min-height: 88px;
  padding: 11px 12px 12px; box-sizing: border-box; border: 1px solid #E9E5FF; border-radius: 16px; background: #F5F3FF; color: #4636C4;
  transition: background-color .15s, border-color .15s, transform .1s; -webkit-tap-highlight-color: transparent; }
.yd-mh-kutu:hover { background: #EFEBFF; border-color: #CFC8FF; color: #4636C4; }
.yd-mh-simge { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 32px; height: 32px;
  margin-bottom: 5px; border-radius: 10px; background: #FFFFFF; color: #5B4BE8; box-shadow: 0 1px 2px rgba(12, 21, 56, .08); }
.yd-mh-ad { font-weight: 700; font-size: 15px; line-height: 1.25; color: #4636C4; }
.yd-mh-alt { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.35; color: #4B5275;
  overflow-wrap: anywhere; }
.yd-mh-lacivert, .yd-mh-lacivert:hover { background: #0C1538; border-color: #0C1538; color: #FFFFFF; }
.yd-mh-lacivert:hover { background: #17214F; }
.yd-mh-lacivert .yd-mh-ad { color: #FFFFFF; }
.yd-mh-lacivert .yd-mh-alt { color: #C9CDE6; }
.yd-mh-lacivert .yd-mh-simge { background: #FFD000; color: #0C1538; box-shadow: none; }
/* tek kalan kutu (ör. WhatsApp numarası girilmemiş): tam genişlik, yatay */
.yd-mh-kutu:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; min-height: 60px; }
.yd-mh-kutu:last-child:nth-child(odd) .yd-mh-simge { margin-bottom: 0; }
.yd-mh-kutu:last-child:nth-child(odd) .yd-mh-alt { margin-left: auto; text-align: right; }
.yd-mh-dugme:focus-visible, .yd-mh-kutu:focus-visible { outline: 3px solid #0C1538; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .yd-mh-dugme:active, .yd-mh-kutu:active { transform: scale(.97); }
}
@media (prefers-reduced-motion: reduce) {
  .yd-mh-dugme, .yd-mh-kutu { transition: none; }
}
@media (forced-colors: active) {
  .yd-mh-dugme, .yd-mh-kutu { border: 1px solid CanvasText; }
}

/* ---------- sayfa kaydırma kilidi (site.js; menü ve sepet çekmecesi body.yd-kilit ile ister) ----------
   iOS Safari'de overflow: hidden tek başına arka sayfanın kaymasını durdurmaz: dokunmatik aygıtta gövde o anki
   kaydırma konumunda sabitlenir (top: -<y>px), kapanınca aynı yere dönülür. */
html.yd-kilit-kok { overflow: hidden; }
body.yd-kilit-sabit { position: fixed; left: 0; right: 0; width: 100%; }

@media print {
  .yd-ust-m, .yd-ust-m-arama, .yd-ust-ara { display: none !important; }
  .yd-ust { position: static; box-shadow: none; }
}

/* v31.12 (U): panelden düzenlenen masaüstü üst şeridi (sablonlar/_ust_serit.html; Panel › Mağaza görünümü › Üst şerit).
   Renkler tema sınıfındaki değişkenlerden; düğmelerin atomik renk sınıfları (site.js değiştirir) temaya göre ezilir. */
.yd-us2 { --us-zemin: #0C1538; --us-yazi: #C9CDE6; --us-vurgu: #FFFFFF; --us-secili-zemin: #FFFFFF; --us-secili-yazi: #0C1538;
  background: var(--us-zemin); color: var(--us-yazi); font-size: 13px; }
.yd-us2-lacivert { --us-zemin: #0C1538; }
.yd-us2-mor { --us-zemin: #5B4BE8; --us-yazi: #ECE9FF; }
.yd-us2-sari { --us-zemin: #FFD000; --us-yazi: #0C1538; --us-vurgu: #0C1538; --us-secili-zemin: #0C1538; --us-secili-yazi: #FFFFFF; }
.yd-us2-acik { --us-zemin: #F5F3FF; --us-yazi: #33288F; --us-vurgu: #0C1538; --us-secili-zemin: #0C1538; --us-secili-yazi: #FFFFFF;
  border-bottom: 1px solid #E4E3EE; }
.yd-us2-ic { max-width: 1280px; margin: 0 auto; padding: 6px 24px; box-sizing: border-box; min-height: 40px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 6px 24px; }
.yd-us2-ogeler { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; min-width: 0; }
.yd-us2-oge, .yd-us2-bag, .yd-us2-kanal { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; }
.yd-us2-oge + .yd-us2-oge { position: relative; }
.yd-us2-oge + .yd-us2-oge::before { content: ""; position: absolute; left: -12px; top: 50%; width: 1px; height: 12px; margin-top: -6px;
  background: currentColor; opacity: .28; }
.yd-us2-bag, .yd-us2-kanal { color: inherit; text-decoration: none; transition: color .15s ease; }
.yd-us2-kanal { color: var(--us-vurgu); font-size: 12.5px; font-weight: 600; }
.yd-us2-bag:hover, .yd-us2-bag:focus-visible, .yd-us2-kanal:hover, .yd-us2-kanal:focus-visible { color: var(--us-vurgu); text-decoration: underline; text-underline-offset: 3px; }
.yd-us2-simge { display: inline-flex; flex: 0 0 auto; color: var(--us-vurgu); opacity: .9; }
.yd-us2-sag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-left: auto; }
.yd-us2 .yd-us2-dugme.c-c9cde6 { color: var(--us-yazi); }
.yd-us2 .yd-us2-dugme.bg-ffffff { background: var(--us-secili-zemin); color: var(--us-secili-yazi); }
@media (max-width: 1100px) { .yd-us2-oge:nth-child(n+4) { display: none; } }
@media (max-width: 900px) { .yd-us2-oge:nth-child(n+3) { display: none; } }
