/* ОБЩЕЕ */
html, body {
    overflow-x: hidden;
}

.bw-header,
.bw-header * {
    font-family: 'Noto Sans Armenian', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.4;
    font-weight: 500;
    box-sizing: border-box;
}

.bw-header {
    background:#fff;
}

.bw-container {
    max-width:1280px;
    margin:0 auto;
    padding:0 16px;
}

.bw-header ul {
    margin:0;
    padding:0;
    list-style:none;
}

/* =========================
   TOP HEADER
   ========================= */
.bw-top-header {
    /* цвет фона и текста теперь ставится inline из PHP */
    border-bottom:1px solid rgba(0,0,0,0.05);
    font-size:13px;
}

.bw-top-header__inner {
    display:flex;
    justify-content:flex-end;
    align-items:center;
    padding:6px 0;
    flex-wrap:wrap;
    row-gap:6px;
}

.bw-top-header__contact {
    display:flex;
    align-items:center;
    gap:24px;
    flex-wrap:wrap;
}

.bw-top-header__item {
    display:flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    line-height:1.4;
    font-weight:500;
    text-decoration:none;
}
.bw-top-header__item a {
    text-decoration:none;
}
.bw-top-header__icon svg {
    display:block;
}
.bw-top-header__text {
    white-space:nowrap;
    font-size:13px;
    font-weight:500;
}

/* пузырёк в топе */
.bw-top-header__cartbubble .bw-bubble {
    display:inline-block;
    min-width:18px;
    height:18px;
    padding:0 4px;
    background:#ff0000;
    color:#fff;
    font-size:12px;
    font-weight:600;
    border-radius:999px;
    line-height:18px;
    text-align:center;
}

/* =========================
   MIDDLE HEADER (лого / поиск / иконки справа)
   ========================= */
.bw-middle-header {
    /* фон/цвет/бордер теперь ставятся inline из PHP */
}

.bw-middle-header__inner {
    display:grid;
    grid-template-columns:auto 1fr auto;
    column-gap:24px;
    row-gap:12px;
    align-items:flex-start;
    padding:16px 0;
}

/* ЛОГО */
.bw-middle-header__logo .bw-logo-link {
    display:inline-flex;
    align-items:flex-start;
    text-decoration:none;
}
.bw-logo-img {
    max-height:60px;
    width:auto;
    display:block;
}

/* ПОИСК */
.bw-middle-header__search {
    min-width:240px;
    width:100%;
    display:flex;
    align-items:flex-start;
    justify-content:center;
}
.bw-search-form {
    display:flex;
    align-items:stretch;
    width:100%;
    max-width:600px;
    border-radius:4px;
    overflow:hidden;
    background:#fff;
}
.bw-search-input {
    flex:1;
    border:0;
    padding:10px 12px;
    font-size:15px;
    font-weight:400;
    line-height:1.4;
    outline:none;
    color:#000;
    background:#fff;
}
.bw-search-input::placeholder {
    color:#6b6b6b;
    font-weight:400;
}
.bw-search-btn {
    font-weight:600;
    font-size:15px;
    padding:0 16px;
    border:0;
    cursor:pointer;
    white-space:nowrap;
    line-height:1.2;
}
.bw-search-btn:hover {
    filter:brightness(1.1);
}

/* ПРАВЫЕ ИКОНКИ */
.bw-middle-header__icons {
    display:flex;
    flex-wrap:nowrap;
    align-items:flex-start;
    justify-content:flex-end;
    column-gap:20px;
    min-width:220px;
    text-align:center;
}

.bw-icon-link {
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-decoration:none;
    cursor:pointer;
    text-align:center;
    transition:color .15s;
    white-space:nowrap;
}
.bw-icon-svg {
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:4px;
}
.bw-icon-svg svg {
    display:block;
}
.bw-icon-text {
    font-size:13px;
    font-weight:500;
    line-height:1.2;
}

.bw-cart-wrapper { position:relative; }
.bw-cart-count {
    position:absolute;
    top:-6px;
    right:-10px;
    background:#ff0000;
    color:#fff;
    min-width:18px;
    height:18px;
    border-radius:999px;
    font-size:11px;
    line-height:18px;
    text-align:center;
    font-weight:600;
    padding:0 4px;
}

/* мини-корзина dropdown */
.bw-mini-cart-dropdown {
    display:none;
    position:absolute;
    right:0;
    top:100%;
    width:300px;
    background:#fff;
    border:1px solid rgba(0,0,0,0.1);
    box-shadow:0 16px 32px rgba(0,0,0,0.12);
    border-radius:6px;
    padding:16px;
    z-index:999;
    color:#000;
}
.bw-cart-wrapper:hover .bw-mini-cart-dropdown {
    display:block;
}
.bw-mini-cart-loading {
    font-size:14px;
    padding:16px 0;
    text-align:center;
    font-weight:400;
    color:#4a4a4a;
}
.bw-mini-cart-actions {
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:12px;
}
.bw-btn {
    display:block;
    width:100%;
    text-align:center;
    padding:10px 12px;
    font-size:14px;
    font-weight:600;
    text-decoration:none;
    border-radius:4px;
    line-height:1.3;
}
.bw-btn-primary {
    background:#1947C4;
    color:#fff;
}
.bw-btn-primary:hover {
    filter:brightness(1.1);
}
.bw-btn-secondary {
    background:#f5f5f5;
    color:#000;
}
.bw-btn-secondary:hover {
    background:#e9e9e9;
}

