
/* ============================================
    صفحه لیست کتاب‌ها
    ============================================ */

.book-list-wrapper {
    margin-bottom: 60px;
}

/* بریدکرامب */
.breadcrumb-area {
    background: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb li a {
    color: #f60;
    text-decoration: none;
}

.breadcrumb li.active {
    color: #f60;
    font-weight: 600;
}

/* سایدبار */
.sidebar-widget {
    background: white;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.sidebar-widget-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget-title i {
    color: #f60;
}

.filter-help-text {
    font-size: 12px;
    color: #999;
    margin: -6px 0 14px;
    line-height: 1.8;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 360px;
    overflow-y: auto;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list li a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 14px;
}

.filter-list li a:hover,
.filter-list li a.active {
    color: #f60;
    background: #fff3e6;
}

.filter-list .count {
    color: #999;
    font-size: 11px;
}

.filter-list li a.active .count {
    color: #f60;
}

.filter-checkbox {
    margin-bottom: 12px;
}

.filter-checkbox input {
    display: none;
}

.filter-checkbox label {
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 14px;
    transition: all 0.3s ease;
    font-size: 14px;
    user-select: none;
}

.filter-checkbox label::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid #ddd;
    background: #fff;
    display: inline-block;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.filter-checkbox input:checked + label {
    border-color: rgba(255, 102, 0, 0.35);
    background: #fff3e6;
    color: #f60;
    font-weight: 700;
}

.filter-checkbox input:checked + label::before {
    background: #f60;
    border-color: #f60;
    box-shadow: inset 0 0 0 4px #fff;
}

.clear-filters-link {
    display: block;
    width: 100%;
    text-align: center;
    background: #f8f9fa;
    color: #f60;
    border-radius: 30px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.clear-filters-link:hover {
    background: #f60;
    color: white;
    transform: translateY(-2px);
}

@media (min-width: 992px) {
    .book-sidebar {
        position: sticky;
        top: 95px;
    }
}

/* هدر محتوا */
.content-header {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 18px 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    margin-bottom: 22px;
}

.content-title {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-title i {
    color: #f60;
    font-size: 26px;
}

.books-count-badge {
    background: #f60;
    color: white;
    border-radius: 30px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 700;
}

/* جستجو و مرتب‌سازی */
.tools-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.search-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #f60;
    box-shadow: 0 0 0 3px rgba(255,102,0,0.1);
}

.search-btn {
    background: #f60;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    white-space: nowrap;
}

.search-btn:hover {
    background: #e55a00;
    transform: translateY(-2px);
}

.sort-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.sort-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 12px 18px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.3s ease;
    width: 100%;
    color: #555;
}

.sort-btn:hover {
    border-color: #f60;
    color: #f60;
}

.sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin-top: 6px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.sort-dropdown.active .sort-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-menu a {
    display: block;
    padding: 11px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.sort-menu a:hover {
    background: #fff3e6;
    color: #f60;
}

.sort-menu a.active {
    background: #f60;
    color: white;
}

/* باکس محصولات */
.products-grid-section {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 24px 22px 30px;
}

/* کارت محصول - هماهنگ با هوم */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    flex-shrink: 0;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.condition-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    z-index: 3;
}

.condition-badge.new {
    background: #4caf50;
    color: white;
}

.condition-badge.used {
    background: #ff9800;
    color: white;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f60;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 3;
}

.stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    z-index: 3;
}

.stock-badge.in-stock {
    background: #4caf50;
}

.stock-badge.out-stock {
    background: #999;
}

.product-info {
    padding: 15px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    min-height: 40px;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #f60;
}

.product-author {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    min-height: 30px;
}

.product-author a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-author a:hover {
    color: #f60;
}

.product-price {
    margin-top: auto;
}

.product-price .final-price {
    font-size: 16px;
    font-weight: 700;
    color: #f60;
}

.product-price .old-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

.add-to-cart-btn {
    background: #f60;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 12px;
}

.add-to-cart-btn:hover {
    background: #e55a00;
    transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}
/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin-top: 42px;
    flex-wrap: wrap;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: white;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background: #f60;
    border-color: #f60;
    color: white;
}

.pagination .page-item .page-link:hover {
    background: #f60;
    border-color: #f60;
    color: white;
}

/* حالت خالی */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    border: 1px solid #f0f0f0;
}

.empty-state .empty-link {
    display: inline-block;
    margin-top: 14px;
    padding: 9px 25px;
    background: #f60;
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.empty-state .empty-link:hover {
    background: #e55a00;
    color: #fff;
    transform: translateY(-2px);
}

/* ریسپانسیو */
@media (max-width: 991px) {
    .book-sidebar {
        position: static;
    }

    .tools-card .row {
        row-gap: 12px;
    }
}

@media (max-width: 768px) {
    .content-header {
        padding: 16px;
    }

    .content-title {
        font-size: 19px;
    }

    .content-title i {
        font-size: 22px;
    }

    .products-grid-section {
        padding: 20px 16px 24px;
        border-radius: 18px;
    }

    .product-title {
        font-size: 12px;
        min-height: 35px;
    }

    .product-author {
        font-size: 10px;
        min-height: 25px;
    }

    .product-price .final-price {
        font-size: 14px;
    }

    .product-price .old-price {
        font-size: 12px;
    }

    .discount-badge,
    .stock-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .condition-badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .add-to-cart-btn {
        font-size: 12px;
        padding: 9px;
    }

    .search-wrapper {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .book-list-wrapper {
        margin-bottom: 42px;
    }

    .sidebar-widget {
        padding: 16px;
        border-radius: 16px;
    }

    .product-info {
        padding: 12px;
    }
}
