
.search-bar {
    position: relative;
}

.search-dropdown {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    gap: 18px;
    position: absolute;
    width: 601px;
    min-height: 200px;
    max-height: 476px;
    left: 0;
    top: 100%;
    background: #FFFFFF;
    border-radius: 0px 0px 8px 8px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    overflow-y: auto;
}

.search-dropdown.show {
    display: flex;
}


.search-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 16px;
    width: 100%;
}

.search-section-title {
    width: 100%;
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 160%;
    color: #3F425A;
    margin: 0;
}


.search-section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 8px;
    width: 100%;
}

.search-divider {
    flex: 1;
    height: 0px;
    border: 1px solid #C3C5D5;
    margin: 0;
}


.search-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    width: 100%;
}


.search-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0px;
    width: 100%;
    background: #FFFFFF;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-item:hover {
    background: #F8F9FB;
}

.search-item-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 8px;
    flex: 1;
}

.search-item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.search-item-icon svg {
    width: 16px;
    height: 16px;
}

.search-item-text {
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 160%;
    text-transform: capitalize;
    color: #3F425A;
    flex: 1;
}

.search-item-text.popular {
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #696F96;
}


.search-item-remove {
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #878CAB;
    transition: color 0.2s ease;
}

.search-item-remove:hover {
    color: #CF6363;
}

.search-item-remove svg {
    width: 20px;
    height: 20px;
}


.recently-viewed-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
    gap: 12px;
    width: 100%;
    margin-bottom: 12px;
}

.recently-viewed-title {
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 18px;
    line-height: 150%;
    color: #3F425A;
    margin: 0;
}

.clear-all-btn {
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #CF6363;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
}

.clear-all-btn:hover {
    opacity: 0.8;
    text-decoration: underline;
}


.recently-viewed-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
}

.recently-viewed-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    min-width: 183px;
    max-width: 183px;
    height: 173px;
    background: #FFFFFF;
    border: 1px solid #E1E2EA;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.recently-viewed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.recently-viewed-image {
    width: 183px;
    height: 121px;
    object-fit: cover;
    background: #E1E2EA;
}

.recently-viewed-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    gap: 4px;
    width: 183px;
    height: 52px;
}

.recently-viewed-name {
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #3F425A;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.recently-viewed-price {
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    color: #3F425A;
    margin: 0;
}


.search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #F8F9FB;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #C3C5D5;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #878CAB;
}

.recently-viewed-grid::-webkit-scrollbar {
    height: 6px;
}

.recently-viewed-grid::-webkit-scrollbar-track {
    background: #F8F9FB;
    border-radius: 3px;
}

.recently-viewed-grid::-webkit-scrollbar-thumb {
    background: #C3C5D5;
    border-radius: 3px;
}

.recently-viewed-grid::-webkit-scrollbar-thumb:hover {
    background: #878CAB;
}


.search-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    text-align: center;
    color: #696F96;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
}


@media (max-width: 768px) {
    .search-dropdown {
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 0;
    }
    
    .recently-viewed-grid {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
}