/* Category List Page Styles */
:root {
    --primary-color: #4f46e5;
    --text-color: #333;
    --border-color: #e5e5e5;
    --bg-light: #f8f6fb;
    --danger-color: #dc3545;
}

body {
    background-color: #fafafa;
}

/* Page Header Banner */
.category-page-header {
    background-color: var(--bg-light);
    padding: 30px 0;
    margin-bottom: 30px;
}

.category-page-header .breadcrumb {
    margin-bottom: 10px;
    font-size: 14px;
}

.category-page-header .breadcrumb a {
    color: #666;
    text-decoration: none;
}

.category-page-header .breadcrumb-item.active {
    color: var(--primary-color);
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.header-icons img {
    height: 40px;
    margin-left: 10px;
}

/* Sidebar Filters */
.filter-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

.filter-header {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.filter-header i {
    color: var(--primary-color);
    margin-right: 10px;
}

.filter-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.filter-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 15px;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.filter-item .form-check-input {
    cursor: pointer;
}

.filter-item .form-check-label {
    cursor: pointer;
    flex-grow: 1;
    margin-left: 8px;
}

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

/* Main Content Top Bar */
.product-list-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.showing-text {
    font-size: 14px;
    color: #666;
}

.sort-by-wrapper {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.sort-by-wrapper select {
    border: none;
    background: transparent;
    font-weight: 500;
    margin-left: 10px;
    cursor: pointer;
    outline: none;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    background: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.active-filters-label {
    font-size: 14px;
    color: #666;
}

.active-filter-tag {
    background: #fff3e0;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #ffd0a8;
}

.active-filter-tag i {
    cursor: pointer;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

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

.badge-out-stock {
    background-color: #333;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
}

.badge-discount {
    background-color: #8cc63f;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    width: fit-content;
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
    transition: 0.2s;
}

.wishlist-btn:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.product-image {
    position: relative;
    height: 200px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    flex-grow: 1;
}

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

.product-title a:hover {
    color: var(--primary-color);
}

.product-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.variant-btn {
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
}

.variant-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

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

.price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

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

.btn-add-cart {
    width: 100%;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    transition: 0.2s;
}

.btn-add-cart:hover {
    background: var(--primary-color);
    color: #fff;
}

.text-out-of-stock {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 14px;
    margin-top: auto;
}

/* Pagination */
.custom-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 5px;
}

.custom-pagination .page-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: 0.2s;
}

.custom-pagination .page-item:hover,
.custom-pagination .page-item.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.custom-pagination .page-item.disabled {
    color: #ccc;
    background: #f9f9f9;
    cursor: not-allowed;
}

@media (max-width: 991px) {
    .filter-sidebar {
        margin-bottom: 30px;
    }

    .product-list-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
    height: 38px;
}

.quantity-control .btn-minus,
.quantity-control .btn-plus {
    background: #fff;
    color: var(--primary-color);
    border: none;
    width: 36px;
    height: 100%;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    padding: 0;
}

.quantity-control .btn-minus:hover,
.quantity-control .btn-plus:hover {
    background: var(--primary-color);
    color: #fff;
}

.quantity-control .qty-input {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    border: none;
    border-left: 1px solid var(--primary-color);
    border-right: 1px solid var(--primary-color);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 0;
    outline: none;
}

.quantity-control .qty-input::-webkit-outer-spin-button,
.quantity-control .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-control .qty-input[type=number] {
    -moz-appearance: textfield;
}