/* Filtreleme ve Karşılaştırma Stilleri */

/* Filtreleme Araçları */
.filter-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.filter-toggle-btn, .compare-toggle-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-toggle-btn:hover, .compare-toggle-btn:hover {
    background-color: #e9ecef;
}

.filter-toggle-btn i, .compare-toggle-btn i {
    margin-right: 5px;
}

.sort-options {
    display: flex;
    align-items: center;
}

.sort-options label {
    margin-right: 10px;
    font-size: 14px;
}

.sort-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.compare-count {
    display: inline-block;
    background-color: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-left: 5px;
}

/* Filtreleme Paneli */
.filter-panel {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100%;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease;
}

.filter-panel.active {
    left: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.filter-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-filter {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.filter-section {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.filter-section h4 {
    margin: 0 0 10px;
    font-size: 16px;
}

.price-range {
    margin-top: 10px;
}

.price-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.price-input {
    width: 48%;
}

.price-input label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.price-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.price-slider {
    margin-top: 15px;
    padding: 0 10px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
}

.filter-option input[type="checkbox"] {
    margin-right: 5px;
}

.filter-actions {
    padding: 15px;
    display: flex;
    justify-content: space-between;
}

.apply-filter-btn, .reset-filter-btn {
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}

.apply-filter-btn {
    background-color: #4caf50;
    color: white;
    border: none;
}

.reset-filter-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    text-decoration: none;
    display: inline-block;
}

/* Ürün Karşılaştırma Paneli */
.compare-panel {
    position: fixed;
    bottom: -200px;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: bottom 0.3s ease;
}

.compare-panel.active {
    bottom: 0;
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.compare-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-compare {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.compare-items {
    display: flex;
    overflow-x: auto;
    padding: 15px;
    gap: 15px;
}

.compare-item {
    min-width: 150px;
    max-width: 200px;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    position: relative;
}

.compare-item img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
}

.compare-item-info h4 {
    margin: 0 0 5px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-item-info p {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #ff6b6b;
}

.remove-compare {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #666;
}

.compare-actions {
    display: flex;
    justify-content: flex-end;
    padding: 15px;
    border-top: 1px solid #eee;
    gap: 10px;
}

.compare-btn, .clear-compare-btn {
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.compare-btn {
    background-color: #4caf50;
    color: white;
    border: none;
}

.compare-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.clear-compare-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

/* Ürün Kartı Karşılaştırma Butonu */
.product-card .product-actions-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.product-card:hover .product-actions-overlay {
    transform: translateY(0);
}

.product-card .compare-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-card .compare-btn:hover {
    background-color: #e9ecef;
}

.product-card .compare-btn i {
    margin-right: 5px;
}

/* Karşılaştırma Sayfası Stilleri */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.compare-table th, .compare-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

.compare-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.compare-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.compare-table .product-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.compare-table .product-name {
    font-weight: bold;
    margin: 10px 0;
}

.compare-table .product-price {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 16px;
    margin: 10px 0;
}

.compare-table .add-to-cart-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

.compare-table .feature-row {
    font-weight: bold;
    background-color: #e9ecef;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .filter-tools {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .filter-panel {
        width: 280px;
    }
    
    .compare-items {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .compare-item {
        min-width: 120px;
    }
}