/* =====================================================================
   BF redesign 2026-11 — HEADER
   Black / orange / white, fonts Unbounded (logo) + Manrope (UI).
   Loaded after the theme styles from template/common/header.twig.
   To roll back: remove the <link> to this file in header.twig
   (or restore header.bf-backup-20261115.twig).
   ===================================================================== */

/* ---------- 1. Promo strip (above everything) ---------- */
.bf-promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 10px 32px;
    background: #ff680a;
    color: #000;
    font: 800 14px/1.3 'Manrope', Arial, sans-serif;
}
.bf-promo a,
.bf-promo a:visited {
    color: #000;
    text-decoration: none;
}
.bf-promo a:hover {
    color: #000;
    text-decoration: underline;
}
.bf-promo-hours {
    color: #000;
    white-space: nowrap;
}
@media (max-width: 767.98px) {
    .bf-promo {
        justify-content: center;
        padding: 8px 12px;
        font-size: 12px;
        text-align: center;
    }
    .bf-promo-hours { display: none; }
}

/* ---------- 2. Top row: logo, info links, phone ---------- */
#top {
    background: #0b0b0b !important;
    border-bottom: 1px solid #222;
    font-family: 'Manrope', Arial, sans-serif;
}
@media (min-width: 768px) {
    #top { height: 64px; }
}

/* text wordmark */
.bf-logo,
.bf-logo:visited,
.bf-logo:hover {
    font-family: 'Unbounded', Arial, sans-serif;
    font-weight: 900;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.5px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.bf-logo span { color: #ff680a; }
@media (max-width: 767.98px) {
    .bf-logo,
    .bf-logo:visited,
    .bf-logo:hover { font-size: 18px; }
}

/* info links (Про нас, Контакти…) */
#top .top-left li a,
#top .top-left li a:visited {
    color: #c9c9c9 !important;
    font-weight: 700;
    font-size: 13px;
}
#top .top-left li a:hover {
    color: #fff !important;
    text-decoration: none;
}

/* phone + dropdown */
#top .sc-dropdown-toggle,
#top .top-right .sc-dropdown-toggle {
    color: #fff !important;
    font-weight: 800;
    font-size: 16px;
}
#top .sc-dropdown-toggle:hover { color: #ff680a !important; }
#top .sc-dropdown-toggle::after,
#top .sc-dropdown-box.active .sc-dropdown-toggle::after { background: #ff680a !important; }
#top .sc-dropdown-box.active .sc-dropdown-toggle {
    color: #ff680a !important;
    text-decoration: none;
}
#top .top-right .popup-call-trigger {
    color: #ff680a !important;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px dashed #ff680a;
}
#top .top-right .popup-call-trigger:hover {
    color: #fff !important;
    border-bottom-color: #fff;
}

/* phone dropdown panel */
#top .sc-dropdown-inner {
    background: #161616;
    border: 1px solid #2c2c2c;
    border-radius: 12px !important;
    color: #c9c9c9;
}
#top .sc-dropdown-inner .dark-text { color: #fff !important; }
#top .sc-dropdown-inner .light-text { color: #c9c9c9 !important; }
#top .sc-dropdown-inner .blue-link { color: #ff680a !important; }
#top .sc-dropdown-inner img { filter: brightness(0) invert(1); }
#top .sc-dropdown-inner .sc-btn-primary {
    background: #ff680a !important;
    color: #000 !important;
    border-radius: 10px !important;
    font-weight: 800;
}

/* mobile icon buttons in the top row */
#top .sc-btn-icon { background: #fff !important; }

/* ---------- 3. Header row: catalog button, search, icon buttons ---------- */
.header {
    background: #0b0b0b !important;
    border-bottom: 1px solid #222 !important;
    box-shadow: none !important;
    font-family: 'Manrope', Arial, sans-serif;
}
@media (min-width: 1200px) {
    .header { padding-top: 12px !important; padding-bottom: 12px !important; }
}

