/* ═══════════════════════════════════════════════
   Ürün Kataloğu Filtre - Stiller
   ═══════════════════════════════════════════════ */

/* === RESET & BASE === */
.uk-katalog *,
.uk-katalog *::before,
.uk-katalog *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.uk-katalog {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1e293b;
    line-height: 1.6;
}

/* === SIDEBAR === */
.uk-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.uk-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

/* Kategori Listesi */
.uk-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uk-cat-item {
    border-bottom: 1px solid #f1f5f9;
}

.uk-cat-item:last-child {
    border-bottom: none;
}

.uk-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.uk-cat-link {
    display: block;
    flex: 1;
    min-width: 0;
    padding: 12px 0;
    border: none;
    background: none !important;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    border-radius: 0;
    word-break: break-word;
    white-space: normal;
}

.uk-cat-link:hover,
.uk-cat-link:focus,
.uk-cat-link:active {
    color: #2563eb;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}

.uk-cat-count {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 2px;
}

.uk-cat-link.active .uk-cat-count {
    color: #93b4f5;
}

.uk-cat-link.active {
    color: #2563eb;
    font-weight: 700;
}

/* Toggle Button */
.uk-cat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.uk-cat-toggle:hover {
    background: #e2e8f0;
    color: #334155;
}

.uk-cat-toggle svg {
    transition: transform 0.3s ease;
}

.uk-cat-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Alt Kategoriler */
.uk-cat-children {
    list-style: none;
    padding: 0 0 8px 16px;
    margin: 0;
    display: none;
    overflow: hidden;
}

.uk-cat-children.open {
    display: block;
    animation: ukSlideDown 0.3s ease forwards;
}

@keyframes ukSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uk-cat-child-item .uk-cat-link {
    font-weight: 400;
    font-size: 13px;
    color: #64748b;
    padding: 8px 0;
}

.uk-cat-child-item .uk-cat-link:hover {
    color: #2563eb;
}

.uk-cat-child-item .uk-cat-link.active {
    color: #2563eb;
    font-weight: 600;
}

/* === MAIN CONTENT === */
.uk-main {
    min-width: 0;
}

/* Top Bar */
.uk-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.uk-page-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.uk-page-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

.uk-topbar-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.uk-topbar-sort label {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}

.uk-sort-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s ease;
}

.uk-sort-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Aktif Filtreler */
.uk-active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.uk-active-filters-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.uk-active-filters-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.uk-active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #2563eb;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.uk-active-filter-tag .uk-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}

.uk-active-filter-tag .uk-tag-remove:hover {
    background: rgba(255,255,255,0.45);
}

.uk-clear-filters {
    border: none;
    background: none;
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.uk-clear-filters:hover {
    background: #fef2f2;
}

/* === LOADING === */
.uk-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: #64748b;
    font-size: 14px;
}

.uk-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ukSpin 0.7s linear infinite;
}

@keyframes ukSpin {
    to { transform: rotate(360deg); }
}

/* === ÜRÜN GRID === */
.uk-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.uk-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}

/* === ÜRÜN KART === */
.uk-product-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.uk-product-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Kart Görsel */
.uk-card-image-link {
    display: block;
    text-decoration: none;
}

.uk-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f5f9;
}

.uk-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.uk-product-card:hover .uk-card-image img {
    transform: scale(1.05);
}

/* Kart İçerik */
.uk-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.uk-card-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 8px;
}

.uk-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.35;
}

.uk-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.uk-card-title a:hover {
    color: #2563eb;
}

.uk-card-excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}

/* Kart Footer */
.uk-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
}

.uk-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.uk-card-link:hover {
    gap: 8px;
}

.uk-arrow {
    transition: transform 0.2s ease;
}

.uk-card-link:hover .uk-arrow {
    transform: translateX(2px);
}

/* === SAYFALAMA === */
.uk-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.uk-pag-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.uk-pag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 4px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.uk-pag-btn:hover:not(:disabled):not(.uk-pag-active) {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.uk-pag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.uk-pag-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 700;
}

.uk-pag-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: #94a3b8;
    font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .uk-katalog {
        grid-template-columns: 220px 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .uk-katalog {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 16px;
    }

    .uk-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 16px;
        margin-bottom: 20px;
    }

    /* Mobilde sidebar toggle */
    .uk-sidebar-title {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .uk-sidebar-title::after {
        content: '';
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid #64748b;
        transition: transform 0.3s;
    }

    .uk-sidebar-title.open::after {
        transform: rotate(180deg);
    }

    .uk-sidebar .uk-cat-list {
        display: none;
    }

    .uk-sidebar .uk-cat-list.mobile-open {
        display: block;
        animation: ukSlideDown 0.3s ease forwards;
    }

    .uk-topbar {
        flex-direction: column;
    }

    .uk-page-title {
        font-size: 22px;
    }

    .uk-products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .uk-card-body {
        padding: 14px;
    }

    .uk-card-title {
        font-size: 15px;
    }
}
