﻿/* ========== Header Layout ========== */
.bm-header {
    border-bottom: 1px solid var(--bm-ink-300,#ddd);
    background: #fff;
    position: relative;
    z-index: 2000;
}

.bm-header__inner {
    padding: .75rem 1rem;
}

.bm-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 1rem;
}

.bm-col--logo {
    display: flex;
    align-items: center;
}

.bm-logo img {
    height: 42px;
    display: block;
}

/* ========== Search (desktop + shared) ========== */
.bm-search {
    position: relative;
    display: flex;
    align-items: center;
}

    .bm-search input[type="search"] {
        width: 100%;
        border: 1px solid var(--bm-ink-300,#ddd);
        border-radius: 999px;
        padding: .7rem 3rem .7rem 1rem;
        background: #fff;
        color: var(--bm-ink-700,#222);
    }

html[dir="rtl"] .bm-search input[type="search"] {
    padding: .7rem 1rem .7rem 3rem;
}

.bm-search__btn {
    position: absolute;
    right: .4rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: var(--bm-pink-600,#D890BA);
    color: #fff;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

html[dir="rtl"] .bm-search__btn {
    right: auto;
    left: .4rem;
}

/* ========== Header Actions ========== */
.bm-col--actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .75rem;
}

.bm-iconlink {
    color: var(--bm-ink-700,#222);
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    padding: .35rem;
}

/* ========== Icon Buttons (shared) ========== */
.bm-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--bm-ink-700,#222);
}

/* ========== Responsive helpers (single source) ========== */
.bm-hide-mobile {
    display: grid;
}
/* desktop row visible by default */
.bm-show-mobile {
    display: none;
    grid-template-columns: 1fr auto;
    align-items: center;
}

@media (max-width: 991.98px) {
    .bm-hide-mobile {
        display: none !important;
    }

    .bm-show-mobile {
        display: flex !important;
        align-items: center;
    }

    .bm-header__inner {
        padding: .6rem .8rem;
    }

    .bm-col--icons {
        display: flex !important;
        gap: 10px;
        justify-content: flex-end;
        align-items: center;
    }
}

/* ========== Sticky header (CSS primary, JS fallback OK) ========== */
#site-header {
    position: sticky;
    top: 0;
    z-index: 2100;
    background: #fff;
}

/* ========== Cart badge + mini dropdown (single definition) ========== */
.bm-cart {
    position: relative;
    display: inline-block;
    z-index: 2100;
}

.bm-cart-badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -10px;
    background: var(--bm-pink-600);
    color: #fff;
    border-radius: 999px;
    padding: 0 .45rem;
    font-size: .72rem;
    line-height: 1.6;
    display: none;
}

html[dir="rtl"] .bm-cart-badge {
    inset-inline-end: auto;
    inset-inline-start: -10px;
}

.bm-mini-host {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 6px);
    width: 360px;
    max-width: 92vw;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0,0,0,.08);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .16s, transform .16s;
    z-index: 2200;
}

