/* =========================================================
   PESQUISA DO CABEÇALHO
========================================================= */

.header-search-form {
    display: flex;
    align-items: center;
    flex: 0 1 310px;
    min-width: 240px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.header-search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.header-search-form input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: none;
    outline: none;
    color: var(--text);
    background: transparent;
    font-size: 13px;
}

.header-search-form input::placeholder {
    color: #9ca3af;
}

.header-search-form button {
    height: 42px;
    padding: 0 16px;
    border: none;
    cursor: pointer;
    color: #ffffff;
    background: var(--primary);
    font-size: 12px;
    font-weight: 800;
    transition: background 0.2s ease;
}

.header-search-form button:hover {
    background: var(--primary-dark);
}

.nav-search-link {
    display: none;
}

.screen-reader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    margin: -1px;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .header-content {
        gap: 18px;
    }

    .main-nav {
        gap: 14px;
    }

    .header-search-form {
        flex-basis: 250px;
        min-width: 210px;
    }
}

@media (max-width: 900px) {
    .header-content {
        padding: 14px 0;
        flex-wrap: wrap;
    }

    .brand {
        order: 1;
    }

    .main-nav {
        order: 2;
        margin-left: auto;
    }

    .header-search-form {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
    }

    .header-search-form input {
        height: 46px;
    }

    .header-search-form button {
        height: 46px;
        padding: 0 22px;
    }
}

@media (max-width: 720px) {
    .header-content {
        align-items: stretch;
    }

    .brand {
        align-self: center;
    }

    .main-nav {
        justify-content: center;
        margin-left: 0;
    }

    .nav-search-link {
        display: inline-flex;
    }

    .header-search-form {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .header-search-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .header-search-form input {
        padding: 0 12px;
        font-size: 12px;
    }

    .header-search-form button {
        padding: 0 14px;
    }
}