/* "Каталог товарів" */
#menuToggleButton {
    height: 44px;
    background: #1c1c1c !important;
    border: 1px solid #333 !important;
    border-radius: 10px !important;
    color: #fff !important;
    font: 700 15px 'Manrope', Arial, sans-serif;
    transition: background .2s, border-color .2s;
}
#menuToggleButton .sc-btn-text { color: #fff !important; }
#menuToggleButton .sc-btn-icon { background: #ff680a !important; }
#menuToggleButton:hover,
#menuToggleButton.clicked {
    background: #ff680a !important;
    border-color: #ff680a !important;
}
#menuToggleButton:hover .sc-btn-text,
#menuToggleButton.clicked .sc-btn-text { color: #000 !important; }
#menuToggleButton:hover .sc-btn-icon,
#menuToggleButton.clicked .sc-btn-icon { background: #000 !important; }

/* search field */
.header .header-search .form-control {
    background: #1c1c1c !important;
    border: 1px solid #333 !important;
    border-radius: 10px !important;
    color: #fff !important;
    font: 500 15px 'Manrope', Arial, sans-serif;
    padding-right: 48px !important;
}
@media (min-width: 1200px) {
    .header .header-search .form-control { height: 44px; }
}
.header .header-search .form-control::placeholder {
    color: #9a9a9a;
    font-size: 15px;
}
.header .header-search .form-control:focus {
    border-color: #ff680a !important;
    box-shadow: 0 0 0 3px rgba(255, 104, 10, .25) !important;
}
#sc-search-button {
    top: 0 !important;
    bottom: 0;
    right: 1rem !important;
    display: flex;
    align-items: center;
}
#sc-search-button .sc-btn-icon { background: #b5b5b5 !important; }
#sc-search-button:hover .sc-btn-icon { background: #ff680a !important; }

