/* Wrap the entire mobile search styles in one place */

/* Wrapper that holds the trigger button and the overlay */
.mobile-search-wrapper {
    position: relative;
    display: inline-block; 
}

/* Magnifying glass trigger button (visible outside the overlay) */
.mobile-search-trigger {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
}

/* Fullscreen overlay container */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0); /* transparent by default */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    z-index: 999999; /* Ensure it's on top */
    display: block;
}

/* Activated state (overlay visible) */
.mobile-search-overlay.is-active {
    background: rgba(255,255,255, 1);
    opacity: 1;
    pointer-events: auto;
}

/* Inner container (centered area) */
.mobile-search-overlay-inner {
    position: relative;
    width: 95%;
}

/* 
   A single horizontal row that holds:
   - Left arrow (close)
   - Magnifier icon
   - Text input
   - Clear (x) button
*/
.mobile-search-header {
    display: flex;
    align-items: center;
    border-radius: 50px;
    padding: 10px 10px;
    margin-bottom: 10px;   
}

/* The back arrow (close) button, inline with the rest of the header */
.mobile-search-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    outline: none;
    margin-right: 10px; /* spacing between arrow & magnifier */
    display: flex;
    align-items: center;
}

/* Magnifier icon inside the header row */
.custom-search-icon {
    margin-right: 8px;
    display: inline-flex; 
    flex-shrink: 0;
}

/* The search input in the header; grows to fill leftover space */
.mobile-search-header .custom-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    color: #333;
}

/* The clear (x) button */
.mobile-search-header .custom-clear-search {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #aaa;
    margin-left: 10px;
}

/* ------------------------ */
/* SEARCH RESULTS STYLES    */
/* (Similar to desktop)     */
/* ------------------------ */

.custom-search-results {
    position: relative;  /* So it stays below the header row */
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 13px;
    z-index: 999999;
    display: none; /* hidden by default; revealed via JS */
}

.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;
    text-wrap: auto;
}

.custom-search-results .result-item:hover {
    background: #f0f0f0;
}

.custom-search-results .result-title {
    font-size: 13px;
    color: #333;
    font-weight: normal;
    flex: 1;
}

.custom-search-results .result-title strong {
    font-weight: bold;
}

.custom-search-results .result-price {
    font-size: 13px;
    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;
}

/* ------------------------ */
/* RESPONSIVE BREAKPOINT    */
/* ------------------------ */
@media (max-width: 980px) {
    .mobile-search-header .custom-search-input {
        font-size: 18px !important;
    }
}

