/* --- Top Bar Layout --- */

.top-bar {
    margin: 20px 0;
    padding: 10px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border-radius: 10px;
    background: #fff;
}

.top-bar-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Lewa kolumna */
.top-bar-left {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-bar-categories,
.top-bar-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Prawa kolumna: wyszukiwarka */
.top-bar-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.top-bar-search-form {
    display: flex;
    align-items: center;
    max-width: 300px;
    width: 100%;
}

.top-bar-search-input {
    padding: 8px 12px;
    border-radius: 20px 0 0 20px;
    border: 1px solid #ccc;
    outline: none;
}

.top-bar-search-button {
    background: #3949ab;
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

/* --- Kategoria style --- */
.top-bar-category {
    background: #3949ab;
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.top-bar-category:hover {
    background: #5c6bc0;
}

.top-bar-subcategory {
    background: #c5cae9;
    color: #1a237e;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.top-bar-subcategory:hover {
    background: #9fa8da;
}

/* --- Responsywność --- */
@media (max-width: 768px) {
    .top-bar-columns {
        flex-direction: column;
        align-items: stretch;
    }

    .top-bar-right {
        justify-content: center;
        margin-top: 15px;
    }

    .top-bar-categories,
    .top-bar-subcategories {
        justify-content: center;
    }
}
