/* ==========================================================
   Katalog Akordeon v21.2 — max-height animasyon, ZIPLAMASIZ
   ========================================================== */

.cata-panel {
    background: linear-gradient(145deg, #fdfcf9 0%, #f4efe6 40%, #eae3d5 100%);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 70px 24px 80px;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #2d3a2a;
    position: relative;
    overflow: hidden;
}
.cata-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(163,177,138,.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.cata-panel::after {
    content: '';
    position: absolute;
    bottom: -160px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(230,180,200,.14) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.cata-panel__inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.cata-panel__title {
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 800;
    text-align: center;
    margin: 0 0 48px;
    color: #2d3a2a;
    letter-spacing: -.02em;
}
.cata-panel__title::after {
    content: '';
    display: block;
    width: 70px;
    height: 5px;
    background: linear-gradient(90deg, #a3b18a, #e8a8c0);
    border-radius: 4px;
    margin: 18px auto 0;
}

.cata {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cata__item {
    position: relative;
}

/* ==========================================================
   ÜST BAŞLIK — BUTTON olarak
   ========================================================== */
.cata__bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 26px;
    background: rgba(255,255,255,.92);
    border: 1.5px solid rgba(163,177,138,.30);
    border-radius: 18px;
    color: #2d3a2a !important;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
    box-shadow: 0 3px 12px rgba(61,74,58,.04);
    position: relative;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.cata__bar:hover {
    background: #eef5e5;
    border-color: #a3b18a;
    box-shadow: 0 8px 24px rgba(61,74,58,.10);
    color: #2d3a2a !important;
}

/* ✅ AÇIK DURUM — AÇIK YEŞİL ARKA PLAN + SİYAH YAZI */
.cata__toggle.is-open {
    border-color: #a3b18a;
    background: #e8f0dc !important;
    color: #2d3a2a !important;
    box-shadow: 0 8px 28px rgba(122,160,91,.14);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.cata__toggle.is-open .cata__name {
    color: #2d3a2a !important;
}
.cata__toggle.is-open .cata__icon {
    color: #fff !important;
}

.cata__name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}
.cata__count {
    background: linear-gradient(135deg, rgba(163,177,138,.28), rgba(163,177,138,.18));
    color: #4a6136 !important;
    font-size: .78rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 24px;
    min-width: 52px;
    text-align: center;
    flex-shrink: 0;
    transition: all .3s ease;
}
.cata__bar:hover .cata__count,
.cata__toggle.is-open .cata__count {
    background: linear-gradient(135deg, #a3b18a, #7ba05b);
    color: #fff !important;
}
.cata__icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a3b18a, #7ba05b);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    transition: transform .35s cubic-bezier(.25,.8,.25,1);
}
.cata__toggle.is-open .cata__icon {
    transform: rotate(180deg) scale(1.05);
}

/* ==========================================================
   ✅ FOCUS / ACTIVE / VISITED — TARAYICI LACİVERT/BEYAZ DEFAULT'UNU EZ
   Masaüstü ve mobil için ortak
   ========================================================== */

/* Kapalı başlık — focus/active olsa bile beyaz arka + siyah yazı */
.cata__bar:focus,
.cata__bar:focus-visible,
.cata__bar:active,
.cata__bar:not(.is-open):focus,
.cata__bar:not(.is-open):focus-visible,
.cata__bar:not(.is-open):active {
    outline: none !important;
    outline-color: transparent !important;
    background-color: rgba(255,255,255,.92) !important;
    background-image: none !important;
    color: #2d3a2a !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: 0 3px 12px rgba(61,74,58,.04) !important;
}

/* Açık başlık — focus/active olsa bile AÇIK YEŞİL arka + SİYAH yazı */
.cata__toggle.is-open:focus,
.cata__toggle.is-open:focus-visible,
.cata__toggle.is-open:active {
    outline: none !important;
    background-color: #e8f0dc !important;
    background-image: none !important;
    color: #2d3a2a !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: 0 8px 28px rgba(122,160,91,.14) !important;
}
.cata__toggle.is-open:focus .cata__name,
.cata__toggle.is-open:active .cata__name {
    color: #2d3a2a !important;
}

/* Ziyaret edilen linkler (a.cata__bar) — lacivert olmasın */
a.cata__bar:visited {
    background-color: rgba(255,255,255,.92) !important;
    color: #c9736a !important;
}
a.cata__bar:visited .cata__name {
    color: #c9736a !important;
}

/* Selection (metin seçimi) lacivert olmasın */
.cata__bar::selection,
.cata__bar *::selection {
    background: #e8a8c0 !important;
    color: #2d3a2a !important;
}

/* Firefox buton iç boşluk sıfırla */
.cata__bar::-moz-focus-inner,
.cata__toggle::-moz-focus-inner {
    border: 0 !important;
    padding: 0 !important;
}

/* ==========================================================
   ALT İÇERİK — max-height ile animasyon
   ========================================================== */
.cata__inner {
    max-height: 0;
    overflow: hidden;
    transition: max-height .45s cubic-bezier(.22, 1, .36, 1);
}
.cata__inner.is-open {
    max-height: 5000px;
}

.cata__inner-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px 18px;
    background: linear-gradient(145deg, #fdf2f5 0%, #fce8ee 60%, #f9dfe8 100%);
    border: 1.5px solid rgba(230,180,200,.45);
    border-top: none;
    border-radius: 0 0 18px 18px;
}

/* ==========================================================
   KATEGORİ LİNKİ
   ========================================================== */
.cata__catlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a05273 !important;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    padding: 11px 22px;
    background: rgba(255,255,255,.75);
    border: 1.5px solid rgba(230,180,200,.55);
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all .3s ease;
    white-space: nowrap;
    align-self: flex-start;
    -webkit-tap-highlight-color: transparent;
}
.cata__catlink:hover {
    background: linear-gradient(135deg, #e68eb0, #d97aa2);
    color: #fff !important;
    border-color: #d97aa2;
}
.cata__catlink:focus,
.cata__catlink:focus-visible,
.cata__catlink:active {
    outline: none !important;
    background: rgba(255,255,255,.75) !important;
    background-image: none !important;
    color: #a05273 !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* ==========================================================
   ALT MENÜ ÖĞELERİ — PEMBE TEMA
   ========================================================== */
.cata__inner .cata__item {
    width: 100%;
}
.cata__inner .cata__bar {
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 500;
    background: rgba(255,255,255,.85);
    border: 1.5px solid rgba(230,180,200,.50);
    border-radius: 14px;
    color: #6b4356 !important;
    box-shadow: 0 2px 8px rgba(200,130,160,.06);
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.cata__inner .cata__bar:hover {
    background: #ffffff;
    border-color: #e8a8c0;
    box-shadow: 0 6px 18px rgba(200,130,160,.15);
    color: #6b4356 !important;
}
.cata__inner .cata__bar .cata__name {
    color: #6b4356 !important;
}
.cata__inner .cata__bar .cata__icon {
    width: 30px;
    height: 30px;
    font-size: 12px;
    background: linear-gradient(135deg, #f4b8ce, #e68eb0);
    color: #fff !important;
}
.cata__inner .cata__bar .cata__count {
    background: linear-gradient(135deg, rgba(230,142,176,.22), rgba(230,142,176,.12));
    color: #a05273 !important;
    font-size: .72rem;
    padding: 4px 12px;
    min-width: 44px;
}
.cata__inner .cata__toggle.is-open {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    color: #6b4356 !important;
}
.cata__inner .cata__toggle.is-open .cata__name {
    color: #6b4356 !important;
}
.cata__inner .cata__inner .cata__inner-content {
    background: linear-gradient(145deg, #fce8ee 0%, #f9dfe8 100%);
    border-color: rgba(230,180,200,.60);
}

/* Alt menü focus/active — lacivert/beyaz olmasın */
.cata__inner .cata__bar:focus,
.cata__inner .cata__bar:focus-visible,
.cata__inner .cata__bar:active,
.cata__inner .cata__bar:not(.is-open):focus,
.cata__inner .cata__bar:not(.is-open):focus-visible,
.cata__inner .cata__bar:not(.is-open):active {
    outline: none !important;
    background-color: rgba(255,255,255,.85) !important;
    background-image: none !important;
    color: #6b4356 !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* ==========================================================
   MOBİL — TÜM FOCUS/ACTIVE RENKLERİNİ SABİTLE
   ========================================================== */
@media (max-width: 640px) {
    .cata-panel {
        padding: 44px 14px 54px;
    }
    .cata__bar {
        padding: 15px 18px;
        font-size: 14.5px;
        gap: 12px;
        /* ✅ Mobilde tıklama efekti kalksın */
        -webkit-tap-highlight-color: transparent !important;
    }
    .cata__icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    .cata__inner-content {
        padding: 12px 14px;
    }
    .cata__catlink {
        font-size: 12px;
        padding: 9px 16px;
    }

    /* ✅ MOBİL: Kapalı başlık focus/active → BEYAZ arka + SİYAH yazı */
    .cata__bar:focus,
    .cata__bar:focus-visible,
    .cata__bar:active,
    .cata__bar:not(.is-open):focus,
    .cata__bar:not(.is-open):focus-visible,
    .cata__bar:not(.is-open):active {
        background-color: #ffffff !important;
        background-image: none !important;
        color: #2d3a2a !important;
        outline: none !important;
        box-shadow: 0 3px 12px rgba(61,74,58,.06) !important;
    }
    .cata__bar:focus .cata__name,
    .cata__bar:active .cata__name,
    .cata__bar:not(.is-open):focus .cata__name {
        color: #2d3a2a !important;
    }

    /* ✅ MOBİL: Açık başlık focus/active → AÇIK YEŞİL arka + SİYAH yazı */
    .cata__toggle.is-open:focus,
    .cata__toggle.is-open:focus-visible,
    .cata__toggle.is-open:active {
        background-color: #e8f0dc !important;
        background-image: none !important;
        color: #2d3a2a !important;
        outline: none !important;
    }
    .cata__toggle.is-open:focus .cata__name,
    .cata__toggle.is-open:active .cata__name {
        color: #2d3a2a !important;
    }

    /* ✅ MOBİL: Alt menü focus → beyaz + koyu pembe yazı */
    .cata__inner .cata__bar:focus,
    .cata__inner .cata__bar:focus-visible,
    .cata__inner .cata__bar:active {
        background-color: #ffffff !important;
        color: #6b4356 !important;
    }
    .cata__inner .cata__bar:focus .cata__name,
    .cata__inner .cata__bar:active .cata__name {
        color: #6b4356 !important;
    }

    /* ✅ MOBİL: Kategori linkleri focus → beyaz + pembe yazı */
    .cata__catlink:focus,
    .cata__catlink:focus-visible,
    .cata__catlink:active {
        background: rgba(255,255,255,.85) !important;
        color: #a05273 !important;
    }
}

/* ==========================================================
   ERİŞİLEBİLİRLİK
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    .cata__inner {
        transition: none;
    }
}