/* ========================================
   PRODUCTS PAGE - AMAZON/FLIPKART STYLE
   ======================================== */

.products-page-new {
    padding: 40px 20px;
    background: #f5f5f5;
    min-height: 100vh;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   LEFT SIDEBAR FILTERS
   ======================================== */

.filters-sidebar {
    background: var(--white);
    border-radius: 8px;
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 80px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filter-section {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
    transition: background 0.2s;
}

.filter-section:hover {
    background: #fafafa;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section:first-child {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid var(--primary);
}

.filter-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 10px 0;
}

.clear-filters {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.clear-filters:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.filter-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    padding-bottom: 8px;
}

.filter-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

/* Search Filter */
.search-filter-form {
    display: flex;
    gap: 5px;
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    padding: 10px 15px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--success);
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.filter-option:hover {
    background: #f9f9f9;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.filter-option span {
    flex: 1;
    font-size: 0.95rem;
    color: var(--dark);
}

.product-count {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Price Filter */
.price-filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.price-input {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 122, 62, 0.1);
}

.price-inputs span {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 500;
    flex-shrink: 0;
}

.apply-price-btn {
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(45, 122, 62, 0.2);
}

.apply-price-btn:hover {
    background: linear-gradient(135deg, var(--success), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 122, 62, 0.3);
}

.price-range-info {
    text-align: center;
    color: var(--gray);
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 5px;
}

.price-range-info small {
    font-weight: 500;
}

/* ========================================
   RIGHT SIDE PRODUCTS
   ======================================== */

.products-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Toolbar */
.products-toolbar {
    background: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.results-info p {
    margin: 0;
    color: var(--dark);
    font-size: 0.95rem;
}

.results-info strong {
    color: var(--primary);
    font-weight: 600;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options label {
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 500;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--white);
    transition: border-color 0.3s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Products Grid */
.products-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card-new {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card-new:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.product-image-new {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: #f9f9f9;
}

.product-image-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card-new:hover .product-image-new img {
    transform: scale(1.08);
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
    z-index: 10;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.product-info-new {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.product-category-badge {
    display: inline-block;
    background: #e8f5e9;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title-new {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-title-new a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.product-title-new a:hover {
    color: var(--primary);
}

.product-name-hi-new {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray);
}

.product-price-new {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 5px 0;
}

.current-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.price-unit {
    font-size: 0.85rem;
    color: var(--gray);
}

.contact-price {
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 600;
}

.product-actions-new {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
}

.btn-view-details {
    flex: 1;
    padding: 10px;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-view-details:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-add-cart {
    flex: 1;
    padding: 10px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    background: var(--success);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 122, 62, 0.3);
}

/* No Products Found */
.no-products-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 8px;
}

.no-products-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-products-found h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.no-products-found p {
    color: var(--gray);
    margin-bottom: 25px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 250px 1fr;
        gap: 20px;
    }

    .products-grid-new {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .products-page-new {
        padding: 20px 10px;
    }

    .products-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filters-sidebar {
        position: static;
        margin-bottom: 15px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .filter-toggle-btn {
        display: block !important;
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, var(--primary), var(--success));
        color: var(--white);
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        margin-bottom: 15px;
        box-shadow: 0 4px 12px rgba(45, 122, 62, 0.3);
        transition: all 0.3s;
    }

    .filter-toggle-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(45, 122, 62, 0.4);
    }

    .filters-sidebar.mobile-hidden {
        display: none;
    }

    .products-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 12px 15px;
    }

    .sort-options {
        justify-content: space-between;
        width: 100%;
    }

    .sort-select {
        flex: 1;
        min-width: 0;
    }

    .products-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-image-new {
        height: 180px;
    }

    .product-info-new {
        padding: 12px;
    }

    .product-title-new {
        font-size: 0.9rem;
    }

    .product-actions-new {
        flex-direction: column;
        gap: 8px;
    }

    .btn-view-details,
    .btn-add-cart {
        padding: 8px;
        font-size: 0.85rem;
    }

    .current-price {
        font-size: 1.2rem;
    }

    .filter-section {
        padding: 15px;
    }

    .price-inputs {
        gap: 6px;
    }

    .price-input {
        padding: 8px 6px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .products-page-new {
        padding: 15px 8px;
    }

    .products-grid-new {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-image-new {
        height: 250px;
    }

    .product-card-new {
        max-width: 100%;
    }

    .filter-section {
        padding: 12px;
    }

    .filter-title {
        font-size: 1.1rem;
    }

    .filter-heading {
        font-size: 0.9rem;
    }

    .current-price {
        font-size: 1.3rem;
    }

    .product-title-new {
        font-size: 1rem;
    }

    .results-info p {
        font-size: 0.85rem;
    }

    .sort-options label {
        font-size: 0.85rem;
    }

    .sort-select {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}
