        html {
              overflow-y: scroll;
        }
        
        body {
            font-family: Garamond;
            margin: 0;
            padding: 0;
            background-color: #f8f9fa;
            width: 100%;
            max-width: 100%;
        }

        /* Adjusted Header Styles */
        header {
            background-color: #004225;
            color: white;
            padding: 7px 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-sizing: border-box;
            margin-right: 15%;
        }

        /* New Logo and Title Styles */
        .logo-title {
            display: flex;
            align-items: center;
        }
        
        .header-logo {
            height: 30px; /* Adjust the height as needed */
            margin-right: 40px;
            border-radius: 50%; /* This makes the image circular */
            object-fit: cover; /* Ensures the image fits well within the circle */    
        }

        /* Adjusted Header Title */
        header h1 {
            margin: 0;
        }

        header h1 a {
            color: white;
            text-decoration: none;
            font-size: 24px;
            margin-left: -30px;             
        }

        /* Adjusted Navigation Links */
        .header-nav {
            display: flex;
            align-items: center;
            margin-right: 30px; 
        }

        .header-nav a {
            font-size: 16px;
            color: white;
            text-decoration: none;
            margin-left: 25px;
        }

        .header-nav a:hover {
            text-decoration: underline;
        }

        /* Styles for the navigation links in the footer */
        footer {
            background-color: #004225;
            color: white;
            padding: 10px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-sizing: border-box;
            margin-right: 15%;
        }

        .footer-nav {
            display: flex;
            align-items: center;
            margin-right: 30px;
        }

        .footer-nav a {
            font-size: 16px;
            color: white;
            text-decoration: none;
            margin-left: 25px;
        }

        .footer-nav a:first-child {
            margin-left: 0;
        }

        .footer-nav a:hover {
            text-decoration: underline;
        }

        main {
            display: flex;
            gap: 20px;
            padding: 0;
            max-width: 100%;
            box-sizing: border-box;
            margin-right: 15%;
        }

        /* Left 18% filter menu */
        .filter-menu {
            width: 18%;
            padding: 15px;
            box-sizing: border-box;
            background-color: #f0f0f0;
            margin: 0;
        }

        .filter-menu h3 {
            margin-top: 0;
        }

        .filter-menu input[type="number"],
        .filter-menu input[type="text"] {
            width: calc(70% - 15px);
            padding: 1px;
            margin-bottom: 5px;
            box-sizing: border-box;
            font-family: Garamond;
        }

