/* Improved Header Search and Menu Styles */

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.search-toggle, #menu_button {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    width: 45px;
    height: 45px;
    transition: opacity 0.2s ease;
}

.search-toggle:hover, #menu_button:hover {
    opacity: 0.8;
}

.search-toggle svg {
    margin-bottom: 2px;
}

.search-toggle span, #menu_button span {
    font-size: 11px;
    font-weight: 700;
    color: #FF95B3;
    line-height: 1;
    white-space: nowrap;
}

/* Override existing #menu_button styles */
#menu_button {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    height: 45px !important;
    width: 45px !important;
}

#menu_button > i {
    position: relative !important;
    display: block !important;
    top: auto !important;
    left: auto !important;
    margin: 2px 0 !important;
    background-color: #FF95B3 !important;
    width: 28px !important;
    height: 3px !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
}

#menu_button span {
    margin-top: 4px;
    position: static !important;
    transform: none !important;
}

/* Hamburger open state */
.open_menu #menu_button > i:nth-of-type(1) {
    transform: translateY(5px) rotate(45deg) !important;
}
.open_menu #menu_button > i:nth-of-type(2) {
    opacity: 0 !important;
}
.open_menu #menu_button > i:nth-of-type(3) {
    transform: translateY(-5px) rotate(-45deg) !important;
}

/* Premium Search Box Container */
.header-search-box {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 149, 179, 0.2);
    padding: 20px 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(255, 149, 179, 0.15);
}

.header-search-box.active {
    display: block;
    animation: premiumSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes premiumSlideDown {
    from { 
        transform: translateY(-20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.header-search-box .header_inner {
    padding: 0 20px;
    max-width: 600px;
    margin: 0 auto;
}

.header-search-box .search-form {
    display: flex;
    align-items: center;
    border: 2px solid #FF95B3;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(255, 149, 179, 0.1);
    transition: box-shadow 0.3s ease;
}

.header-search-box .search-form:focus-within {
    box-shadow: 0 6px 20px rgba(255, 149, 179, 0.25);
}

.header-search-box .search-field {
    flex: 1;
    border: none;
    padding: 12px 20px;
    outline: none;
    font-size: 16px;
    color: #333;
    font-family: inherit;
}

.header-search-box .search-submit {
    background: #FF95B3;
    border: none;
    color: #fff;
    padding: 12px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.header-search-box .search-submit:hover {
    background: #ff7ea3;
}

.header-search-box .search-submit svg {
    stroke: #fff;
}

/* Handle Desktop View Adjustments */
@media (min-width: 771px) {
    .header-controls {
        right: 20px;
        gap: 20px;
    }
    
    .search-toggle, #menu_button {
        width: 55px;
        height: 55px;
    }

    .header-search-box .header_inner {
        max-width: 800px;
    }
}
