/* =============================================
   Search Component — Header Part
   ============================================= */

/* ── Desktop Search Bar ──────────────────── */

.hd3-search-desktop {
    display: none;
    max-width: 300px;
    width: 100%;
    margin-right: 10px;
}

.hd3-search-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: #f4f7f2;
    border: 1.5px solid transparent;
    border-radius: 999px;
    padding: 2px 6px 2px 16px;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.hd3-search-inner:focus-within {
    background: #ffffff;
    border-color: #58734533;
    box-shadow: 0 4px 12px rgba(88, 115, 69, 0.08);
}

.hd3-search-input {
    flex: 1;
    border: none;
    background: transparent;
    height: 36px;
    font-family: var(--semantic-font-body, 'Inter', sans-serif);
    font-size: 0.85rem;
    color: #182013;
    outline: none;
    width: 100%;
    min-width: 0;
}

.hd3-search-input::placeholder {
    color: #8c9688;
    opacity: 0.8;
}

.hd3-search-submit {
    appearance: none;
    border: none;
    background: transparent;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3c4d2d;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hd3-search-submit:hover {
    background: #5873451a;
    color: #182013;
}

.hd3-search-submit svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

/* ── Mobile Toggle Button ────────────────── */

.hd3-search-toggle {
    display: none;
}

/* ── Mobile Search Bar (below header) ─────── */

.hd3-mobile-search-bar {
    display: none;
    overflow: hidden;
    max-height: 0;
    background: #ffffff;
    border-bottom: 1px solid #f0f4ee;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.hd3-mobile-search-bar.active {
    max-height: 80px;
}

.hd3-mobile-search-bar .hd3-search-form {
    padding: 12px 16px;
}

/* ── Responsive ──────────────────────────── */

@media (min-width: 900px) {

    /* Desktop: show inline search, hide mobile pieces */
    .hd3-search-desktop {
        display: block;
    }

    .hd3-search-toggle {
        display: none !important;
    }

    .hd3-mobile-search-bar {
        display: none !important;
    }
}

@media (max-width: 899px) {

    /* Mobile: hide desktop bar, show toggle button and the below-header bar */
    .hd3-search-desktop {
        display: none;
    }

    .hd3-search-toggle {
        display: inline-flex;
    }

    .hd3-mobile-search-bar {
        display: block;
    }
}