html {
    font-size: 16px;
}
#search-widget-overlay {
    position: fixed;
    z-index: 1001;
    inset: 0;
    background: #00000080;
    opacity: 0;
    pointer-events: none;
    -webkit-backdrop-filter: blur(0.5rem);
    backdrop-filter: blur(0.5rem);
}
#search-widget-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
#search-widget {
    position: fixed;
    top: 1rem;
    left: 0;
    right: 0;
    bottom: 0;
    width: calc(100dvw - 2rem);
    height: calc(100dvh - 2rem);
    max-height: 100%;
    background: #fff;
    box-shadow: 0 0 1rem #000;
    border-radius: 1rem;
    padding: 1rem 0 0 1rem;
    overflow: auto;
    max-width: 1200px;
    margin: auto;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    overflow: clip;
}
#search-widget.active {
    opacity: 1;
    pointer-events: auto;
}
#search-widget.closing {
    opacity: 0;
    pointer-events: none;
}
@media (max-width: calc(1200px + 2rem)) {
    #search-widget {
        max-width: calc(100vw - 2rem);
    }
}
#search-widget .widget-body {
    display: grid;
    padding: 0;
    margin-bottom: 2rem;
    margin-right: 0.5rem;
    max-height: 100%;
    overflow: auto;
    padding-right: 0.5rem;
}
#search-widget .widget-body::-webkit-scrollbar {
    width: 6px;
    background-color: transparent;
}
#search-widget .widget-body::-webkit-scrollbar-thumb {
    width: 6px;
    background-color: #ddd;
    border-radius: 1rem;
}
#search-widget .widget-body::-webkit-scrollbar-track {
    width: 6px;
    background-color: transparent;
}
#search-widget .search-input-container {
    display: flex;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
    position: sticky;
    top: 0;
    border-radius: 0;
    padding: 1rem 0;
    padding-top: 0;
    z-index: 1;
    background: #fff;
    transition: 0.3s ease-in-out;
    order: 0;
}
#search-widget .search-input-container .search-input {
    flex: 1;
    background: #efefef;
    border: none;
    border-radius: 0.5rem 0 0 0.5rem;
    height: 3rem;
    font-size: 1.25rem;
    padding: 0;
    padding-left: 1rem;
    width: 100%;
}
#search-widget .search-input-container .search-input:focus {
    outline: none;
    background: #ddd;
}
#search-widget .search-input-container .search-close-btn {
    cursor: pointer;
    height: 3rem;
    width: 4rem;
    border: none;
    background: #efefef;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #414141;
    transition: 0.2s ease-in-out;
}
#search-widget .search-input-container .search-close-btn:hover {
    background: #ddd;
}
#search-widget .search-input-container .search-close-btn svg {
    height: 2rem;
    width: 2rem;
}
#search-widget .category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.75rem;
    margin: auto;
    width: fit-content;
    max-width: 1200px;
    padding: 0 0 1rem;
    order: 2;
}
#search-widget .category-filter button {
    padding: 0.5rem 1rem;
    cursor: pointer;
    background: #efefef;
    border: none;
    border-radius: 0.5rem;
    color: #414141;
    font-size: 0.9rem;
}
#search-widget .category-filter button.active {
    background: #414141;
    color: #efefef;
}
#search-widget .category-filter.collapsed {
    max-height: 64px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s;
    padding-right: 53px;
    margin-bottom: 16px;
}
#search-widget .products-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 0.5rem;
    margin: auto;
    max-width: 1200px;
    width: 100%;
    padding: 0;
    padding-bottom: 1rem;
    order: 2;
}
@media (max-width: 310px) {
    #search-widget .products-wrapper {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 640px) {
    #search-widget .products-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    #search-widget .products-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1200px) {
    #search-widget .products-wrapper {
        grid-template-columns: repeat(5, 1fr);
    }
}
#search-widget .products-wrapper .product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    text-decoration: none;
}
#search-widget .products-wrapper .product.out-of-stock img {
    filter: grayscale(1) brightness(0.9);
    opacity: 0.8;
    transition: filter 0.3s, opacity 0.3s;
}
#search-widget .products-wrapper .product img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    object-fit: cover;
    transition: 0.3s ease-in-out;
}
#search-widget .products-wrapper .product .product-title {
    font-size: 1rem;
    font-weight: 300;
    padding-top: 1rem;
    color: #000;
}
#search-widget .products-wrapper .product .product-title span {
    font-weight: 700;
}
#search-widget .products-wrapper .product .product-price {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    font-size: 1rem;
    flex-wrap: wrap;
    color: #000;
}
#search-widget .products-wrapper .product .product-model {
    color: #555;
    font-size: 1.25em;
    padding-top: 0.5rem;
}
#search-widget .products-wrapper .product .product-price .old-price {
    text-decoration: line-through;
    color: #000;
}
#search-widget .products-wrapper .product .product-price .special-price {
    color: #f05252;
    font-weight: 600;
}
#search-widget .pagination {
    margin: auto;
    max-width: 1200px;
    padding: 0 0 1rem;
    order: 3;
}
#search-widget .pagination button {
    width: 100%;
    padding: 1rem 2rem;
    background: #414141;
    border: none;
    border-radius: 0.5rem;
    color: #efefef;
    cursor: pointer;
}
#search-widget .nothing-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2rem;
}
#search-widget .nothing-found .nothing-found-text {
    color: #414141;
    font-weight: 400;
    font-size: 1rem;
    margin-top: 0.5em;
}
#search-widget .top-sellers {
    margin: 0;
    order: 2;
}
#search-widget .top-sellers .top-sellers-heading {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    text-align: left;
    padding: 0;
}
#search-widget .recent-searches {
    margin: auto;
    max-width: 1200px;
    padding: 0;
    padding-bottom: 1rem;
    order: 2;
    width: 100%;
}
#search-widget .recent-searches .recent-searches-heading {
    font-size: 1rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 1rem;
    text-align: left;
}
#search-widget .recent-searches .recent-searches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
#search-widget .recent-searches .recent-searches-list .recent-search-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    background: #efefef;
    border: none;
    border-radius: 0.5rem;
    color: #414141;
    font-size: 1rem;
    transition: background 0.2s ease-in-out;
}
#search-widget .recent-searches .recent-searches-list .recent-search-item:hover {
    background: #ddd;
}
.noscroll {
    overflow: hidden;
    height: 100vh;
}
