/* scrollbar width */
.sv-select-items::-webkit-scrollbar {
    width: 6px;
}

.sv-search-input {
    height: 40px !important;
}


.sv-select-items::-webkit-scrollbar-track {
    background: transparent;
}

.sv-select-items::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}

.sv-select-items::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

/* For the search results */
.sv-custom-select {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.sv-select-selected {
    padding: 6px 0px;
    border-radius: 8px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    padding-left: 13px;
    padding-right: 70px;
}

.sv-select-selected:hover {
    border-color: #666;
}

.sv-select-items {
    position: absolute;
    top: 114%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 360px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    overflow-y: scroll;
    min-width: 310px;
    overflow-x: hidden;
}

.sv-select-items.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sv-select-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.sv-select-option:last-child {
    border-bottom: none;
}

.sv-select-option:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}

.sv-select-option.selected {
    background-color: #f0f7ff;
    position: relative;
}

.sv-option-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sv-option-text {
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.sv-select-option:hover .sv-option-text {
    color: #1D349A;
}

.sv-option-count {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    transition: all 0.3s ease;
}

.sv-select-option:hover .sv-option-count {
    background: #1D349A;
    color: white;
}

/* Dropdown arrow animation */
.sv-dropdown-arrow {
    transition: transform 0.3s ease;
}

.sv-custom-select.active .sv-dropdown-arrow {
    transform: translateY(-50%) scaleY(-1);
}

.sv-ajax-content .woocommerce-product-rating {
    margin: 0;
    text-align: left;
}

.sv-ajax-content .star-rating {
    display: inline-block;
    font-family: "tp-icons";
    font-size: 14px;
    height: 1em;
    line-height: 1;
    position: relative;
    width: 5.3em;
}

.sv-ajax-content .star-rating:before {
    content: "\e82b\e82b\e82b\e82b\e82b";
    color: #cfc8d8;
    left: 0;
    position: absolute;
    top: 0;
}

.sv-ajax-content .star-rating span {
    position: absolute;
    overflow: hidden;
    top: 0;
    left: 0;
    height: 100%;
}

.sv-ajax-content .star-rating span:before {
    content: "\e821\e821\e821\e821\e821";
    top: 0;
    left: 0;
    position: absolute;
    color: #FFD500;
    /* Or your desired star color */
}

.sv-category-dropdown-wrapper.active .sv-dropdown-arrow {
    transform: translateY(-50%) scaleY(-1);
}

.sv-dropdown-arrow {
    transition: transform 0.13s ease;
}

.sv-category-search-form {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 60px;
}

.sv-search-form-inner {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 5px;
    gap: 8px;
}

.sv-search-form-inner .left-side-search input {
    border-radius: 0;
}

.sv-category-dropdown-wrapper {
    position: relative;
    flex-shrink: 0;
}

.sv-category-select {
    appearance: none;
    background: #ffffff;
    border: 0;
    border-radius: 8px;
    padding: 0;
    font-size: 16px;
    font-weight: 500;
    padding-left: 14px;
    color: #333;
    cursor: pointer;
    min-width: 180px;
    outline: none;
    transition: all 0.3s ease;
    margin: 0;
    height: 36px;
}

.left-side-search {
    width: 100%;
}

.sv-category-select:hover,
.sv-category-select:focus {
    border: none;
}

.sv-dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
}

.sv-search-input-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sv-search-input {
    width: 100%;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 0;
    background: #fff;
    outline: none;
    transition: all 0.3s ease;
    height: 38px;
    box-sizing: border-box;
    border-left: 1px solid #e1e0e0;
}

.sv-search-input::placeholder {
    color: #999;
}

.sv-search-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
    height: 40px;
    box-sizing: border-box;
}

.sv-search-button:active {
    transform: translateY(0);
}

.sv-search-icon {
    display: none;
}

.sv-ajax-search-results {
    position: absolute;
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    margin-top: 2px;
    z-index: 99;
    padding: 30px 32px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.sv-ajax-products {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sv-ajax-products li:first-child {
    padding-top: 0 !important;
}

.sv-ajax-products li:not(:last-child) {
    border-bottom: 1px solid #f1f1f1;
    padding: 16px 0;
}

.sv-ajax-products li:last-child {
    padding-top: 16px;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
}

.sv-ajax-products li a {
    display: flex;
    align-items: center;
    gap: 40px;
    text-decoration: none;
    color: #333;
}

@media (max-width: 767px) {
    .sv-ajax-products li a {
        gap: 12px;
    }

    .sv-ajax-search-results {
        padding: 25px 20px;
    }

    .sv-ajax-content .woocommerce-product-rating {
        margin: 0;
        line-height: 21px;
    }

    .sv-ajax-price .woocommerce-Price-amount {
        font-size: 15px;
    }
}

.sv-ajax-title {
    font-size: 16px;
    margin: 0 0 4px;
}

.sv-ajax-products img {
    width: 75px;
    height: auto;
}

.sv-no-result {
    padding: 12px;
    text-align: center;
    color: #999;
}

.sv-ajax-rating {
    margin-bottom: 4px;
}

.sv-ajax-price {
    font-weight: 600;
    color: #666;
    text-align: left;
    display: flex;
    flex-direction: row-reverse;
    justify-content: start;
    gap: 10px;
}

.sv-ajax-price del {
    color: #777777;
}

.sv-ajax-price ins {
    background: transparent;
    font-weight: 600;
}

.sv-ajax-price .woocommerce-Price-amount {
    color: #6E6E73;
}

.sv-ajax-price ins .woocommerce-Price-amount {
    color: #6E6E73;
}

@media (max-width: 768px) {
    .sv-search-form-inner {
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }

    .sv-category-dropdown-wrapper,
    .sv-search-input-wrapper,
    .sv-search-button {
        width: 100%;
    }

    .sv-category-select {
        width: 100%;
        min-width: auto;
    }

    .sv-search-button {
        justify-content: center;
    }

    .sv-button-text {
        display: none;
    }

    .sv-search-icon {
        display: block;
    }
}

@media (max-width: 480px) {

    .sv-category-select,
    .sv-search-input,
    .sv-search-button {
        padding: 12px 16px;
        font-size: 15px;
    }
}