@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Roboto:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
}

.container {
    display: flex;
    min-height: 100vh;
    background-color: #f5f5f5;
    margin-top: 7.2rem;
}

.sidebar {
    width: 250px;
    background-color: #fff;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    position: absolute;
    height: 100%;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.closed {
    transform: translateX(calc(-100% + 45px)); /* Leave 30px (toggle button width) visible */
}

.sidebar-toggle {
    position: absolute;
    /* left: -30px; */
    top: 8rem;
    font-size: 23px;
    cursor: pointer;
    background-color: #003b4d;
    border: 1px solid #ddd;
    border-radius: 13%;
    width: 30px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    color: white;
    z-index: 1001;
    left: 13.5rem;
}

.sidebar-header {
    margin-bottom: 20px;
    margin-top: 40px; /* Add space for the toggle button at the top */
}

.search-input {
    width: 81%; /* Narrower search input */
    padding: 10px;
    border: 1px solid #ddd; /* Removed red border */
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
}

.categories h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #003b4d; /* Match search results color */
}

.categories ul {
    list-style: none;
}

.categories li {
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.categories label {
    cursor: pointer;
    font-size: 14.5px;
    font-weight: bold;
    color: #666;
    margin-left: 5px; /* Proper alignment for checkboxes */
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-closed {
    margin-left: 50px; /* Match the visible width of the toggle button */
}

.search-header {
    margin-bottom: 20px;
}

.search-title {
    font-size: 3rem;
    font-weight: bold;
    color: #003b4d; /* Match search results color */
    margin-bottom: 10px;
}

.search-input-container {
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 5px;
}

#totalProducts {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-left: 10px;
    padding: 10px 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.no-match {
    color: #ff0000;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    display: none;
}

.product-grid {
    display: grid;
    gap: 20px;
}

.product-card {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 20px 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 1219px;
}

.image-container {
    width: 120px; /* Fixed width for the image container */
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Hide any overflow */
    border-radius: 5px;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image scales proportionally and covers the container */
    border-radius: 5px;
}

.product-details {
    flex: 1;
}

.product-details h3 {
    font-size: 20px;
    font-weight: bold;
    color: #003b4d; /* Match search results color */
    margin-bottom: 5px;
}

.product-details p {
    font-size: 16px;
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
}

.view-button {
    padding: 8px 16px;
    background-color: #003b4d;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.view-button:hover {
    background-color: #00263b;
}

.pagination {
    margin-top: 20px;
    display: flex;
    /* justify-content: center; */
    gap: 10px;
    align-items: center;
}

.pagination button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 50%; /* Circular buttons */
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666; /* Gray for inactive pages */
    transition: background-color 0.3s, color 0.3s;
}

.pagination button.active {
    background-color: #003b4d; /* Blue for active page, matching your design */
    color: #fff;
    border-color: #003b4d;
}

.pagination button:disabled {
    background-color: #ddd;
    cursor: not-allowed;
    color: #999;
}

/* Style for navigation arrows */
.pagination button.prev, .pagination button.next {
    width: auto; /* Allow text width */
    border-radius: 5px; /* Rectangular shape for arrows */
    padding: 8px 16px; /* More padding for arrows */
    font-size: 16px;
    font-weight: bold;
    background-color: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.pagination button.prev:hover, .pagination button.next:hover {
    background-color: #f0f0f0;
    color: #333;
}

.pagination button.prev:disabled, .pagination button.next:disabled {
    background-color: #ddd;
    cursor: not-allowed;
    color: #999;
}

/* Responsive Design */
@media (max-width: 800px) {
 

    .sidebar-toggle {
        display: block; /* Ensure toggle is visible on small screens */
    }

    .main-content {
        margin-left: 0;
    }

    .main-content.sidebar-closed {
        margin-left: 30px; /* Match the visible width of the toggle button */
    }

    .product-card {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .image-container {
        width: 100px; /* Smaller on mobile */
        margin-right: 0;
        margin-bottom: 10px;
    }

    .product-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .search-input-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .search-input {
        width: 80%;
        margin-bottom: 10px;
    }

    #totalProducts {
        margin-left: 0;
        margin-top: 5px;
    }

    .categories {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .categories li {
        flex: 1 1 45%;
        margin: 5px 0;
    }

    .pagination button {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }

    .pagination button.prev, .pagination button.next {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .product-card {
        padding: 10px;
    }

    .view-button {
        width: 100%;
    }

    .search-title {
        font-size: 18px;
        margin-left: 0.7rem;
    }

    .search-input {
        padding: 6px;
    }

    .categories li {
        flex: 1 1 100%;
    }

    .image-container {
        width: 100px; /* Even smaller on very small screens */
    }

    .pagination button {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .pagination button.prev, .pagination button.next {
        padding: 4px 8px;
        font-size: 12px;
    }
}