/* ==================== Products Page Styles ==================== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 60px 0 40px;
    margin-bottom: 0;
}

.page-header .breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.page-header .breadcrumb-item a {
    color: #ee731b;
    text-decoration: none;
}

.page-header .breadcrumb-item.active {
    color: #999;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: #666;
}

.page-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.page-subtitle {
    color: #999;
    font-size: 1.1rem;
    margin: 0;
}

/* Products Page */
.products-page {
    background: #f8f9fa;
}

/* Sidebar */
.sidebar-wrapper {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.widget-title i {
    color: #ee731b;
}

/* Categories Tree */
.categories-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 8px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    padding: 0;
}

.toggle-btn:hover {
    background: rgba(238, 115, 27, 0.1);
}

.toggle-btn i {
    font-size: 0.75rem;
    color: #666;
    transition: transform 0.3s;
}

.toggle-btn.open i {
    transform: rotate(90deg);
    color: #ee731b;
}

.category-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.category-link:hover,
.category-link.active {
    background: #fff;
    color: #ee731b;
    border-color: #ee731b;
}

.category-link i {
    color: #ee731b;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.category-link:hover i,
.category-link.active i {
    color: #ee731b;
}

.category-link .count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
}

/* Subcategories */
.subcategories {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 32px;
    display: none;
    animation: slideDown 0.3s ease;
}

.subcategories.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subcategory-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.3s;
    margin-bottom: 4px;
    border-left: 2px solid transparent;
}

.subcategory-link:hover,
.subcategory-link.active {
    background: rgba(238, 115, 27, 0.08);
    color: #ee731b;
    border-left-color: #ee731b;
}

.subcategory-link i {
    color: #ccc;
    font-size: 0.7rem;
    transition: color 0.3s;
}

.subcategory-link:hover i,
.subcategory-link.active i {
    color: #ee731b;
}

.subcategory-link .count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #999;
}

/* Search Widget */
.search-input {
    border-radius: 8px 0 0 8px;
    border: 1px solid #eee;
}

.search-input:focus {
    border-color: #ee731b;
    box-shadow: none;
}

.btn-search {
    background: #ee731b;
    color: #fff;
    border: none;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background: #d65e0f;
}

/* Products Toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.results-count {
    color: #666;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options label {
    color: #666;
    margin: 0;
    white-space: nowrap;
}

.sort-options .form-select {
    width: auto;
    border-radius: 8px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(238, 115, 27, 0.15);
    border-color: #ee731b;
}

.product-image {
    display: block;
    height: 240px;
    overflow: hidden;
    background: #f8f8f8;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    display: inline-block;
    font-size: 0.75rem;
    color: #ee731b;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.product-title a:hover {
    color: #ee731b;
}

.product-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ee731b;
}

.product-stock {
    font-size: 0.85rem;
    font-weight: 500;
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-stock::before {
    content: "✓";
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 0.75rem;
    font-weight: bold;
}

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #ee731b;
    color: #fff;
    transform: translateX(2px);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
}

.pagination-wrapper .pagination {
    justify-content: center;
    gap: 5px;
}

.pagination-wrapper .page-item {
    margin: 0;
}

.pagination-wrapper .page-link {
    border: 1px solid #ddd;
    padding: 10px 16px;
    margin: 0;
    border-radius: 8px;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
    min-width: 45px;
    text-align: center;
}

.pagination-wrapper .page-link:hover {
    background: #ee731b;
    color: #fff;
    border-color: #ee731b;
}

.pagination-wrapper .page-item.active .page-link {
    background: #ee731b;
    color: #fff;
    border-color: #ee731b;
}

.pagination-wrapper .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #ccc;
    border-color: #ddd;
    cursor: not-allowed;
}

/* Pagination arrow icons - normal size */
.pagination-wrapper .page-link svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* No Products */
.no-products {
    background: #fff;
    border-radius: 15px;
    padding: 60px 30px;
}

/* Responsive */
@media (max-width: 991px) {
    .page-title {
        font-size: 2rem;
    }

    .sidebar-wrapper {
        position: static;
    }

    .products-toolbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0 30px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-image {
        height: 180px;
    }

    .product-content {
        padding: 15px;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}