/* Search Overlay Styles */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    /* Increased from 0.95 to 0.98 for better readability */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding: 120px 24px 60px;
}

.search-close {
    position: absolute;
    top: 40px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #1A1A1A;
    border-radius: 50%;
    transition: all 300ms ease;
}

.search-close:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00D4FF;
    transform: rotate(90deg);
}

.search-box {
    position: relative;
    margin-bottom: 32px;
}

.search-box .search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: rgba(26, 26, 26, 0.4);
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 20px 24px 20px 64px;
    font-size: 1.25rem;
    font-family: 'Cairo', sans-serif;
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    /* Slightly more opaque */
    color: #1A1A1A;
    outline: none;
    transition: all 300ms ease;
}

#search-input:focus {
    border-color: #00D4FF;
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

#search-input::placeholder {
    color: rgba(26, 26, 26, 0.4);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.9);
    /* Added background to results container */
    border-radius: 12px;
    padding: 8px;
}

.search-hint {
    text-align: center;
    color: rgba(26, 26, 26, 0.5);
    font-size: 1rem;
    padding: 40px 20px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #1A1A1A;
    background: rgba(255, 255, 255, 0.8);
    /* Added semi-opaque background */
    margin-bottom: 8px;
    transition: all 200ms ease;
}

.search-result-item:hover {
    background: rgba(0, 212, 255, 0.15);
    /* More visible hover state */
    transform: translateX(8px);
}

.search-result-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #F8FAFB;
}

.search-result-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1A1A1A;
    /* Ensure dark text */
}

.search-result-item p {
    font-size: 0.85rem;
    color: rgba(26, 26, 26, 0.7);
    /* Slightly darker for better readability */
    margin: 0;
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: rgba(26, 26, 26, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .search-overlay-content {
        padding: 80px 16px 40px;
    }

    #search-input {
        font-size: 1rem;
        padding: 16px 16px 16px 48px;
    }

    .search-box .search-icon {
        left: 16px;
        width: 20px;
        height: 20px;
    }

    .search-close {
        top: 20px;
        right: 16px;
    }
}