/* Ürün listesi — kategori filtresi (referans: accordion + checkbox) */

.shop-sidebar-panel {
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.shop-sidebar-panel__head {
    display: none;
}

.shop-cat-nav {
    display: flex;
    flex-direction: column;
}

.shop-filter-section {
    border-bottom: 1px solid #e8e8ea;
}

.shop-filter-section:first-child {
    border-top: 1px solid #e8e8ea;
}

.shop-filter-section__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    text-align: left;
}

.shop-filter-section__toggle i {
    font-size: 20px;
    color: #6b7280;
    transition: transform .2s ease;
}

.shop-filter-section:not(.is-open) .shop-filter-section__toggle i {
    transform: rotate(180deg);
}

.shop-filter-section__body {
    display: none;
    padding: 0 0 16px;
}

.shop-filter-section.is-open .shop-filter-section__body {
    display: block;
}

.shop-cat-check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(520px, calc(100vh - 240px));
    overflow-y: auto;
}

.shop-cat-check-list::-webkit-scrollbar {
    width: 5px;
}

.shop-cat-check-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.shop-cat-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    text-decoration: none;
    color: #4b5563;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    border-radius: 6px;
    transition: color .15s ease;
    cursor: pointer;
}

.shop-cat-check:hover {
    color: #111827;
}

.shop-cat-check.is-active {
    color: #111827;
    font-weight: 600;
}

.shop-cat-check__box {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: border-color .15s ease, background .15s ease;
}

.shop-cat-check.is-active .shop-cat-check__box {
    background: #111827;
    border-color: #111827;
}

.shop-cat-check.is-active .shop-cat-check__box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: #fff;
    border-radius: 1px;
}

.shop-cat-check__label {
    flex: 1;
    min-width: 0;
}

.shop-cat-group__row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-cat-group__row .shop-cat-check {
    flex: 1;
    min-width: 0;
}

.shop-cat-group__expand {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 18px;
    padding: 0;
}

.shop-cat-group__expand:hover {
    color: #111827;
    background: #f3f4f6;
}

.shop-cat-group__expand i {
    transition: transform .2s ease;
}

.shop-cat-group.is-expanded .shop-cat-group__expand i {
    transform: rotate(180deg);
}

.shop-cat-group__children {
    list-style: none;
    margin: 0;
    padding: 0 0 4px 30px;
    display: none;
}

.shop-cat-group.is-expanded .shop-cat-group__children {
    display: block;
}

.shop-cat-check--child {
    font-size: 13px;
    padding: 8px 4px;
}

/* Numara / renk filtre kutuları */
.shop-filter-chips {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 0 4px;
}

.shop-filter-chips--colors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
    text-align: center;
    word-break: break-word;
}

.shop-filter-chip:hover {
    border-color: #9ca3af;
    color: #111827;
}

.shop-filter-chip.is-active {
    border-color: #111827;
    background: #111827;
    color: #fff;
    box-shadow: none;
}

.shop-filter-chip--color {
    font-size: 12px;
    font-weight: 500;
    min-height: 38px;
    padding: 8px 10px;
}

.shop-filter-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.15);
}

/* AJAX yükleme */
#shopCatalogMain {
    position: relative;
    transition: opacity 0.2s ease;
}

#shopCatalogMain.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

#shopCatalogMain.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.35);
}

#shopCatalogMain.is-loading::after {
    content: '';
    position: absolute;
    top: 120px;
    left: 50%;
    z-index: 6;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    border: 3px solid #e5e7eb;
    border-top-color: #111827;
    border-radius: 50%;
    animation: shopCatalogSpin 0.7s linear infinite;
}

@keyframes shopCatalogSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .shop-sidebar-panel {
        padding: 4px 0 8px;
        border-top: none;
    }

    .shop-cat-check-list {
        max-height: none;
    }

    .shop-filter-chips {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .shop-filter-chips--colors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-filter-chip {
        min-height: 36px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop-filter-section__toggle i,
    .shop-cat-group__expand i,
    #shopCatalogMain {
        transition: none;
    }
}