/* =========================
   BOTTOM HEADER (меню категорий)
   ========================= */

.bw-bottom-header {
    /* фон, цвет текста, шрифт и т.д. теперь приходят inline из PHP */
    font-size:14px;
    font-weight:600;
    position:relative;
    z-index:1000;
}

.bw-bottom-header__inner {
    padding:12px 0;
}

.bw-bottom-menu {
    display:flex;
    flex-wrap:nowrap;
    align-items:flex-start;
    column-gap:40px;
    row-gap:0;
    margin:0;
    padding:0;
    list-style:none;
}

/* один пункт меню */
.bw-bottom-menu__item {
    flex:0 0 auto;
    text-align:center;
}

/* ссылка внутри */
.bw-bottom-menu__link {
    text-decoration:none;
    display:flex;
    flex-direction:column;
    align-items:center;
    font-weight:600;
    font-size:15px;
    line-height:1.3;
    white-space:nowrap;
}

/* иконка категории */
.bw-cat-icon {
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:8px;
    line-height:1;
}
.bw-cat-icon svg {
    display:block;
}

/* если нет SVG, показываем fallback-букву как иконку */
.bw-cat-fallback {
    font-size:32px;
    font-weight:700;
    line-height:1;
}

/* подпись под иконкой */
.bw-bottom-menu__label {
    font-size:15px;
    font-weight:600;
    line-height:1.3;
    text-align:center;
    white-space:nowrap;
    display:block;
}

/* МЕГАМЕНЮ дропдаун */
.bw-bottom-menu__item.has-megamenu {
    position:relative;
}
.bw-bottom-menu__item.has-megamenu:hover .bw-mega {
    display:block;
}

.bw-mega {
    display:none;
    position:absolute;
    left:0;
    top:100%;
    width:100%;
    background:#fff;
    color:#000;
    box-shadow:0 20px 40px rgba(0,0,0,0.2);
    padding:20px 0;
    z-index:2000;
}

.bw-mega--container .bw-mega-inner {
    max-width:1280px;
    margin:0 auto;
    padding:0 16px;
    display:flex;
    gap:24px;
}
.bw-mega--full .bw-mega-inner {
    width:100%;
    padding:0 16px;
    display:flex;
    gap:24px;
}

.bw-mega-cols {
    display:flex;
    flex-wrap:nowrap;
    gap:24px;
    flex:1 1 auto;
}

.bw-mega-col {
    min-width:180px;
    max-width:240px;
    font-size:14px;
    line-height:1.4;
}
.bw-mega-col-title {
    font-weight:600;
    font-size:14px;
    margin-bottom:12px;
    color:#1a1a1a;
}
.bw-mega-col-links {
    margin:0;
    padding:0;
    list-style:none;
}
.bw-mega-col-links li {
    margin:0 0 8px;
}
.bw-mega-col-links a {
    color:#000;
    text-decoration:none;
    font-weight:400;
}
.bw-mega-col-links a:hover {
    text-decoration:underline;
}

/* баннер справа/слева */
.bw-mega-banner {
    flex:0 0 260px;
    position:relative;
    text-align:center;
    border-left:1px solid rgba(0,0,0,0.1);
    padding-left:24px;
}
.bw-mega-banner-left .bw-mega-inner {
    flex-direction:row-reverse;
}
.bw-mega-banner-img {
    width:100%;
    height:auto;
    display:block;
}
.bw-mega-banner-cta {
    font-weight:700;
    font-size:16px;
    color:#fff;
    background:#000;
    display:inline-block;
    padding:8px 12px;
    margin-top:12px;
}
.bw-mega-banner-link {
    text-decoration:none;
    color:#000;
}

/* RESPONSIVE */
@media (max-width:1024px){
    .bw-middle-header__inner{
        grid-template-columns:auto 1fr auto;
        column-gap:16px;
    }
    .bw-logo-img{
        max-height:54px;
    }
    .bw-middle-header__icons{
        min-width:200px;
        column-gap:16px;
    }
    .bw-bottom-menu{
        flex-wrap:wrap;
        column-gap:24px;
        row-gap:20px;
    }
    .bw-bottom-menu__item{
        flex:0 0 auto;
    }
}
@media (max-width:767px){
    .bw-middle-header__inner{
        display:flex;
        flex-direction:column;
        align-items:flex-start;
    }
    .bw-logo-img{
        max-height:50px;
    }
    .bw-middle-header__search{
        order:3;
        width:100%;
        max-width:100%;
    }
    .bw-search-form{
        max-width:100%;
    }
    .bw-middle-header__icons{
        order:2;
        width:100%;
        flex-wrap:wrap;
        justify-content:flex-start;
        gap:16px 24px;
        min-width:0;
        margin-bottom:12px;
        text-align:left;
    }

    .bw-bottom-header__inner{
        padding:16px 0;
    }
    .bw-bottom-menu{
        flex-wrap:wrap;
        column-gap:24px;
        row-gap:20px;
    }
    .bw-bottom-menu__item{
        flex:0 0 calc(50% - 24px);
    }
    .bw-cat-icon{
        margin-bottom:6px;
    }
    .bw-bottom-menu__label{
        font-size:14px;
    }
    .bw-search-input{
        font-size:14px;
        padding:9px 10px;
    }
    .bw-search-btn{
        font-size:14px;
        padding:0 12px;
    }
}
