/* ============================================
   PRODUCTS LAYOUT - REUSABLE COMPONENTS
   Grid View, List View, Sidebar
   ============================================ */

/* Products Container */
.products-container {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */

.products-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #072945;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.sidebar-title i {
    color: #de2800;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 45px;
    border: 2px solid rgba(7, 41, 69, 0.1);
    border-radius: 8px;
}

.search-box input:focus {
    border-color: #de2800;
    box-shadow: 0 0 0 3px rgba(247, 164, 34, 0.1);
}

.btn-search {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #de2800 0%, #d97706 100%);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-search:hover {
    transform: translateY(-50%) scale(1.05);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 10px;
}

.btn-view {
    flex: 1;
    padding: 10px;
    border: 2px solid rgba(7, 41, 69, 0.1);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #072945;
}

.btn-view:hover {
    border-color: #de2800;
    color: #de2800;
}

.btn-view.active {
    background: linear-gradient(135deg, #de2800 0%, #d97706 100%);
    border-color: #de2800;
    color: white;
}

/* Filter Checkboxes */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.filter-checkbox:hover {
    background: rgba(247, 164, 34, 0.05);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #de2800;
}

.filter-checkbox span {
    color: #333;
    font-size: 0.95rem;
}

/* ============================================
   PRODUCTS GRID VIEW
   ============================================ */

.products-grid {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.products-count {
    color: #666;
    font-size: 0.95rem;
}

.products-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Product Card - Grid View */
.product-card-grid {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-image-grid {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.product-image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-grid:hover .product-image-grid img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, #de2800 0%, #d97706 100%);
    color: white;
    z-index: 2;
}

.product-content-grid {
    padding: 20px;
}

.product-title-grid {
    font-size: 1.1rem;
    font-weight: 700;
    color: #072945;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description-grid {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.product-rating i {
    color: #de2800;
    font-size: 0.9rem;
}

.product-rating span {
    color: #666;
    font-size: 0.85rem;
    margin-left: 5px;
}

.product-footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(7, 41, 69, 0.1);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #072945;
}

.product-price-tbd {
    font-size: 1rem;
    font-weight: 600;
    color: #de2800;
}

.product-old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.btn-add-cart {
    background: linear-gradient(135deg, #de2800 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(247, 164, 34, 0.3);
}

/* ============================================
   PRODUCTS LIST VIEW
   ============================================ */

.products-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-card-list {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    transition: all 0.3s ease;
}

.product-card-list:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-image-list {
    width: 250px;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.product-image-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-list:hover .product-image-list img {
    transform: scale(1.05);
}

.product-content-list {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.product-title-list {
    font-size: 1.3rem;
    font-weight: 700;
    color: #072945;
    margin-bottom: 10px;
}

.product-description-list {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-meta-list {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.product-meta-item i {
    color: #de2800;
}

.product-footer-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(7, 41, 69, 0.1);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .products-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .products-container {
        flex-direction: column;
    }
    
    .products-sidebar {
        width: 100%;
    }
    
    .products-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .product-card-list {
        flex-direction: column;
    }
    
    .product-image-list {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 576px) {
    .products-grid-container {
        grid-template-columns: 1fr;
    }
    
    .product-footer-grid,
    .product-footer-list {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .btn-add-cart {
        width: 100%;
    }
}

/* ============================================
   LOADING STATE
   ============================================ */

.products-loading {
    text-align: center;
    padding: 60px 20px;
}

.products-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: #de2800;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.products-empty {
    text-align: center;
    padding: 60px 20px;
}

.products-empty i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.products-empty h3 {
    color: #666;
    margin-bottom: 10px;
}

.products-empty p {
    color: #999;
}