/* icon buttons: account, compare, wishlist, cart (+ mobile bottom bar) */
.header-buttons .sc-btn,
.header-buttons .sc-btn:visited {
    color: #c9c9c9 !important;
}
.header-buttons .sc-btn:not(:first-child) { border-left-color: #2c2c2c !important; }
.header-buttons .sc-btn:hover { color: #ff680a !important; }
.header-buttons .sc-btn-icon { background: #fff !important; }
.header-buttons .sc-btn:hover .sc-btn-icon { background: #ff680a !important; }
/* inline / sprite SVG icons are drawn dark — turn them white */
.header-buttons .sc-btn svg { filter: brightness(0) invert(1); }
.header-buttons .sc-btn:hover svg { filter: brightness(0) invert(1) opacity(.75); }

/* cart counter */
.header-buttons-cart-quantity {
    background: #ff680a !important;
    color: #000 !important;
    font-weight: 800 !important;
}

/* mobile catalog button in the bottom bar */
.header-buttons .sc-btn.header-buttons-catalog { color: #ff680a !important; }
.header-buttons .sc-btn.header-buttons-catalog svg { filter: none; }
.header-buttons-catalog path { stroke: #ff680a !important; }

/* =====================================================================
   v2 — desktop layout as in the mockup (xl, ≥1200px):
   [logo] [Каталог товарів] [search ............] [phone] [icons + cart]
   [Розпродаж | categories …]
   On xl the old #top row is hidden: logo and phone live in the header row.
   Tablet/mobile keep the theme layout (dark colours from v1).
   ===================================================================== */
@media (min-width: 1200px) {
    #top { display: none !important; }

    .header { padding-top: 16px !important; padding-bottom: 0 !important; }

    .bf-header-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 20px;
        margin: 0;
    }
    .bf-header-row > * {
        width: auto;
        max-width: none;
        padding: 0;
    }
    .bf-header-logo { flex: 0 0 auto; }
    .bf-header-catalog { flex: 0 0 auto; }
    .bf-header-main { flex: 1 1 auto; min-width: 0; }

    #menuToggleButton {
        width: auto !important;
        height: 48px;
        padding: 0 18px !important;
        gap: 10px;
        white-space: nowrap;
    }

    .header .header-search-box { gap: 20px; }
    .header .header-search { padding: 0; }
    .header .header-search .form-control { height: 48px; }

    /* phone */
    .bf-header-phone {
        flex: 0 0 auto;
        line-height: 1.2;
        white-space: nowrap;
    }
    .bf-header-phone-number,
    .bf-header-phone-number:visited {
        color: #fff;
        font: 800 16px 'Manrope', Arial, sans-serif;
        text-decoration: none;
    }
    .bf-header-phone-number:hover { color: #ff680a; }
    .bf-header-phone-call {
        align-self: flex-start;
        margin-top: 4px;
        padding: 0;
        background: none;
        border: 0;
        border-bottom: 1px dashed #ff680a;
        color: #ff680a;
        font: 700 12px 'Manrope', Arial, sans-serif;
        cursor: pointer;
    }
    .bf-header-phone-call:hover { color: #fff; border-bottom-color: #fff; }

    /* icon buttons: square, icon only */
    .header .header-buttons {
        flex: 0 0 auto;
        width: auto;
        gap: 8px;
        padding-right: 0 !important;
    }
    .header .header-buttons > * { flex-grow: 0; }
    .header .header-buttons .sc-btn {
        width: 48px;
        height: 48px !important;
        padding: 0 !important;
        border: 1px solid #333 !important;
        border-radius: 10px;
        background: #1c1c1c;
        justify-content: center !important;
        transition: border-color .2s, background .2s;
    }
    .header .header-buttons .sc-btn:hover { border-color: #ff680a !important; }
    .header .header-buttons .sc-btn .text-lowercase { display: none; }
    .header .header-buttons .sc-btn svg,
    .header .header-buttons .sc-btn .sc-btn-icon { width: 20px; height: 20px; }

    /* cart: orange square, last */
    .header .header-buttons .header-buttons-cart {
        order: 10;
        background: #ff680a !important;
        border-color: #ff680a !important;
    }
    .header .header-buttons .header-buttons-cart svg { filter: brightness(0) !important; }
    .header .header-buttons .header-buttons-cart:hover { background: #ff7f2e !important; }
    .header .header-buttons .header-buttons-cart-quantity {
        top: -6px;
        right: -6px;
        min-width: 20px;
        height: 20px;
        line-height: 20px;
        border-radius: 10px;
        background: #fff !important;
        color: #000 !important;
        font-size: 11px;
    }

    /* category bar */
    .bf-catnav {
        margin: 16px -0.75rem 0;
        border-top: 1px solid #222;
    }
    .bf-catnav-list {
        display: flex;
        align-items: center;
        gap: 28px;
        min-height: 52px;
        margin: 0;
        padding: 0 .75rem;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: #333 transparent;
    }
    .bf-catnav-list li { flex: 0 0 auto; }
    .bf-catnav-list a,
    .bf-catnav-list a:visited {
        display: block;
        padding: 15px 0;
        color: #d9d9d9;
        font: 700 15px 'Manrope', Arial, sans-serif;
        text-decoration: none;
        white-space: nowrap;
    }
    .bf-catnav-list a:hover { color: #fff; }
    .bf-catnav-list a.bf-catnav-sale,
    .bf-catnav-list a.bf-catnav-sale:visited {
        color: #ff680a;
        font-weight: 800;
        text-transform: uppercase;
    }
}

/* v3 — extra space under the header row */
.header > .container-fluid { padding-bottom: 15px; }

/* ---------- v4: mobile/tablet — promo strip pinned to the very top ----------
   The strip stays visible while scrolling; the sticky top bar (#top) sits
   right under it. One line, 32px high, long text is cut with "…". */
@media (max-width: 1199.98px) {
    .bf-promo {
        position: sticky !important;
        top: 0 !important;
        z-index: 1035 !important;
        height: 32px !important;
        padding: 0 12px !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
    }
    .bf-promo-text {
        display: block;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #top { top: 32px !important; }
}

/* ---------- v5: product page — promo strip like on all other pages ----------
   On phones the theme makes #top and the product tabs bar position:fixed on the
   product page (html.body-product) and pads <html> by 88px, so the sticky strip
   ended up below the top bar. Here the strip is fixed at the very top, the top
   bar under it, the tabs bar under the top bar. */
@media (max-width: 767.98px) {
    html.body-product { padding-top: 120px !important; }
    html.body-product .bf-promo {
        position: fixed !important;
        top: 0 !important; left: 0 !important; right: 0 !important;
        width: 100% !important;
    }
    html.body-product #top { position: fixed !important; top: 32px !important; }
    html.body-product .sc-product-tabs-box { top: 80px !important; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    html.body-product .sc-product-tabs-box { top: 96px !important; }
}

/* ---------- v6: header search — magnifier button without frame ---------- */
#sc-search-button,
#sc-search-button:hover,
#sc-search-button:focus,
#sc-search-button:active {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}
