/* ==================== PRODUCTS PAGE - CLEAN LIGHT DESIGN ==================== */

.products-page {
    background: #f8f9fa;
    min-height: 100vh;
}

/* Breadcrumb */
.breadcrumb {
    background: #ffffff;
    padding: 18px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6c757d;
}

.breadcrumb-list a {
    color: #6c757d;
    transition: color 0.2s;
}

.breadcrumb-list a:hover {
    color: #00b96b;
}

.breadcrumb-list i.fa-chevron-right {
    font-size: 10px;
}

/* Products Section */
.products-section {
    padding: 0 0 80px;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: 100%;
    overflow: hidden;
}

/* ========== SIDEBAR FILTERS ========== */
.filters-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
    width: 280px;
    flex-shrink: 0;
}

.filters-container {
    background: #ffffff;
    border-radius: 2px;
    padding: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filter-group {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

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

.filter-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Filter List */
.category-filter-wrapper {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    margin-bottom: 10px;
}

/* Custom Scrollbar */
.category-filter-wrapper::-webkit-scrollbar {
    width: 6px;
}

.category-filter-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.category-filter-wrapper::-webkit-scrollbar-thumb {
    background: #00b96b;
    border-radius: 10px;
}

.category-filter-wrapper::-webkit-scrollbar-thumb:hover {
    background: #009955;
}

.category-filter-wrapper.collapsed {
    max-height: 250px;
}

.category-filter-wrapper.expanded {
    max-height: none;
}

.category-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-filter-list li {
    margin-bottom: 6px;
}

.category-filter-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #6c757d;
    border-radius: 2px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.category-filter-list a i {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.category-filter-list a:hover,
.category-filter-list a.active {
    background: #f8f9fa;
    color: #00b96b;
    border-left-color: #00b96b;
    padding-left: 20px;
}

/* Show More Button */
.btn-show-more {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    color: #00b96b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-show-more:hover {
    background: #f8f9fa;
    border-color: #00b96b;
}

/* Price Filter */
.price-filter-form {
    margin-bottom: 15px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    width: 100%;
}

.price-inputs input {
    flex: 1;
    min-width: 0;
    max-width: 110px;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    color: #1a1a1a;
    font-size: 14px;
    transition: all 0.2s;
}

.price-inputs input:focus {
    border-color: #00b96b;
    background: #ffffff;
}

.price-inputs span {
    color: #6c757d;
    font-weight: 600;
}

.btn-apply-price {
    width: 100%;
    padding: 11px;
    background: #00b96b;
    color: #ffffff;
    border: none;
    border-radius: 2px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-apply-price:hover {
    background: #009955;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,185,107,0.25);
}

.price-range-display {
    text-align: center;
    font-size: 12px;
    color: #adb5bd;
    margin-top: 10px;
}

/* Clear Filters Button */
.btn-clear-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #f8f9fa;
    color: #ff3366;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-clear-filters:hover {
    background: #ffffff;
    border-color: #ff3366;
    transform: translateY(-1px);
}

/* ========== PRODUCTS MAIN AREA ========== */
.products-main {
    min-height: 600px;
    min-width: 0;
    overflow: hidden;
}

/* Products Header */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 2px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.products-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.products-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.products-count {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

/* Sort Options */
.sort-options {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-options label {
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
}

.sort-options select {
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 170px;
}

.sort-options select:focus {
    border-color: #00b96b;
    background: #ffffff;
}

/* ========== PRODUCTS GRID ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.product-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: #00b96b;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #ffffff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.sale-badge {
    background: linear-gradient(135deg, #ff3366, #ff6b6b);
}

.product-badge.featured-badge {
    background: linear-gradient(135deg, #00b96b, #00d68f);
}

.product-badge:not(.sale-badge):not(.featured-badge):not(.out-of-stock-badge) {
    background: #ff3366;
}

.product-image {
    display: block;
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    background: #ffffff;
    padding: 10px;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 16px 18px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    display: inline-block;
    font-size: 10px;
    color: #00b96b;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 1.2px;
}

.product-card .product-title {
    font-size: 13px !important;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 36px;
    max-height: 36px;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.product-price-row .price-current {
    font-size: 18px;
    font-weight: 800;
    color: #00b96b;
}

.product-price-row .price-old {
    font-size: 13px;
    color: #adb5bd;
    text-decoration: line-through;
    font-weight: 500;
}

/* Card actions - always visible at bottom */
.product-card-actions {
    padding: 0 18px 16px;
    margin-top: auto;
}

.btn-add-to-cart {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add-to-cart:not(.btn-sold-out) {
    background: linear-gradient(135deg, #00b96b, #00a65e);
    color: #ffffff;
}

.btn-add-to-cart:not(.btn-sold-out):hover {
    background: linear-gradient(135deg, #00a65e, #008f50);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,185,107,0.35);
}

.btn-sold-out {
    background: #f1f3f5;
    color: #868e96;
    cursor: not-allowed;
}

.product-description {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 39px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 14px;
    font-size: 12px;
}

.product-rating i {
    color: #ffc107;
}

.product-rating span {
    margin-left: 6px;
    color: #adb5bd;
    font-size: 12px;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #e9ecef;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #00b96b;
    text-align: center;
}

.product-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.btn-add-cart {
    width: 42px;
    height: 42px;
    background: #f8f9fa;
    color: #00b96b;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-cart:hover:not(:disabled) {
    background: #00b96b;
    color: #ffffff;
    border-color: #00b96b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,185,107,0.25);
}

.btn-add-cart:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #e9ecef;
    color: #adb5bd;
}

/* ========== NO PRODUCTS ========== */
.no-products {
    text-align: center;
    padding: 80px 30px;
    background: #ffffff;
    border-radius: 2px;
    border: 1px solid #e9ecef;
}

.no-products i {
    font-size: 80px;
    color: #dee2e6;
    margin-bottom: 24px;
}

.no-products h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #1a1a1a;
    font-weight: 700;
}

.no-products p {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 15px;
}

.no-products .btn {
    display: inline-block;
    padding: 12px 32px;
    background: #00b96b;
    color: #ffffff;
    border-radius: 2px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.no-products .btn:hover {
    background: #009955;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,185,107,0.25);
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 50px;
    padding: 0 10px;
}

.pagination-info {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.pagination-total {
    color: #adb5bd;
    font-weight: 400;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn,
.pagination-number {
    padding: 8px 14px;
    background: #ffffff;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: #f8f9fa;
    color: #00b96b;
    border-color: #00b96b;
}

.pagination-number.active {
    background: #00b96b;
    color: #ffffff;
    border-color: #00b96b;
    box-shadow: 0 2px 8px rgba(0, 185, 107, 0.3);
}

.pagination-numbers {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-ellipsis {
    padding: 8px 6px;
    color: #adb5bd;
    font-weight: 600;
    font-size: 14px;
    user-select: none;
}

.pagination-first,
.pagination-last {
    font-size: 16px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .products-layout {
        grid-template-columns: 260px 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .filters-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .filter-group {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 20px;
    }
    
    .products-title {
        font-size: 24px;
    }
    
    .sort-options {
        width: 100%;
    }
    
    .sort-options select {
        flex: 1;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 12px 14px 6px;
    }
    
    .product-card-actions {
        padding: 0 14px 12px;
    }
    
    .btn-add-to-cart {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .product-card .product-title {
        font-size: 12px !important;
    }
    
    .product-price-row .price-current {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-info {
        padding: 10px 12px 4px;
    }
    
    .product-card-actions {
        padding: 0 12px 10px;
    }
    
    .product-card .product-title {
        font-size: 11px !important;
        height: 30px;
        max-height: 30px;
    }
    
    .product-price-row .price-current  {
        font-size: 14px;
    }

    .product-price-row .price-old {
        font-size: 11px;
    }
    
    .product-image {
        height: 160px;
    }
    
    /* Pagination responsive */
    .pagination-controls {
        gap: 4px;
    }
    
    .pagination-btn,
    .pagination-number {
        padding: 6px 10px;
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }
    
    .pagination-first,
    .pagination-last {
        display: none;
    }
}

/* ========== OUT OF STOCK CARD STYLING ========== */
.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock .product-image img {
    filter: grayscale(40%);
    transition: filter 0.3s ease, transform 0.5s ease;
}

.product-card.out-of-stock:hover .product-image img {
    filter: grayscale(20%);
}

.product-card.out-of-stock:hover {
    border-color: #dee2e6;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.out-of-stock-badge {
    background: linear-gradient(135deg, #6c757d, #868e96) !important;
    color: #ffffff !important;
}

.product-card.out-of-stock .product-overlay .btn-icon[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.product-card.out-of-stock .price-current {
    color: #868e96 !important;
}

/* Out of stock overlay on product detail */
.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 2;
    pointer-events: none;
}
