/* General Styles */
.ptb-100 {
    padding: 100px 0;
}

.mb-md-30 {
    margin-bottom: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-30 {
    margin-top: 30px;
}

/* Sidebar Styles */
.sidebar {
    background: transparent;
    padding: 0;
}

.sidebar-default {
    background: #ffffff;
    border: 1px solid #e9ecef;
    margin-bottom: 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-category {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-content {
    padding: 20px 15px;
}

.cat-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Categories List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    border-bottom: 1px solid #e9ecef;
    padding: 10px 0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.category-list li a:hover,
.category-list li.active a {
    color: #dc3545;
    text-decoration: none;
}

/* Filter Styles */
.btn-filter {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.btn-filter:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
}

.inner-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

/* Search Section */
.mb-20 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Product Search in Top Bar */
.product-search {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 32px;
    margin: 0;
    padding: 0;
}

/* Search Box */
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    height: 32px;
    margin: 0;
    padding: 0;
}

.search-box {
    position: relative;
    display: flex;
    width: 200px;
    height: 32px;
    align-items: center;
    box-sizing: border-box;
}

.search-input {
    border: 1px solid #ddd;
    padding: 8px 40px 8px 15px;
    font-size: 14px;
    width: 200px;
    border-radius: 4px;
    height: 32px;
    line-height: 16px;
    box-sizing: border-box;
    margin: 0;
}

.search-input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    box-sizing: border-box;
}

.search-btn:hover {
    color: #dc3545;
}

.search-btn:focus {
    outline: none;
    color: #dc3545;
}

.search-btn:active {
    color: #0056b3;
}

.search-btn i {
    font-size: 14px;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Clear search button */
#clear-search-btn {
    color: #999;
}

#clear-search-btn:hover {
    color: #dc3545;
}

/* Filter Lists */
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 6px;
    padding: 1px 0;
}

.check-box {
    display: block;
    width: 100%;
}

.check-box span {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 20px;
}

.check-box input[type="checkbox"] {
    margin-right: 6px;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    cursor: pointer;
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle;
}

.check-box label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    line-height: 1.2;
    font-weight: 400;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.check-box label span {
    color: #999;
    font-size: 10px;
    margin-left: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Price Range Inputs */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    width: 100%;
}

.price-input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 4px;
    min-width: 0;
    width: 100%;
}

.price-separator {
    color: #666;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 12px;
}

/* Product Top Bar */
.product-top-bar {
    background: #f8f9fa;
    padding: 15px 20px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap;
}

/* Left Section */
.product-left-section {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}

/* View Mode Buttons */
.product-view-mode {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.view-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 12px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.view-btn.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.view-btn:hover {
    background: #f8f9fa;
}

.view-btn.active:hover {
    background: #dc3545;
}

/* Sort and Per Page */
.product-sort {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.sort-form {
    display: flex !important;
    align-items: center !important;
    margin: 0;
    padding: 0;
}

.sort-label,
.show-label,
.per-page-label {
    font-size: 14px;
    color: #666;
    margin: 0 !important;
    white-space: nowrap;
    line-height: 1.2;
    display: flex;
    align-items: center;
    height: 32px;
}

.sort-select,
.per-page-select {
    border: 1px solid #ddd;
    padding: 6px 10px;
    font-size: 14px;
    margin: 0 !important;
    min-width: 150px;
    height: 32px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
}

.sort-select:focus,
.per-page-select:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Compare Button */
.btn-compare {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 4px;
}

.btn-compare:hover {
    background: #c82333;
}

/* Products Grid */
.products-wrapper {
    margin-top: 30px;
    transition: opacity 0.3s ease;
}

/* Loading state */
.products-wrapper.loading {
    opacity: 0.5;
    pointer-events: none;
}

.product-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

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

/* Product Image */
.product-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
}

.badge {
    display: block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 2px;
    margin-bottom: 5px;
}

.badge-new {
    background: #17a2b8;
    color: white;
}

.badge-sale {
    background: #dc3545;
    color: white;
}

/* Product Actions */
.product-action {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-action {
    opacity: 1;
}

.product-action .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.product-action .btn-primary {
    background: #dc3545;
    color: white;
}

.product-action .btn-secondary {
    background: white;
    color: #666;
}

.product-action .btn:hover {
    transform: scale(1.1);
}

/* Product Content */
.product-content {
    padding: 20px;
    text-align: center;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #dc3545;
    text-decoration: none;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
}

.current-price {
    color: #dc3545;
}

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

/* List View */
.products-wrapper.list-view .row {
    flex-direction: column;
}

.products-wrapper.list-view .product-item {
    display: flex;
    flex-direction: row;
    margin-bottom: 30px;
}

.products-wrapper.list-view .product-thumb {
    width: 200px;
    flex-shrink: 0;
    aspect-ratio: 1;
}

.products-wrapper.list-view .product-content {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* No Products */
.no-products {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 60px 30px;
}

.no-products h3 {
    color: #666;
    margin-bottom: 15px;
}

.no-products p {
    color: #999;
    margin-bottom: 20px;
}

/* Pagination */
.pagination-wrapper {
    text-align: center;
}

.pagination-wrapper .pagination {
    justify-content: center;
    margin: 0;
}

.pagination-wrapper .page-link {
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 12px;
    margin: 0 2px;
}

.pagination-wrapper .page-link:hover {
    background: #f8f9fa;
    border-color: #ddd;
}

.pagination-wrapper .page-item.active .page-link {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Responsive Design */
@media (max-width: 991px) {
    .product-top-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .product-sort,
    .product-per-page {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .ptb-100 {
        padding: 50px 0;
    }

    .product-view-mode {
        justify-content: center;
        margin-bottom: 15px;
    }

    .products-wrapper.list-view .product-item {
        flex-direction: column;
    }

    .products-wrapper.list-view .product-thumb {
        width: 100%;
    }

    .products-wrapper.list-view .product-content {
        text-align: center;
    }

    .price-range-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .price-separator {
        display: none;
    }
}

@media (max-width: 576px) {
    .category-content {
        padding: 20px 15px;
    }

    .product-top-bar {
        padding: 15px;
    }

    .product-content {
        padding: 15px;
    }
}

/* Subcategory Styles */
.subcategory-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.subcategory-list li {
    margin-bottom: 5px;
}

.subcategory-list a {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
}

.subcategory-list a:hover,
.subcategory-list li.active a {
    color: #dc3545;
    font-weight: 500;
}

.subcategory-list li.active a {
    background-color: #e3f2fd;
    padding: 5px 10px;
    border-radius: 4px;
    margin: 0 -10px;
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
