/* ETICARO — Kategori mega menüsü (üst menü) ve hero kategori paneli açılır alt kategorileri.
 * Alt kategori yoksa bu kuralların hiçbiri devreye girmez; eski düz liste aynen çalışır. */

/* ── Üst menü: "Tüm Kategoriler" mega paneli ──────────────────────────────── */
.category-dropdown.mega-on { width: min(1000px, 100%); max-height: none; overflow: visible; }
.mega { display: flex; position: relative; min-height: 100%; background: var(--theme-card-bg, #fff); }
.mega-l1 { list-style: none; margin: 0; padding: 0; width: 300px; flex: 0 0 300px; max-height: min(70vh, 560px); overflow-y: auto; border-right: 1px solid var(--theme-border, #e5e8eb); }
.mega-row { display: flex; align-items: stretch; }
.category-dropdown .mega-top { flex: 1 1 auto; min-width: 0; padding: 12px 18px; border-bottom: 1px solid var(--theme-border, #eef0f2); font-size: 13px; font-weight: 600; }
.mega-item.has-sub > .mega-row .mega-top::after { content: "›"; float: right; opacity: .55; }
.mega-exp { display: none; }
.mega-sub {
  display: none; position: absolute; left: 300px; top: 0; right: 0; min-height: 100%; max-height: min(70vh, 560px);
  overflow: auto; box-sizing: border-box; padding: 20px 26px; background: var(--theme-card-bg, #fff); border-left: 1px solid var(--theme-border, #e5e8eb);
}
.mega-l1:not(:hover):not(:focus-within) > .mega-item:first-child > .mega-sub { display: block; }
.mega-item:hover > .mega-sub, .mega-item:focus-within > .mega-sub, .mega-item.is-active > .mega-sub { display: block; }
.mega-item:hover > .mega-row .mega-top, .mega-item:focus-within > .mega-row .mega-top { background: var(--theme-primary-light, #fff7f2); color: var(--theme-link-on-tint, var(--theme-link, var(--orange))); }
.mega-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; }
.mega-col ul { list-style: none; margin: 2px 0 0; padding: 0; }
.category-dropdown .mega-col .mega-l2, .category-panel .mega-col .mega-l2 { display: block; padding: 6px 0; border: 0; background: none; font-size: 13px; font-weight: 800; color: var(--theme-heading, var(--theme-text, #16191d)); }
.category-dropdown .mega-col li a, .category-panel .mega-col li a { display: block; padding: 4px 0; border: 0; background: none; font-size: 12.5px; font-weight: 500; color: var(--theme-muted, #595e64); min-height: 0; }
.category-dropdown .mega-col li a:hover, .category-panel .mega-col li a:hover, .mega-col .mega-l2:hover { color: var(--theme-link, var(--orange)); background: none; }
.category-dropdown .mega-all, .category-panel .mega-all { display: inline-block; margin-top: 16px; padding: 0; border: 0; background: none; font-size: 12.5px; font-weight: 800; color: var(--theme-link, var(--orange)); min-height: 0; }
.category-dropdown .mega-foot { padding: 12px 18px; border-top: 1px solid var(--theme-border, #e5e8eb); border-bottom: 0; font-weight: 700; }
.mega > .mega-foot { display: none; }

/* ── Hero paneli: açılır alt kategoriler ──────────────────────────────────── */
.home-page .category-panel.has-fly { overflow: visible; position: relative; z-index: 30; }
.cp-item { position: relative; display: flex; flex: 1 1 auto; }
.cp-item > a { flex: 1 1 auto; }
.cp-exp { display: none; }
.cp-fly { display: none; position: absolute; left: 100%; top: 0; width: min(660px, 56vw); min-height: 100%; box-sizing: border-box; z-index: 40; padding: 18px 22px; background: var(--theme-card-bg, #fff); border: 1px solid var(--theme-border, #e5e8eb); box-shadow: 0 14px 34px rgba(0, 0, 0, .16); }
.cp-item:hover > .cp-fly, .cp-item:focus-within > .cp-fly { display: block; }
.home-page .category-panel .cp-fly a:last-child { background: none; font-weight: 800; }
.home-page .category-panel .cp-fly a { display: block; min-height: 0; padding: 4px 0; border: 0; flex: none; }
.home-page .category-panel .cp-fly .mega-l2 { font-size: 13px; font-weight: 800; }
.cp-item:hover > a, .cp-item:focus-within > a { background: var(--theme-primary-light, #fff7f2); color: var(--theme-link-on-tint, var(--theme-link, var(--orange))); }

/* ── Mobil / dokunmatik: akordeon ─────────────────────────────────────────── */
@media (max-width: 1020px) {
  .category-dropdown.mega-on { width: 100%; }
  .mega { display: block; }
  .mega-l1 { width: auto; flex: none; max-height: 60vh; border-right: 0; }
  .mega-exp, .cp-exp { display: flex; align-items: center; justify-content: center; flex: 0 0 46px; min-height: 44px; border: 0; border-left: 1px solid var(--theme-border, #eef0f2); background: none; color: inherit; font-size: 18px; cursor: pointer; }
  .mega-sub, .cp-fly { position: static; width: auto; max-height: none; min-height: 0; padding: 4px 18px 12px; border: 0; box-shadow: none; }
  .mega-l1:not(:hover):not(:focus-within) > .mega-item:first-child > .mega-sub { display: none; }
  .mega-item:hover > .mega-sub, .mega-item:focus-within > .mega-sub, .cp-item:hover > .cp-fly, .cp-item:focus-within > .cp-fly { display: none; }
  .mega-item.is-active > .mega-sub, .cp-item.is-active > .cp-fly { display: block; }
  .cp-item { flex-wrap: wrap; }
  .cp-item > a { flex: 1 1 calc(100% - 46px); }
  .cp-item > .cp-fly { flex: 1 1 100%; }
  .mega-cols { grid-template-columns: 1fr; gap: 10px; }
  .mega-item.has-sub > .mega-row .mega-top::after { display: none; }
  .mega > .mega-foot { display: block; }
}

/* ── Yatay kategori çubuğu (Tema Özelleştirici > Üst menü düzeni; yalnızca açıkken işaretleme vardır) ── */
.catbar { border-top: 1px solid var(--theme-header-border, var(--line, #e5e8eb)); background: var(--theme-header-bg, #fff); color: var(--theme-nav-text, inherit); }
.catbar .container { position: relative; }
.cb-list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.cb-list::-webkit-scrollbar { display: none; }
.cb-item { flex: 0 0 auto; }
.cb-top { display: flex; align-items: center; height: 44px; padding: 0 14px; font-size: 13px; font-weight: 700; white-space: nowrap; color: inherit; }
.cb-item:hover > .cb-top, .cb-item:focus-within > .cb-top { color: var(--theme-nav-hover, var(--orange)); box-shadow: inset 0 -3px 0 currentColor; }
.cb-more .cb-top { font-weight: 800; color: var(--theme-link, var(--orange)); }
.cb-sub { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 60; box-sizing: border-box; max-height: min(70vh, 560px); overflow: auto; padding: 22px 26px; background: var(--theme-card-bg, #fff); color: var(--theme-text, #16191d); border: 1px solid var(--theme-border, #e5e8eb); border-top: 0; box-shadow: 0 16px 30px rgba(0, 0, 0, .14); }
.cb-item:hover > .cb-sub, .cb-item:focus-within > .cb-sub { display: block; }
.cb-sub .mega-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cb-sub .mega-col ul { list-style: none; margin: 2px 0 0; padding: 0; }
.cb-sub .mega-l2 { display: block; padding: 6px 0; font-size: 13px; font-weight: 800; color: var(--theme-heading, var(--theme-text, #16191d)); }
.cb-sub .mega-col li a { display: block; padding: 4px 0; font-size: 12.5px; font-weight: 500; color: var(--theme-muted, #595e64); }
.cb-sub .mega-col li a:hover, .cb-sub .mega-l2:hover { color: var(--theme-link, var(--orange)); }
.cb-sub .mega-all { display: inline-block; margin-top: 16px; font-size: 12.5px; font-weight: 800; color: var(--theme-link, var(--orange)); }
.catbar--brand { background: var(--theme-btn-primary-bg, var(--orange)); color: var(--theme-btn-primary-text, #fff); border-top-color: transparent; }
.catbar--brand .cb-item:hover > .cb-top, .catbar--brand .cb-item:focus-within > .cb-top, .catbar--brand .cb-more .cb-top { color: var(--theme-btn-primary-text, #fff); }
.catbar--brand .cb-item:hover > .cb-top, .catbar--brand .cb-item:focus-within > .cb-top { box-shadow: inset 0 -3px 0 currentColor; }
@media (max-width: 1020px) { .catbar { display: none; } }

/* ── Kategori görselleri ve simgeleri (Yönetim > Kategoriler; tanımlı değilse işaretleme yoktur) ── */
.cat-ic { flex: none; display: inline-block; vertical-align: middle; }
.cat-ic--img { object-fit: cover; border-radius: 6px; background: var(--theme-surface-soft, rgba(127, 127, 127, .08)); }
.cat-ic--svg { stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--theme-link, currentColor); }
.category-panel .cat-ic--img { width: 22px; height: 22px; }
.category-panel .cat-ic--svg { width: 18px; height: 18px; }
.category-dropdown a.has-ic, .catbar a.has-ic { display: flex; align-items: center; gap: 10px; }
.category-dropdown .mega-top.has-ic { flex: 1 1 auto; }
.category-dropdown .mega-top.has-ic > span { flex: 1 1 auto; min-width: 0; }
.mega-item.has-sub > .mega-row .mega-top.has-ic::after { margin-left: auto; float: none; }
.catbar .cb-top.has-ic { gap: 8px; }
.catbar .cb-top .cat-ic--img { width: 20px; height: 20px; border-radius: 5px; }
.catbar .cb-top .cat-ic--svg { width: 18px; height: 18px; color: inherit; }
.mega-l2.has-ic { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.mega-l2 .cat-ic--img { width: 28px; height: 28px; border-radius: 7px; }
.mega-l2 .cat-ic--svg { width: 22px; height: 22px; }