.filter-menu input[type="date"] {
    width: calc(70% - 15px);
    padding: 2px;
    margin-bottom: 5px;
    box-sizing: border-box;
    font-family: Garamond;
}


        .filter-menu button {
            padding: 5px 10px;
            background-color: #004225;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin-right: 5px;
            margin-bottom: 15px;
        }

        .filter-menu label {
            display: block;
            margin-bottom: 3px;
        }

        /* Reduced spacing between custom keyword inputs */
        .custom-keyword-label {
            margin-bottom: 0px;
            margin-top: 3px;
        }

        .filter-section {
            margin-bottom: 1px;
            padding-bottom: 1px;
            border-bottom: 1px solid #ccc;
        }

        /* Styles for the keyword slider */
        .keyword-mode {
            margin: 10px 0;
            display: flex;
        }

        .keyword-slider {
            position: relative;
            width: 100%;
            max-width: 75px;
            height: 18px;
            margin: 0px 0 0px 0;
            margin-top: 0;
        }

        .keyword-slider input[type="range"] {
            -webkit-appearance: none;
            width: 100%;
            background: #ddd;
            height: 8px;
            border: 1px solid #ccc;
            border-radius: 5px;
            position: absolute;
            left: 0;
            top: 1px;
            margin: 0;
        }

        .keyword-slider input[type="range"]:focus {
            outline: none;
        }

        .keyword-slider input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 15px;
            height: 15px;
            background: #004225;
            cursor: pointer;
            border-radius: 50%;
        }

        .keyword-slider input[type="range"]::-moz-range-thumb {
            width: 15px;
            height: 15px;
            background: #004225;
            cursor: pointer;
            border-radius: 50%;
        }

        .keyword-slider .labels {
            display: flex;
            justify-content: space-between;
            position: absolute;
            top: 15px;
            left: 0;
            right: 0;
        }

        .keyword-slider .labels span {
            font-size: 16px;
        }

        /* Center content */
        .content {
            flex: 1;
            box-sizing: border-box;
            margin-right: 20px;
        }

        /* Right 15% Advertising Space */
        .advertising-space {
            position: fixed;
            top: 0; /* Adjusted to start a little higher */
            right: 0;
            width: 15%;
            padding: 20px;
            text-align: center;
            background-color: #f0f0f0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 30px; /* Adjusted gap between ads */
            height: calc(100%); /* Adjusted height accordingly */
            overflow-y: auto;
            box-sizing: border-box;
        }

        /* Removed unnecessary margin-top */

        /* Ad Container Styles */
        .ad-container {
            width: 95%;
            aspect-ratio: 1 / 1; /* Maintains a square shape */
            /* height: 125px;  Adjust the height as needed */
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background-color: #f0f0f0; /* Optional: to ensure consistent background */
            border: 1px solid #ccc;  /* Optional: to outline the container */
        }

        .ad-container img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        /* Ads Title Image Styles */
        .ads-title {
            width: 85%; /* Maintain existing width */
            margin-top: 70px; /* Adjust this value to push the image lower */
        }

        .controls-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 20px 0;
            /* padding: 0 20px; */
            /* flex-wrap: wrap; */
        }
        
        .sort-dropdown {
            margin-left: auto;
            margin-right: 20px;
            font-family: Garamond;  
        }

        #itemCount {
            text-align: left;
            flex-grow: 0;
            margin-left: 20px; /* Adjust as needed to align with pagination */
        }

        /* Style for Reset All button */
        .reset-all-button {
            padding: 10px 20px;
            background-color: #004225;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin-left: 20px;
        }
        
        /* Style for Low Value button */
        .lowvalue-button {
            padding: 10px 20px;
            background-color: #004225;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin-left: 20px;
        }
        
        .search-bar {
            display: flex;
            align-items: center;
            width: 60%;
            margin: 0 auto;
            /* margin-bottom: 10px; /* Add spacing between search bar and count/sort */
        }

        .search-bar input[type="text"] {
            padding: 10px;
            width: 100%;
            border: 1px solid #ccc;
            border-radius: 5px 0 0 5px;
        }

        .search-bar button {
            padding: 10px 10px;
            background-color: #004225;
            color: white;
            border: none;
            border-radius: 0 5px 5px 0;
            cursor: pointer;
        }

        .item-count-sort-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 95%;
            padding: 5px 10px;
            font-family: Garamond;              
        }

        /* Dropdown select styling */
        .sort-dropdown select {
            padding: 4px 4px;
            font-size: 15px;
            border: 1px #004225; /* Blue border */
            border-radius: 5px; /* Rounded corners */
            background-color: white; /* Light grey background */
            color: #004225; /* Text color */
            cursor: pointer;
            outline: #004225;
            font-family: Garamond;                
        }


        /* Help Icon Styling */
        .help-icon {
            width: 24px;
            height: 24px;
            margin-right: 10px;
            cursor: pointer;
        }

        /* Modal Styles */
        .help-modal {
            display: none;
            position: fixed;
            z-index: 1001;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.4);
            padding-top: 10px;
        }

        .help-modal-content {
            color: #004225;
            background-color: #fefefe;
            margin: 5% auto;
            padding: 20px;
            padding-top: 10px;
            border: 1px solid #888;
            width: 80%;
            max-width: 500px;
            position: relative;
        }

        .help-modal-content a {
            color: #004225;
            text-decoration: none;
        }

        .help-modal-close {
            color: #aaa;
            font-size: 28px;
            font-weight: bold;
            position: absolute;
            top: 10px;
            right: 20px;
            cursor: pointer;
        }

        .help-modal-close:hover,
        .help-modal-close:focus {
            color: black;
            text-decoration: none;
            cursor: pointer;
        }

        /* Back to Top Button Styles */
        #backToTopBtn {
            display: none;
            position: fixed;
            bottom: 40px;
            right: 15%;
            z-index: 99;
            border: none;
            outline: none;
            background-color: lightgray;
            color: white;
            cursor: pointer;
            padding: 15px;
            border-radius: 0%;
            font-size: 18px;
            transition: background-color 0.3s;
        }
        
        /* Hover effect */
        #backToTopBtn:hover {
            background-color: lightgray;
        }

        /* Hide filter-button on desktop */
        @media (min-width: 747px) {
            .filter-button {
                display: none;
            }
        }

        /* Hide close-filter on desktop */
        .close-filter {
            display: none;
        }

        @media (max-width: 746px) {
            .content {
                width: 100%;
                padding: 0 0%;
            }

            .item-list {
                width: 90%;
                grid-template-columns: repeat(1, 1fr) !important;
                justify-content: center;
                align-items: center;
                padding-left: 10px;
                padding-right: 10px;
            }

            .item {
                margin-left: 10px;
                box-sizing: border-box;
                width: 100% !important;
                justify-content: center;
                align-items: center;
            }
            
            header {
                flex-direction: column;
                align-items: flex-start;
                margin-right: 0;
                padding: 10px;
            }
            
            header h1 a {
                color: white;
                text-decoration: none;
                font-size: 24px;
                margin-left: 0px;             
            }
            
            .header-logo {
            height: 30px; /* Adjust the height as needed */
            margin-right: 15px;
            border-radius: 50%; /* This makes the image circular */
            object-fit: cover; /* Ensures the image fits well within the circle */    
            }

            .header-nav {
                margin-top: 10px;
            }

            .header-nav a {
                margin-left: 0;
                margin-right: 15px;
            }

            footer {
                flex-direction: column;
                align-items: flex-start;
                margin-right: 0;
                font-size: 16px;
            }

            .footer-nav {
                margin-top: 1px;
                font-size: 16px;
            }

            main {
                flex-direction: column;
                align-items: center;
                margin-right: 0;
            }
            
            .filter-menu {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                overflow-y: auto;
                background-color: rgba(0, 0, 0, 0.5);
                z-index: 1000;
                padding: 20px;
                box-sizing: border-box;
            }

            .filter-menu.show {
                display: block;
            }

            .filter-menu .filter-content {
                background-color: #fff;
                padding: 15px;
                border-radius: 5px;
                max-width: 500px;
                margin: 50px auto;
                position: relative;
            }

            .advertising-space {
                display: none;
            }

            #backToTopBtn {
                bottom: 20px;
                right: 10px;
                padding: 15px;
                font-size: 16px;
            }

            .controls-container {
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: center;
                gap: 10px;
            }

            .reset-all-button {
                display: none;
            }
            
            .lowvalue-button {
                display: none;
            }
            
            .search-bar {
                width: 70%;
                max-width: 300px;
            }

            .search-bar input[type="text"] {
                font-family: garamond;
                width: 70%;
                max-width: 200px;
                margin-right: 0px;
            }

            .search-bar button {
                font-family: garamond;
                padding: 10px;
                max-width: 50px;
            }

            .filter-button {
                display: block;
                margin-right: 0;
                background-color: white;
            }

            /* Show close-filter on mobile */
            .close-filter {
                display: block;
            }
        }

        .item-list {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            min-height: 500px;
        }

        .item {
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 5px;
            padding: 5px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            text-align: center;
            box-sizing: border-box;
            flex-grow: 0;
            flex-shrink: 0;
            width: 100%;
            max-width: 100%;
            min-width: 0;
        }

        .image-container {
            max-width: 100%;
            width: 100%;
            height: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 5px;
            background-color: white;
        }

        .image-container img {
            max-width: 100% !important;
            max-height: 250px !important;
            width: auto;
            height: 250px;
            object-fit: contain !important;
            display: block;
            margin: 0 auto;
        }

        .name-container {
            word-wrap: break-word;
            padding: 5px 0;
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 10px;
        }

        .name-container a {
            color: #004225;
            text-decoration: none;
            font-size: 16px;
            font-weight: bold;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .name-container a:hover {
            text-decoration: none;
        }

        .item.empty {
            visibility: hidden;
        }

        .item p {
            font-size: 14px;
            color: #555;
            text-align: center;
            margin-bottom: 5px;
        }

        .description-link a {
            display: block;
            word-wrap: break-word;
            word-break: break-word;
            text-overflow: ellipsis;
            overflow: hidden;
            max-width: 100%;
            box-sizing: border-box;
            color: #555;
            text-decoration: none;
        }

        .price-link a:hover {
            text-decoration: none;
        }

        .price-link a {
            color: #555;
            text-decoration: none;
        }

        .website-link {
            margin-top: 5px;
            font-size: 14px;
            color: #004225;
            text-decoration: none;
        }

        .website-link a {
            color: #004225;
            text-decoration: none;
            font-weight: normal;
        }

        .website-link a:hover {
            text-decoration: underline;
        }

        .pagination {
            display: flex;
            justify-content: center;
            margin-top: 20px;
        }

        /* Add margin to the top pagination */
        #paginationTop {
            margin-top: 0px;
            margin-bottom: 20px;
        }

        .pagination button {
            padding: 10px 15px;
            margin: 0 5px;
            background-color: #004225;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        .pagination button:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }

        .pagination button:hover:not(:disabled) {
            background-color: #006837;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1001;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.4);
            padding-top: 10px;
        }

        .modal-content {
            background-color: #fefefe;
            margin: 5% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 80%;
            max-width: 800px;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        /* Updated modal-image-container */
        .modal-image-container {
            height: 400px; /* Fixed height */
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 15px;
            background-color: #fefefe;
        }

        .modal-image-container img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
        }

        .modal-thumbnails {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 15px;
        }

        .modal-thumbnails img {
            width: 80px;
            height: 80px;
            padding: 10px;
            margin-right: 10px;
            object-fit: cover;
            cursor: pointer;
        }

        .modal-info-container {
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        
        .modal-info-container h3,
        .modal-info-container p,
        .modal-info-container a {
            margin-bottom: 15px;
        }

        .modal-info-container a {
            text-decoration: underline;
            color: #408049;
            font-weight: bold;
        }

        .modal-info-container a:hover {
            text-decoration: none;
            color: #408049;
        }

        .close,
        .close-filter {
            color: #aaa;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            position: absolute;
            top: 10px;
            right: 20px;
        }

        .close:hover,
        .close:focus,
        .close-filter:hover,
        .close-filter:focus {
            color: black;
            text-decoration: none;
        }

        .modal-retailer-image {
            text-align: center;
            margin-top: 15px;
        }

        .modal-retailer-image img {
            max-width: 100px;
            height: auto;
        }

        .filter-content {
            position: relative;
        }

#loadingIndicator {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    color: #004225;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    border: 4px solid rgba(0, 66, 37, 0.2);
    border-top: 4px solid #004225;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
