.header {
    border-bottom: 1px solid #eee;
    background: #fff;
}

.header-container {
    max-width: 1200px;
    margin: auto;
    padding: 15px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-toggle,
.site-category-toggle {
    display: none;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.logo img {
    height: 42px;
}

/* NAV */

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.nav a:hover {
    color: #000;
}

/* RIGHT SIDE */

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.header-right a {
    text-decoration: none;
    color: #333;
}

.header-right a:hover {
    color: #000;
}

.phone {
    font-weight: 600;
}

/* CART */

.cart {
    position: relative;
    transition: transform 0.25s ease;
}

.cart-count {
    margin-left: 6px;
    font-size: 12px;
    background: #000;
    color: #fff;
    border-radius: 20px;
    padding: 2px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.cart.is-bouncing {
    transform: scale(1.03);
}

.cart-count.is-updated {
    background: #0f766e;
    transform: scale(1.12);
}

.cart-feedback-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, 14px);
    background: rgba(17, 24, 39, 0.96);
    color: #fff;
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 10000;
}

.cart-feedback-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ================= CATEGORY BAR (НЕ ЧІПАВ) ================= */

.category-bar {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    padding: 15px 0;
    border-bottom: 1px solid #e4e4e4;
}

.category-bar ul {
    list-style: none;
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0;
}

.category-bar a {
    text-decoration: none;
    color: #000;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.category-bar a:hover {
    color: #555;
}

@media (max-width: 900px) {
    .header-container {
        align-items: flex-start;
        gap: 16px;
        flex-wrap: wrap;
    }

    .header-left,
    .header-right {
        width: 100%;
    }

    .header-left {
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
    }

    .header-right {
        gap: 12px;
        flex-wrap: wrap;
    }

    .nav {
        gap: 14px;
        flex-wrap: wrap;
    }

    .category-bar {
        width: min(95%, 1200px);
    }

    .category-bar ul {
        gap: 14px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .header-container {
        padding: 12px 16px;
    }

    .logo img {
        height: 36px;
    }

    .header-toggle,
    .site-category-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav,
    .category-bar ul {
        display: none;
        width: 100%;
    }

    .nav.is-open,
    .category-bar ul.is-open {
        display: flex;
        flex-direction: column;
    }

    .nav {
        padding-top: 8px;
    }

    .nav a {
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .header-right {
        flex-direction: column;
        align-items: flex-start;
        font-size: 13px;
    }

    .header-right a,
    .phone {
        width: 100%;
    }

    .cart {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .category-bar {
        width: calc(100% - 16px);
        padding: 10px 0;
    }

    .nav-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .category-bar ul {
        gap: 0;
    }

    .category-bar li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .category-bar a {
        display: block;
        padding: 10px 0;
        font-size: 13px;
    }

    .cart-feedback-toast {
        width: calc(100% - 24px);
        max-width: 360px;
        border-radius: 16px;
        text-align: center;
        font-size: 13px;
    }
}
