.custom-search-container {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.custom-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 12px 10px;
    margin-right: 10px;
}

.custom-search-icon {
    flex: 0 0 auto;
    display: inline-block;
    margin-right: 10px;
    margin-left: 8px;
    color: #666;
}

.custom-search-input {
    border: none;
    background: transparent;
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    outline: none;
    color: #333;
}

.custom-clear-search {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    font-size: 23px;
    cursor: pointer;
    color: #aaa;
    margin-left: 5px;
    padding-left: 0px;
}

.custom-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 4px;
    margin-top: 5px;
    z-index: 999999; /* Increased to appear above nav */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 13px; 
}

.custom-search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-search-results .result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    cursor: pointer;
}

.custom-search-results .result-item:hover {
    background: #f0f0f0;
}

.custom-search-results .result-title {
    font-size: 15px;
    color: #333;
    font-weight: normal;
    flex: 1;
}

.custom-search-results .result-title strong {
    font-weight: bold;
    background: none;
}

.custom-search-results .result-price {
    font-size: 15px;
    color: #555;
    white-space: nowrap;
    margin-left: 10px;
}

.custom-search-results .see-all {
    padding: 10px;
    text-align: center;
}

.custom-search-results .see-all a {
    display: inline-block;
    font-size: 13px;
    color: #0073aa;
    text-decoration: none;
}

.custom-search-results .see-all a:hover {
    text-decoration: underline;
}

.custom-search-results .no-results {
    padding: 10px;
    font-size: 13px;
    color: #666;
    text-align: center;
}

input.custom-search-input {
    background-color: unset;
    border: none;
}

div#header-nav-desktop {
    z-index: 9999;
}

/* Spinner shared by both desktop & mobile */
.custom-search-loader {
    flex: 0 0 auto;
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;      
    border-top-color: #333;      
    border-radius: 50%;
    animation: spinner-rotate 1s linear infinite;
}

/* Keyframe for rotation */
@keyframes spinner-rotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@media (max-width: 480px) {
    .custom-search-container {
        max-width: 100%;
    }
    .custom-search-box {
        padding: 0 8px;
    }
    .custom-search-input {
        font-size: 16px;
    }
}