.bm-cart:hover .bm-mini-host {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.bm-cart--mobile .bm-mini-host {
    top: 120%;
}

/* ========== Mobile Nav Drawer (kept minimal) ========== */
@media (max-width: 991.98px) {
    .bm-navpanel {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 85vw;
        max-width: 380px;
        background: #fff;
        box-shadow: 0 20px 50px rgba(0,0,0,.15);
        padding: 1rem;
        z-index: 2300;
        overflow: auto;
        transform: translateX(100%);
        transition: transform .25s ease;
    }

    html[dir="rtl"] .bm-navpanel {
        transform: translateX(-100%);
    }

    .bm-navpanel.is-open {
        transform: translateX(0);
    }

    .main-nav {
        display: block;
    }

        .main-nav > li {
            border-bottom: 1px solid #eee;
        }

            .main-nav > li > a {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: .9rem .25rem;
                font-weight: 700;
            }

        .main-nav li.has-sub > ul, .main-nav li.has-sub > .mega {
            display: none;
            padding: .25rem 0 .75rem .5rem;
        }

    html[dir="rtl"] .main-nav li.has-sub > ul, html[dir="rtl"] .main-nav li.has-sub > .mega {
        padding-inline-start: .5rem;
        padding-inline-end: 0;
    }

    .main-nav li.has-sub.open > ul, .main-nav li.has-sub.open > .mega {
        display: block;
    }
}

/* Desktop main nav layout */
.main-nav {
    display: flex;
    gap: .75rem;
    flex-wrap: nowrap;
}

html[dir="rtl"] .main-nav {
    flex-direction: row-reverse;
}

    html[dir="rtl"] .main-nav > li > a {
        text-align: right;
    }

/* ========== Mobile Search Sheet (single model) ========== */
/* ---- emergency overrides for the mobile search sheet ---- */
.bm-searchsheet {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: grid !important; /* never display:none while active model uses opacity */
    grid-template-rows: auto 1fr !important;
    background: rgba(0,0,0,.38) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity .18s ease !important;
}

.bm-searchsheet__header {
    background: #fff !important;
    transform: translateY(-16px) !important;
    transition: transform .2s ease !important;
}

.bm-searchsheet.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

    .bm-searchsheet.is-open .bm-searchsheet__header {
        transform: translateY(0) !important;
    }

body.bm-lock {
    overflow: hidden !important;
}


.bm-searchsheet {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(0,0,0,.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s;
}

    .bm-searchsheet.is-open {
        opacity: 1;
        pointer-events: auto;
    }

.bm-searchsheet__header {
    background: #fff;
    transform: translateY(-16px);
    transition: transform .2s;
}

.bm-searchsheet.is-open .bm-searchsheet__header {
    transform: translateY(0);
}

body.bm-lock {
    overflow: hidden;
}

/* Prevent any page-level transform from pushing fixed overlays */
.bm-no-transform {
    transform: none !important;
}


/* base sticky */
#site-header {
    position: sticky;
    top: 0;
    z-index: 2100;
    background: #fff;
}

/* safety net for mobile — if a wrapper breaks sticky, use fixed instead */
@media (max-width: 991.98px) {
    html, body {
        overflow-x: hidden; /* prevent horizontal scroll */
    }

    .bm-page-wrap, .pd_header_main_wrapper, .bz_furniture_header_wrapper {
        transform: none !important; /* disable transforms that cancel sticky */
        overflow: visible !important;
    }

    #site-header {
        position: fixed; /* fallback for mobile browsers */
        left: 0;
        right: 0;
        top: 0;
    }

    /* optional spacing so content doesn’t jump under the fixed header */
    #header-spacer {
        height: var(--bm-header-height, 80px);
    }
}
@media (max-width: 991.98px) {
    #bmSearchSheet .bm-search__current {
        margin: 0.5rem 1rem 0;
        font-size: 0.9rem;
        color: #666;
    }

        #bmSearchSheet .bm-search__current strong {
            color: #111;
        }
}
/* === Mobile Search Overlay === */
.bm-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
}

    .bm-search-overlay[aria-hidden="false"] {
        display: block;
    }

.bm-search-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}

/* Panel that slides from top */
.bm-search-overlay__panel {
    position: relative;
    margin-top: 0;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header (close + input) */
.bm-search-overlay__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.bm-search-overlay__form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f7f7f7;
    border-radius: 999px;
    padding: 4px 6px;
}

#bmSearchInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    padding: 4px 8px;
}

    #bmSearchInput:focus {
        outline: none;
    }

.bm-search-overlay__submit {
    border: none;
    background: var(--bm-pink-600, #D890BA);
    color: #fff;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

/* Body scroll */
.bm-search-overlay__body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 12px 18px;
}

/* "Searching for: X" line */
.bm-search-overlay__query {
    margin: 4px 0 8px;
    font-size: 0.85rem;
    color: #666;
}

    .bm-search-overlay__query strong {
        color: #111;
    }

/* Results list */
.bm-search-overlay__results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Result card layout */
.bm-search-result {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #eee;
    background: #fff;
    text-align: left;
}

.bm-search-result__thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    background: #fafafa;
}

.bm-search-result__title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.bm-search-result__meta {
    font-size: 0.8rem;
    color: #777;
}

