*,
html {
    font-size: 14px;
    box-sizing: border-box;
}

body {
    font-family: "Roboto", sans-serif;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    font-size: 1rem;
    color: #222;
    line-height: 1.5;
}

a {
    color: navy;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.wrapper {
    width: 980px;
    margin-left: auto;
    margin-right: auto;
}

b,
.bold {
    font-weight: bold;
}

select {
    border: none;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
}

#topnav {
    padding-top: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 0 2px #eee;
}

#topnav .container {
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
}

#topnav .left {
    display: flex;
    gap: 1rem
}

#mobile-menu {
    padding: 0.5rem;
    display: none;
}

#mobile-menu .burger-icon {
    font-size: 1.8rem;
    cursor: pointer;
}

#mobile-menu .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #eee;
    z-index: 1000;
    overflow: scroll;
}


#mobile-menu .mobile-cats {
    width: 100%;
}

#mobile-menu .mobile-cats .cat {
    width: 100%;
    text-transform: capitalize;
    border-bottom: 1px solid #ccc;
}

#mobile-menu .mobile-cats .cat:last-child {
    border-bottom: none;
}

#mobile-menu .mobile-cats .cat a {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #222;
    padding: 1rem;

}

#mobile-menu .mobile-cats .cat.parent a {
    background-color: blueviolet;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

#mobile-menu .mobile-cats .cat a:hover,
#mobile-menu .mobile-cats .cat a:active,
#mobile-menu .mobile-cats .cat a:focus {
    text-decoration: none;
}

#topnav .logo img {
    height: 44px;
}

#topnav .tagline {
    margin-left: 3.6rem;
    font-size: 0.94rem;
}

#topnav .sites {
    width: 90px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#topnav .sites .icons {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

#topnav .sites .state {
    width: 100%;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

#topnav .cats {
    margin-top: 1.5rem;
    max-width: 100%;
    display: flex;
    gap: 2rem;
    font-size: 1.24rem;
    overflow: scroll;
}

#topnav .cats .cat {
    padding-bottom: 1rem;
    text-transform: capitalize;
}

#topnav .cats .cat .parent {
    display: flex;
    gap: 0.1rem;
    align-items: center;
    font-weight: 500;
}

#topnav .cats .cat svg {
    width: 22px;
    fill: #222;
}

#topnav .cats a,
#topnav .cats a:hover,
#topnav .cats a:visited {
    color: #222;
    text-decoration: none;
}

#topnav .cats .cat .children {
    display: none;
    position: absolute;
    margin-top: 1rem;
    margin-left: -1rem;
    background-color: #eee;
    box-shadow: 0 2px 4px #ccc;
    width: 240px;
    max-height: 500px;
    z-index: 1000;
    overflow: auto;
}

#topnav .cats .cat .children a {
    display: block;
    color: #222;
    padding: 8px 16px;
    text-decoration: none;
    text-align: left;
    white-space: nowrap;
}

#topnav .cats .cat .children a:hover {
    background-color: #d5d5d5;
}

#topnav .cats .cat:hover .children {
    display: block;
}

#dealsbox {
    margin-top: 1rem;
}

#dealsbox .header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: capitalize;
}

#dealsbox .header .timefilter {
    margin-top: 1rem;
    display: flex;
    line-height: 1;
    font-weight: 600;
    align-items: center;
    border-bottom: 1px solid #d5d5d5;
}

#dealsbox .header .timefilter li {
    width: 100%;
}

#dealsbox .header .timefilter li a {
    color: #222;
    display: block;
    padding: 1.25rem 0;
    text-align: center;
    border-bottom: 3px solid transparent;
}

#dealsbox .header .timefilter li.selected a,
#dealsbox .header .timefilter li a:hover {
    background-color: #f5f5f5;
    border-bottom: 3px solid navy;
    text-decoration: none;
}


#dealsbox .header .timefilter li a:hover,
#dealsbox .header .timefilter li a:visited {
    color: #222;
}

#dealsbox .header .note {
    margin-top: 1.5rem;
}

#deals {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    justify-items: center;
    row-gap: 1.5rem;
}

.deal {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 4px;
    width: 180px;
}

.deal a {
    color: #222;
    display: block;
}

.deal .img {
    width: 180px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.deal img {
    max-width: 180px;
    max-height: 200px;
}

.deal a:hover {
    text-decoration: none;
}

.deal a:hover h2 {
    text-decoration: underline;
}

.deal .meta {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.deal .meta .brand {
    white-space: nowrap;
    overflow: hidden;
    font-weight: bold;
}

.deal .meta h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.24rem;
}

.deal .meta .price-change {
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: bold;
    color: #c13832;
}

.deal .meta .price-change svg {
    transform: rotate(180deg);
    width: 10px;
    height: 10px;
    fill: #c13832;
}

.deal .meta .price {
    font-weight: bold;
}

.deal .meta .price .mrp {
    text-decoration: line-through;
}

.deal .low {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    text-align: left;
}

.deal .low .more {
    font-size: 0.8rem;
    cursor: pointer;
    position: relative;
}

.deal .low .more>ul {
    display: none;
    position: absolute;
    width: 200px;
    background-color: #1d1d1d;
    color: #eee;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1rem;
    cursor: default;
}

.deal .low .more>ul li {
    padding: 1rem;
    border-bottom: 1px solid #555;
}

.deal .low .more>ul li:last-child {
    border-bottom: none;
}

#nodeals {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pagination {
    margin: 4rem 0;
    text-align: center;
    font-size: 0.94rem;
    line-height: 1.64rem;
    display: flex;
    gap: 5rem;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

#pagination a {
    display: block;
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    background-color: navy;
}

#pagination a:hover {
    color: white;
    background-color: rgb(55, 55, 192);

}

#pagination .hide {
    visibility: hidden;
}

#dealsbox .apptip {
    display: none;
    font-size: 0.9;
    border: 1px solid #ccc;
    border-left: 4px solid #666;
    padding: 4px;
    border-radius: 4px;
}

#dealsbox .apptip {
    margin-top: 1rem;
}

#footer {
    margin-top: 2rem;
    border-top: 1px solid #d5d5d5;
    padding: 2rem 0;
    text-align: center;
    line-height: 2rem;
}


#notfound_page,
#error_page {
    padding: 1rem;
}

#notfound_page .container,
#error_page .container {
    margin-top: 3rem;
    text-align: center;
    font-weight: 500;
}

#notfound_page .container h1,
#error_page .container h1 {
    font-size: 1.8rem;
    font-weight: 800;
}

#notfound_page .container p,
#error_page .container p {
    margin-top: 1.5rem;
}

@media only screen and (max-width: 860px) {
    .wrapper {
        width: 100%;
        padding: 0 1rem;
    }

    #deals {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 1rem;
    }
}


@media only screen and (max-width: 580px) {
    .wrapper {
        width: 100%;
        padding: 0 .5rem;
    }

    #topnav .container {
        width: 100%;
        gap: 0.5rem;
        align-items: flex-start;
    }

    #deals {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 1rem;
    }

    #dealsbox .header .settings {
        flex-direction: column;
        align-items: flex-start;
    }

    .deal {
        width: 160px;
    }

    .deal .img {
        width: 160px;
        height: 180px;
    }

    .deal img {
        max-width: 160px;
        max-height: 180px;
    }

    #pagination {
        gap: 1rem;
        justify-content: space-between;
    }

    #footer {
        text-align: center;
    }
}

@media only screen and (pointer: coarse) {
    #topnav {
        padding: 0.5rem 0;
    }

    #mobile-menu {
        display: block;
    }

    #topnav .cats {
        display: none;
    }
}