/* =========================
   ШАПКА (компактная, одна строка)
========================= */
.site-header {
    background: var(--panel);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 24px;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 9px 0;
}

/* ЛОГО */
.logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.logo-img {
    width: 132px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* КНОПКА КАТАЛОГА */
.catalog-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.catalog-btn:hover {
    background: var(--accent-hover);
}

.catalog-dots {
    display: grid;
    grid-template-columns: repeat(3, 4px);
    gap: 3px;
    flex: 0 0 auto;
}

.catalog-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    display: block;
}

/* ПОИСК */
.search-box {
    flex: 1 1 280px;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 46px;
    background: var(--input);
    border: 2px solid var(--accent);
    border-radius: 12px;
    overflow: hidden;
}

.search-icon {
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: none;
}

body.theme-dark .search-dark {
    display: block;
}

body.theme-light .search-light {
    display: block;
}

.search-box input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    padding: 0 12px 0 2px;
}

.search-box input::placeholder {
    color: #7c8b93;
}

.search-btn {
    flex: 0 0 auto;
    height: 100%;
    padding: 0 22px;
    border: none;
    background: var(--accent);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: var(--accent-hover);
}

/* КНОПКА ПУБЛИКАЦИИ */
.publish-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: 0.2s ease;
}

.publish-btn:hover {
    background: var(--panel);
    color: var(--accent);
}

.publish-btn-plus {
    font-size: 20px;
    line-height: 1;
}

/* ВКЛАДКИ (Мои объявления / Новости) */
.header-tabs {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

/* ДЕЙСТВИЯ СПРАВА */
.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.city-link {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
}

.header-link {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.header-link:hover {
    color: var(--accent);
}

.login-link {
    font-weight: 700;
    color: var(--accent);
}

.logout-form {
    margin: 0;
    padding: 0;
    display: flex;
}

.logout-btn {
    padding: 0;
    font-family: inherit;
}

/* ИКОНКИ */
.icon-btn {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-img {
    width: 23px;
    height: 23px;
    object-fit: contain;
    display: none;
}

body.theme-dark .icon-dark {
    display: block;
}

body.theme-light .icon-light {
    display: block;
}
