/* Desktop Search Functionality Fix */

@media (min-width: 1200px) {
    /* Search Toggle Button - Visible and functional */
    .enhanced-header .search-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 45px !important;
        height: 45px !important;
        border-radius: 8px !important;
        background: rgba(255, 107, 53, 0.1) !important;
        color: #D4AF37 !important;
        border: 2px solid transparent !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    .enhanced-header .search-toggle:hover {
        background: #D4AF37 !important;
        color: white !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3) !important;
        border-color: #D4AF37 !important;
    }
    
    .enhanced-header .search-toggle i {
        font-size: 1.2rem !important;
    }
    
    /* Search Bar Container - Fixed positioning */
    .search-bar {
        position: fixed !important;
        top: 112px !important; /* Below header (32px + 80px) */
        left: 0 !important;
        right: 0 !important;
        background: #ffffff !important;
        border-bottom: 3px solid #D4AF37 !important;
        padding: 1.5rem 0 !important;
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 998 !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    /* Active Search Bar */
    .search-bar.active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Search Container */
    .search-bar .container {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 2rem !important;
    }
    
    .search-bar .search-container {
        max-width: 800px !important;
        margin: 0 auto !important;
        position: relative !important;
    }
    
    /* Search Form */
    .search-bar .search-form {
        width: 100% !important;
        position: relative !important;
    }
    
    /* Search Input Group */
    .search-bar .search-input-group {
        position: relative !important;
        background: #f8f9fa !important;
        border-radius: 50px !important;
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.15) !important;
        overflow: hidden !important;
        border: 3px solid transparent !important;
        transition: all 0.3s ease !important;
    }
    
    .search-bar .search-input-group:focus-within {
        border-color: #D4AF37 !important;
        box-shadow: 0 6px 30px rgba(255, 107, 53, 0.25) !important;
        background: #ffffff !important;
    }
    
    /* Search Input */
    .search-bar .search-input {
        width: 100% !important;
        border: none !important;
        padding: 18px 70px 18px 25px !important;
        font-size: 1.1rem !important;
        outline: none !important;
        background: transparent !important;
        color: #333 !important;
        font-weight: 500 !important;
        line-height: 1.4 !important;
    }
    
    .search-bar .search-input::placeholder {
        color: #666 !important;
        font-weight: 400 !important;
    }
    
    /* Search Submit Button */
    .search-bar .search-submit {
        position: absolute !important;
        right: 8px !important;
        top: 8px !important;
        bottom: 8px !important;
        background: linear-gradient(135deg, #D4AF37, #D4AF37) !important;
        border: none !important;
        border-radius: 50px !important;
        color: white !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 50px !important;
        font-size: 1.1rem !important;
        box-shadow: 0 3px 15px rgba(255, 107, 53, 0.3) !important;
    }
    
    .search-bar .search-submit:hover {
        background: linear-gradient(135deg, #D4AF37, #D4AF37) !important;
        transform: scale(1.05) !important;
        box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4) !important;
    }
    
    .search-bar .search-submit:active {
        transform: scale(0.98) !important;
    }
    
    /* Search Close Button */
    .search-bar::after {
        content: '✕';
        position: absolute;
        top: 15px;
        right: 25px;
        font-size: 1.5rem;
        color: #999;
        cursor: pointer;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 107, 53, 0.1);
        transition: all 0.3s ease;
        z-index: 10;
    }
    
    .search-bar::after:hover {
        background: #D4AF37;
        color: white;
        transform: scale(1.1);
    }
    
    /* Body Overlay when Search is Active */
    body.search-active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 997;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    body.search-active.search-open::before {
        opacity: 1;
        visibility: visible;
    }
    
    /* Adjust main content when search is open */
    body.search-open .main-content {
        transform: translateY(60px);
        transition: transform 0.4s ease;
    }
    
    /* Search Results Preview (Optional Enhancement) */
    .search-results-preview {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
        max-height: 300px;
        overflow-y: auto;
        z-index: 1000;
        display: none;
    }
    
    .search-results-preview.active {
        display: block;
    }
    
    .search-result-item {
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
        cursor: pointer;
        transition: background 0.2s ease;
    }
    
    .search-result-item:hover {
        background: #f8f9fa;
    }
    
    .search-result-item:last-child {
        border-bottom: none;
    }
}

/* Medium Desktop Screens */
@media (min-width: 992px) and (max-width: 1199px) {
    .search-bar .container {
        max-width: 960px !important;
        padding: 0 1.5rem !important;
    }
    
    .search-bar .search-container {
        max-width: 700px !important;
    }
    
    .search-bar .search-input {
        padding: 16px 60px 16px 20px !important;
        font-size: 1rem !important;
    }
    
    .enhanced-header .search-toggle {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Large Desktop Screens */
@media (min-width: 1400px) {
    .search-bar .container {
        max-width: 1400px !important;
        padding: 0 3rem !important;
    }
    
    .search-bar .search-container {
        max-width: 900px !important;
    }
    
    .search-bar .search-input {
        padding: 20px 80px 20px 30px !important;
        font-size: 1.2rem !important;
    }
    
    .search-bar .search-submit {
        min-width: 60px !important;
        font-size: 1.2rem !important;
    }
}

/* Ultra Wide Screens */
@media (min-width: 1600px) {
    .search-bar .container {
        max-width: 1600px !important;
        padding: 0 4rem !important;
    }
    
    .search-bar .search-container {
        max-width: 1000px !important;
    }
}