/* Header Search Bar Styling */
.header-search-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
    position: relative;
}

.header-search-container .search-form {
    position: relative;
    width: 140px; /* Adjust based on header space */
}

.header-search-container .search-field {
    width: 100%;
    padding: 8px 40px 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.3s ease;
}

.header-search-container .search-field:focus {
    border-color: #1bb4d3; /* Main theme color from stk_theme_css_root_set */
}

.header-search-container .search-submit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.3s ease;
}

.header-search-container .search-submit:hover {
    color: #1bb4d3;
}

.header-search-container .search-submit svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mobile Search Bar Styling (Image 2 style) */
.mobile-search-bar {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.mobile-search-bar.is-active {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

.mobile-search-bar .search-form {
    position: relative;
    max-width: 100%;
}

.mobile-search-bar .search-field {
    width: 100%;
    padding: 10px 45px 10px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background-color: #fff;
    font-size: 16px;
    outline: none;
}

.mobile-search-bar .search-submit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
}

.mobile-search-bar .search-submit svg {
    width: 20px;
    height: 20px;
}

/* Mobile Toggle Styling (Image 1 style) */
@media only screen and (max-width: 980px) {
    .header-search-container.stk-hidden_sp {
        display: none !important;
    }

    .mobile-search-toggle {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 5px 10px;
        min-width: 50px;
    }

    .mobile-search-toggle .text {
        font-size: 10px;
        color: #e54c84; /* Theme blue */
        margin-top: 2px;
        font-weight: bold;
    }

    .mobile-search-toggle svg {
        width: 24px;
        height: 24px;
        fill: #666;
    }
}

/* Force Mobile Menu at 844px */
@media only screen and (max-width: 844px) {
    /* Hide ALL Desktop elements and the navigation list in the header */
    .stk-hidden_sp,
    .pc_only,
    .stk_header .inner-header .stk_g_nav,
    .stk_header .inner-header .ul__g_nav {
        display: none !important;
    }

    /* Show Burger Menu and Mobile Toggle */
    .stk_header .menu_btn,
    .stk_header .mobile-search-toggle,
    .sp_only {
        display: flex !important;
    }

    /* Adjust layout for early mobile switch */
    .stk_header .inner-header {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 10px !important;
    }
}

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