/* Kategori menüsü: ana sayfa ve kategori/arama sayfası sol paneli (frontend.custom.partials.category_menu, frontend.partials.category_elements) */

/* ---------- Alt kategori listesi ---------- */
.subcategory-list {
    padding: 12px 16px;
}

.subcat-group {
    padding: 8px 0;
}

.subcat-group + .subcat-group {
    border-top: 1px solid #f0f0f0;
}

.subcat-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    padding: 2px 0;
    transition: color 0.2s;
}

.subcat-title:hover {
    color: var(--primary);
    text-decoration: none;
}

.subcat-children {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.subcat-child {
    display: block;
    font-size: 15px;
    color: #212529;
    padding: 3px 12px 3px 0;
    transition: color 0.2s;
}

.subcat-child:hover {
    color: var(--primary);
    text-decoration: none;
}

.subcat-more {
    display: inline-block;
    font-size: 14px;
    color: var(--primary);
    padding: 2px 0;
    font-weight: 500;
}

.subcat-more:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* ---------- Menü ---------- */
/* Modern Category Menu Styles */
.modern-category-menu {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 430px;
}

.category-nav-element {
    position: relative;
    transition: all 0.2s ease;
}

.category-nav-element:hover > .d-flex {
    background-color: rgb(255, 140, 114);
}

.category-link {
    text-decoration: none;
    position: relative;
}

.category-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.cat-icon-wrapper {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.category-nav-element:hover .cat-icon-wrapper {
    transform: scale(1.1);
}

.cat-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.category-nav-element:hover .cat-image {
    opacity: 1 !important;
}

.cat-name {
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-nav-element:hover .cat-name,
.category-nav-element:hover .cat-arrow {
    color: #fff;
    font-weight: 600;
    opacity: 1;
}

.cat-arrow {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.category-toggle-btn {
    background: transparent;
    outline: none;
}


.category-nav-element.active .cat-arrow {
    transform: rotate(180deg);
}

/* Dropdown Submenu */
/* Alt kategoriler kategorinin altına doğru açılır (jQuery slideDown/slideUp) */
.sub-cat-menu-dropdown.loaded {
    background-color: #f8f9fa;
}

.sub-cat-menu-dropdown .subcategory-list {
    padding: 8px 16px 8px 52px;
}

/* Kategori sayfası sol paneliyle aynı renklendirme:
   açılan ana kategori turuncu, seçilen alt kategori yeşil */
.category-nav-element.active > .d-flex {
    background-color: rgb(255, 140, 114);
}
.category-nav-element:hover .category-link::before {
    width: 0;
}
.category-nav-element.active .cat-name,
.category-nav-element.active .cat-arrow {
    color: #fff !important;
    font-weight: 600;
    opacity: 1;
}
.category-nav-element.active .category-link::before {
    width: 0 !important;
}

.modern-category-menu .subcat-title,
.modern-category-menu .subcat-child {
    transition: background-color 0.15s, color 0.15s;
}
.modern-category-menu .subcat-title {
    margin-left: -8px;
}
.modern-category-menu .subcat-children {
    margin-left: -8px;
}
.modern-category-menu .subcat-title:hover,
.modern-category-menu .subcat-title:focus,
.modern-category-menu .subcat-child:hover,
.modern-category-menu .subcat-child:focus {
    background-color: #28a745;
    color: #fff !important;
    text-decoration: none;
}

/* Preloader styles */
.spinner-wrapper {
    padding: 20px;
}

/* Smooth transitions */
.has-transition {
    transition: all 0.3s ease;
}

/* ---------- Kategori / arama sayfası sol paneli (tam menü) ---------- */
.hg-catmenu-box { container-type: inline-size; }
.modern-category-menu-full {
    width: 100%;
    max-height: none;
    overflow: visible;
}
/* Ana sayfada oklar görünmüyor; burada da satırın tamamı açar/kapatır */
.modern-category-menu-full .category-toggle-btn { display: none; }
/* Banner'lar için yazılmış genel .flex-grow-1 sınırı (custom-style.css) adları kırpıyordu */
.modern-category-menu-full .category-link,
.modern-category-menu-full .cat-name {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
}
.modern-category-menu-full .category-link {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}
.modern-category-menu-full .cat-icon-wrapper { flex: 0 0 24px; }
.modern-category-menu-full .category-nav-element:last-child { border-bottom: 0 !important; }
/* Görüntülenen kategori */
.modern-category-menu .subcat-title[aria-current],
.modern-category-menu .subcat-child[aria-current] {
    background-color: #28a745;
    color: #fff !important;
}
@media (min-width: 1200px) {
    /* Panel ana sayfa menüsünden dar; en uzun kategori adı tek satıra sığsın */
    .modern-category-menu-full .category-link {
        font-size: clamp(13px, 6.6cqi, 18px) !important;
        line-height: 1.5;
    }
}
