/* products-styles.css */

/* Hero section for Products page */
.products-page-hero {
    background-color: #f8f8f8;
    padding: 2rem 0;
    border-bottom: 1px solid #e0e0e0;

}

.products-page-hero .breadcrumb {
    margin-left: 50px;
    font-size: 0.9rem;
    color: #666;
}

.products-page-hero .breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.products-page-hero .breadcrumb a:hover {
    text-decoration: underline;
}

/* Products content section */
.products-content-section {
    padding: 3rem 0;
}

.products-grid-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Filter Sidebar */
.filter-sidebar {
    flex: 0 0 280px;
    /* Fixed width for sidebar */
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.filter-group input[type="text"],
.filter-group select {
    position: relative;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #555;
}

.search-input-container {
    position: relative;
}

.search-input-container i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding-left: 80%;
    color: #aaa;
}

.search-input-container input {
    padding-left: 35px;

    /* Make space for the icon */
}

.apply-filters-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #FACC15;
    /* Yellow button */
    color: #2D3748;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.apply-filters-btn:hover {
    background-color: #EBB300;
    transform: translateY(-2px);
}

/* Product Grid */
.product-grid {
    flex: 1;
    /* Takes remaining space */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: #fff;
    width: 300px;
    height: 480px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    /* Space for the button */
}

.product-card img {
    max-width: 90%;
    max-height:200px;
    height: auto;
    display: block;
    margin-bottom: 1rem;
}

.product-card h4 {
    font-size: 1.1rem;
    color: #2D3748;
    margin-bottom: 0.5rem;
}

.product-card .part-number {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 0.3rem;
}

.product-card .compatibility {
    font-size: 0.8rem;
    color: #4A5568;
    margin-bottom: 1rem;
}

.product-card .brand-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #E9ECEF;
    color: #000;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
}

.product-card .view-details-btn {
    text-decoration: none;
    width: 100%;
    background-color: #FACC15;
    /* Yellow button */
    color: #2D3748;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.product-card .view-details-btn:hover {
    background-color: #EBB300;
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination-info {
    font-size: 0.95rem;
    color: #2D3748;
    background-color: #f0f0f0;
    /* Light grey background for the info */
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin: 0 0.5rem;
    /* Adjust margin */
}

.pagination-arrow {
    background-color: #ffffff;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination-arrow:hover {
    background-color: #f0f0f0;
    color: #333;
}

.load-more-section {
    text-align: center;
    margin-top: 2rem;
    margin-bottom:2rem;
    margin:0 auto;
    max-width:1400px;
}

.load-more-btn {
    background-color: #FACC15;
    /* Yellow button */
    color: #2D3748;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.load-more-btn:hover {
    background-color: #EBB300;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .products-grid-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-sidebar {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .products-content-section {
        padding: 2rem 0.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .filter-sidebar {
        padding: 1rem;
    }
}

/* New styles for filter headers and expand/collapse functionality */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.filter-header label {
    margin-bottom: 0;
    /* Override default label margin */
}

.filter-header .arrow-icon {
    transition: transform 0.3s ease;
}

.filter-header.collapsed .arrow-icon {
    transform: rotate(-90deg);
}

.filter-options {
    max-height: 500px;
    /* Arbitrary large height */
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.filter-options.collapsed {
    max-height: 0;
    /* Collapse by setting max-height to 0 */
}

/* Custom Checkbox styles */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide the browser's default checkbox */
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #eee;
    border-radius: 3px;
}

/* On mouse-over, add a grey background color */
.checkbox-container:hover input~.checkmark {
    background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.checkbox-container input:checked~.checkmark {
    background-color: #FACC15;
    /* Yellow for checked state */
}

/* Create the checkmark (indicator) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkbox-container input:checked~.checkmark:after {
    display: block;
}

/* Style the checkmark indicator */
.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #2D3748;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}