/* Chips area */
.bm-search-overlay__chips {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bm-chip {
    border-radius: 999px;
    border: 1px solid #D890BA;
    background: #fff;
    color: #D890BA;
    font-size: 0.8rem;
    padding: 4px 10px;
}

/* mobile only */
@media (min-width: 992px) {
    .bm-search-overlay {
        display: none !important; /* only for mobile UI */
    }
}
/* MOBILE SEARCH SHEET LAYOUT + DESIGN */
@media (max-width: 991.98px) {

    /* Sheet is a full-height column */
    .bm-searchsheet[data-mobile-search-sheet] {
        display: flex;
        flex-direction: column;
        background: rgba(0,0,0,.45); /* dim backdrop */
    }

    /* White panel on top part */
    .bm-searchsheet__header {
        background: #fff;
        padding: 10px 12px;
        border-bottom: 1px solid #eee;
    }

        .bm-searchsheet__header .bm-iconbtn {
            margin-inline-end: 8px;
        }

    /* form = vertical: input then suggestions */
    .bm-searchsheet .bm-search--sheet {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

        /* input styled nicely */
        .bm-searchsheet .bm-search--sheet input[type="search"] {
            height: 40px;
            border-radius: 999px;
            border: 1px solid #e5e7eb;
            padding: 0 40px 0 12px;
            font-size: 0.9rem;
        }

        .bm-searchsheet .bm-search--sheet .bm-search__btn {
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            border-radius: 999px;
        }

    /* content below (chips etc) scrolls */
    .bm-searchsheet__content {
        flex: 1;
        overflow-y: auto;
        padding: 10px 12px 18px;
        background: #fafafa;
    }
}


/* -----------------------------------
   Mini cart dropdown layout
   ----------------------------------- */

.bm-mini {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
    padding: 12px 14px 14px;
    font-size: 13px;
    max-height: 72vh;
    overflow-y: auto;
}

/* Header / footer */

.bm-mini__head,
.bm-mini__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bm-mini__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bm-mini__view {
    font-size: 11px;
    text-transform: uppercase;
}

/* Lines */

.bm-mini__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.bm-mini__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Text column */

.bm-mini__info {
    flex: 1;
    min-width: 0;
}

.bm-mini__name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

    .bm-mini__name a {
        color: inherit;
        text-decoration: none;
    }

        .bm-mini__name a:hover {
            text-decoration: underline;
        }

.bm-mini__meta {
    font-size: 12px;
    color: #757575;
}

/* Thumbnail */

.bm-mini__thumb {
    position: relative;
    flex: 0 0 auto;
}

    .bm-mini__thumb img {
        display: block;
        width: 70px;
        height: 70px;
        border-radius: 12px;
        object-fit: cover;
    }

/* Qty badge on the thumb */

.bm-mini__qty {
    position: absolute;
    right: -6px;
    bottom: -6px;
    min-width: 22px;
    min-height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ffffff;
    color: #111111;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Remove button on the thumb */

.bm-mini__remove {
    position: absolute;
    top: -6px;
    right: -6px;
}

    .bm-mini__remove button {
        width: 20px;
        height: 20px;
        border-radius: 999px;
        border: none;
        background: #f3f3f3;
        font-size: 12px;
        line-height: 1;
        cursor: pointer;
    }

/* Subtotal + buttons */

.bm-mini__subtotal span {
    font-size: 12px;
    color: #757575;
}

.bm-mini__subtotal strong {
    font-size: 14px;
}

.bm-mini__actions {
    display: flex;
    gap: 8px;
}

    .bm-mini__actions .bm-btn {
        flex: 1;
        text-align: center;
    }



/* --- Header marquee override --- */

#announcementBar {
    overflow: hidden;
    position: relative;
    z-index: 50;
}

    /* make the UL into a long strip that scrolls */
    #announcementBar .bz_ticker_wrap {
        overflow: hidden;
        width: 100%;
    }

    #announcementBar .bz_ticker_list {
        display: inline-block;
        white-space: nowrap;
        padding: 0;
        margin: 0;
        list-style: none;
        animation: bm-marquee-scroll 35s linear infinite;
    }

        #announcementBar .bz_ticker_list li {
            display: inline-block;
            padding: 0 3rem;
            font-size: 0.9rem;
        }

/* scrolling from right to left across the full bar */
@keyframes bm-marquee-scroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* ---- Mobile: announcement bar + sticky header dance ---- */
:root {
    --bm-bar-height: 32px; /* adjust if your pink bar is taller/shorter */
}

@media (max-width: 991.98px) {

    /* Make sure the bar is visible on mobile and pinned to the top */
    #announcementBar {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2200; /* above page, below modals */
    }

    /* Header sits just under the bar */
    #site-header {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--bm-bar-height); /* was top:0; */
        z-index: 2100;
        background: #fff;
    }

    /* Spacer = header height + bar height so content starts below both */
    #header-spacer {
        height: calc(var(--bm-header-height, 80px) + var(--bm-bar-height));
    }
}
