/*
===============================================
  MODERN KATEGORİ SAYFASI - ORION THEME
  Anasayfa ile uyumlu, filtrelenebilir, ergonomik
===============================================
*/

/* ========== GENEL SAYFA ========== */
.pagecategory,
.pageurunliste {
    background: #f5f5f5 !important;
}

.pagecategory #content,
.pageurunliste #content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* ========== KATEGORİ BAŞLIK ========== */
.category-header {
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.category-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 8px 0;
}

.category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ========== FİLTRE VE SIRALAMA BARI ========== */
.category-toolbar {
    background: #fff;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f5f5f7;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-toggle:hover {
    background: #e8e8ed;
}

.filter-toggle i {
    font-size: 16px;
}

.view-mode {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f7;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.view-btn:hover,
.view-btn.active {
    background: #000;
    color: #fff;
}

.sort-select {
    padding: 10px 15px;
    border: 1px solid #e8e8ed;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: #fff;
    cursor: pointer;
    min-width: 180px;
}

.result-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* ========== ANA İÇERİK ALANI ========== */
.category-content {
    display: flex;
    gap: 25px;
}

/* ========== SOL FİLTRE PANELİ ========== */
.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.filter-sidebar.hidden {
    width: 0;
    overflow: hidden;
    opacity: 0;
}

.filter-panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 20px;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-title i {
    font-size: 12px;
    color: #999;
    cursor: pointer;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-option:hover {
    color: #000;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #d2d2d7;
    border-radius: 4px;
    cursor: pointer;
}

.filter-option label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    flex: 1;
}

.filter-count {
    font-size: 12px;
    color: #999;
}

/* Fiyat Aralığı */
.price-range {
    padding: 10px 0;
}

.price-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.price-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e8e8ed;
    border-radius: 6px;
    font-size: 13px;
}

.price-slider {
    width: 100%;
    height: 4px;
    background: #e8e8ed;
    border-radius: 2px;
    position: relative;
}

.price-slider-fill {
    height: 100%;
    background: #000;
    border-radius: 2px;
}

/* Filtre Temizle */
.filter-clear {
    width: 100%;
    padding: 10px;
    background: #f5f5f7;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 15px;
}

.filter-clear:hover {
    background: #e8e8ed;
    color: #000;
}

/* ========== ÜRÜN LİSTESİ ========== */
.products-container {
    flex: 1;
    min-width: 0;
}

/* Mevcut sistem ile uyumluluk (Orion PLP: body.orion-category-page — auto-fill / 3 sütun çakışmasın) */
body.pagecategory:not(.orion-category-page) .product-list,
body.pageurunliste:not(.orion-category-page) .product-list,
body.pagecategory:not(.orion-category-page) .view-product-list,
body.pageurunliste:not(.orion-category-page) .view-product-list,
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.pagecategory:not(.orion-category-page) .product-list li,
body.pageurunliste:not(.orion-category-page) .product-list li {
    display: block !important;
    width: 100% !important;
    float: none !important;
}

body.pagecategory:not(.orion-category-page) .products-grid.grid-2,
body.pagecategory:not(.orion-category-page) .product-list.grid-2,
body.pageurunliste:not(.orion-category-page) .products-grid.grid-2,
body.pageurunliste:not(.orion-category-page) .product-list.grid-2,
.products-grid.grid-2,
.product-list.grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

body.pagecategory:not(.orion-category-page) .products-grid.grid-3,
body.pagecategory:not(.orion-category-page) .product-list.grid-3,
body.pageurunliste:not(.orion-category-page) .products-grid.grid-3,
body.pageurunliste:not(.orion-category-page) .product-list.grid-3,
.products-grid.grid-3,
.product-list.grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

body.pagecategory:not(.orion-category-page) .products-grid.grid-4,
body.pagecategory:not(.orion-category-page) .product-list.grid-4,
body.pageurunliste:not(.orion-category-page) .products-grid.grid-4,
body.pageurunliste:not(.orion-category-page) .product-list.grid-4,
.products-grid.grid-4,
.product-list.grid-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

body.pagecategory:not(.orion-category-page) .products-grid.list-view,
body.pagecategory:not(.orion-category-page) .product-list.list-view,
body.pageurunliste:not(.orion-category-page) .products-grid.list-view,
body.pageurunliste:not(.orion-category-page) .product-list.list-view,
.products-grid.list-view,
.product-list.list-view {
    grid-template-columns: 1fr !important;
}

/* ========== ÜRÜN KARTI ========== */
.product-card,
.pagecategory .product-list li,
.pageurunliste .product-list li,
.product-container {
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    transition: all 0.3s !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    border: 2px solid transparent !important;
}

.product-card:hover,
.pagecategory .product-list li:hover,
.pageurunliste .product-list li:hover,
.product-container:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    transform: translateY(-4px) !important;
    border-color: #000 !important;
}

.product-image {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f8f8f8;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sale {
    background: #ff3b30;
    color: #fff;
}

.badge-new {
    background: #34c759;
    color: #fff;
}

.badge-stock {
    background: #ff9500;
    color: #fff;
}

.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Ürün kartı aksiyonları — üst header .user-actions .action-btn ile çakışmasın */
.product-card .action-btn,
.ps-product-item .action-btn,
.product-container .action-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
    color: #666;
}

.product-card .action-btn:hover,
.ps-product-item .action-btn:hover,
.product-container .action-btn:hover {
    background: #000;
    color: #fff;
    transform: scale(1.1);
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name a {
    color: inherit;
    text-decoration: none;
}

.product-name a:hover {
    color: #000;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.stars {
    display: flex;
    gap: 2px;
    color: #ff9500;
}

.rating-count {
    font-size: 12px;
    color: #999;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
}

.price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.price-discount {
    font-size: 12px;
    color: #ff3b30;
    font-weight: 600;
}

.product-footer {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.add-to-cart-btn {
    flex: 1;
    padding: 12px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-to-cart-btn:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
}

.quick-view-btn {
    width: 44px;
    height: 44px;
    background: #f5f5f7;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.quick-view-btn:hover {
    background: #e8e8ed;
    color: #000;
}

/* ========== LİSTE GÖRÜNÜMÜ ========== */
.products-grid.list-view .product-card {
    flex-direction: row;
    padding: 20px;
}

.products-grid.list-view .product-image {
    width: 200px;
    padding-bottom: 0;
    height: 200px;
    flex-shrink: 0;
    border-radius: 8px;
}

.products-grid.list-view .product-info {
    padding: 0 20px;
}

.products-grid.list-view .product-name {
    font-size: 18px;
    -webkit-line-clamp: 3;
}

.products-grid.list-view .product-footer {
    flex-direction: column;
    width: 200px;
    flex-shrink: 0;
}

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

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== MOBİL UYUMLULUK ========== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .filter-sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        background: #fff;
        box-shadow: 2px 0 12px rgba(0,0,0,0.1);
        transition: left 0.3s;
    }
    
    .filter-sidebar.active {
        left: 0;
    }
    
    .filter-panel {
        height: 100%;
        overflow-y: auto;
        border-radius: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 13px;
    }
    
    .price-current {
        font-size: 16px;
    }
    
    .category-header {
        padding: 20px;
    }
    
    .category-header h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .view-mode {
        display: none;
    }
}

/* ========== YÜKLEME ANİMASYONU ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========== AKTİF FİLTRELER ========== */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f7;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
}

.filter-tag-remove {
    width: 16px;
    height: 16px;
    background: #d2d2d7;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    color: #fff;
}

.filter-tag-remove:hover {
    background: #000;
}
