/* ======================================================================
   Header — Cohort 9 (Verdant Mart — Bangladeshi marketplace)
   Signature: white top bar + GREEN secondary nav band + mobile bottom
   fixed nav with FLOATING CIRCULAR HOME button center.
   ====================================================================== */

.header-9-main {
    background: #fff;
    border-bottom: none;
}
.header-9-sticky.is-scrolled {
    box-shadow: 0 4px 8px rgba(27, 94, 32, 0.06);
}

/* ---------- 1. Top bar (white) ---------- */
.header-9-top { background: #fff; }
.header-9-top-row {
    grid-template-columns: auto 1fr auto;
    column-gap: 16px;
    align-items: center;
}
@media (min-width: 992px) {
    .header-9-top-row {
        grid-template-columns: auto 1fr auto;
        column-gap: 32px;
    }
}
@media (max-width: 991.98px) {
    .header-9-top {
        background: var(--bs-primary);
        padding: 0.6rem 0 !important;
    }
    .header-9-top .container { padding: 0 0.85rem; max-width: 100%; }
    .header-9-top-row {
        grid-template-columns: auto 1fr auto !important;
        gap: 0.5rem;
    }
    .header-9-burger { color: #fff; }
    .header-9-logo {
        justify-content: center;
        order: 0;
    }
    .header-9-logo-img {
        max-height: 36px;
        width: auto;
        background: #fff;
        padding: 2px;
    }
    /* Hide search input row on mobile — open via icon */
    .header-9-search {
        display: none !important;
    }
    body.is-mobile-search-open .header-9-search {
        display: block !important;
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 1095;
        background: var(--bs-primary);
        padding: 0.65rem 0.85rem;
    }
    .header-9-actions {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
    }
    .header-9-mobile-icon {
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 0.35rem;
        color: #fff;
        text-decoration: none;
    }
    .header-9-mobile-icon:hover { background: rgba(255, 255, 255, 0.25); color: #fff; }
}

.header-9-burger {
    width: 38px; height: 38px;
    background: transparent;
    border: none;
    color: #fff;
    border-radius: 0.25rem;
}

.header-9-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.header-9-logo-img {
    max-height: 56px;
    width: auto;
    object-fit: contain;
    border-radius: 50%;
}

/* ---------- Search ---------- */
.header-9-search { width: 100%; }
.header-9-search-field {
    display: flex;
    border: 1.5px solid var(--bs-primary);
    border-radius: 0.4rem;
    overflow: hidden;
    background: #fff;
}
.header-9-search-input {
    flex: 1 1 auto;
    border: none;
    background: transparent;
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
    color: var(--bs-body-color);
    min-width: 0;
}
.header-9-search-input:focus {
    outline: none;
    box-shadow: none;
}
.header-9-search-input::placeholder {
    color: var(--bs-secondary-color);
}
.header-9-search-submit {
    background: #fff;
    border: none;
    color: var(--bs-primary);
    padding: 0 0.85rem;
    cursor: pointer;
    transition: background 0.10s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1.5px solid var(--bs-light-secondary);
}
.header-9-search-submit:hover {
    background: var(--bs-light-primary);
    color: var(--bs-secondary);
}

.header-9-search-dropdown {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    z-index: 1080;
}
.header-9-search-list { max-height: 60vh; overflow-y: auto; }
.header-9-search-list a {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--bs-border-color);
    text-decoration: none;
    color: var(--bs-body-color);
}
.header-9-search-list a:hover { background: var(--bs-light-primary); }
.header-9-search-list img {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 1px solid var(--bs-border-color);
    flex: 0 0 48px;
}
.header-9-search-name { font-weight: 500; font-size: 0.92rem; }
.header-9-search-price {
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 0.88rem;
}
.header-9-search-price-old {
    color: var(--bs-danger);
    text-decoration: line-through;
    font-weight: 400;
    font-size: 0.82rem;
}
.header-9-search-empty {
    display: block;
    padding: 24px 16px;
    text-align: center;
    color: var(--bs-secondary-color);
}
.header-9-search-more {
    color: var(--bs-primary);
    font-weight: 600;
    background: var(--bs-light-primary);
}
.header-9-search-more:hover { color: var(--bs-secondary); }

/* ---------- Top-bar actions (helpline desktop + mobile icons) ---------- */
.header-9-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.header-9-helpline {
    color: var(--bs-body-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.header-9-helpline:hover { color: var(--bs-primary); }
.header-9-helpline-icon {
    color: var(--bs-body-color);
    display: inline-flex;
}
.header-9-helpline-label {
    color: var(--bs-body-color);
    font-size: 0.85rem;
    font-weight: 600;
}
.header-9-helpline-number {
    color: var(--bs-body-color);
    font-size: 0.95rem;
    font-weight: 700;
}

.header-9-mobile-icon {
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.header-9-mobile-icon:hover {
    background: rgba(255, 255, 255, 0.30);
    color: #fff;
}

/* ---------- 2. Green secondary nav band ---------- */
.header-9-nav {
    background: var(--bs-primary);
    color: #fff;
}
.header-9-nav-row { padding: 0.6rem 0; }

.header-9-shop-wrap { position: relative; }
.header-9-shop-trigger {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border: none;
    padding: 0.5rem 0.95rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0.35rem;
    transition: background 0.10s ease;
    min-width: 230px;
}
.header-9-shop-trigger:hover,
.header-9-shop-trigger.is-open { background: rgba(255, 255, 255, 0.20); color: #fff; }

/* Dropdown panel that appears below the trigger */
.header-9-shop-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 280px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: 0.5rem;
    box-shadow: 0 14px 32px rgba(27, 94, 32, 0.18), 0 4px 8px rgba(27, 94, 32, 0.08);
    z-index: 1080;
}
.header-9-shop-panel[hidden] { display: none; }
.header-9-shop-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
}
.header-9-shop-list .nav-item { list-style: none; }
.header-9-shop-list .nav-link {
    display: block;
    padding: 0.55rem 0.95rem;
    color: var(--bs-body-color);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-bottom: 1px solid var(--bs-border-color);
    transition: background 0.10s ease, color 0.10s ease, padding-left 0.10s ease;
}
.header-9-shop-list .nav-link:hover {
    background: var(--bs-light-primary, #E8F5E9);
    color: var(--bs-primary);
    padding-left: 1.1rem;
}
.header-9-shop-list .has-child > .nav-link::after {
    content: '›';
    float: right;
    color: var(--bs-secondary-color);
    font-size: 1.05rem;
    line-height: 1;
}
.header-9-shop-list .menu-dropdown {
    display: none;
    background: var(--bs-bg-alt, #F4F7F2);
}
.header-9-shop-list .menu-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.header-9-shop-list .menu-dropdown .nav-link {
    padding-left: 1.6rem;
    font-size: 0.84rem;
    border-bottom-color: rgba(0,0,0,0.05);
}
.header-9-shop-list .has-child.is-expanded > .menu-dropdown { display: block; }

@media (max-width: 991.98px) {
    .header-9-shop-panel { width: 92vw; left: 0.5rem; }
}

.header-9-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1 1 auto;
}
.header-9-menu .nav-item { position: relative; }
.header-9-menu .nav-link {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.35rem 0;
    text-decoration: none;
    transition: color 0.10s ease;
}
.header-9-menu .nav-link:hover { color: var(--bs-warning); }

/* Desktop sub-menu */
@media (min-width: 992px) {
    .header-9-menu .has-child > .menu-dropdown {
        display: block !important;
        position: absolute;
        top: calc(100% + 0.6rem + 4px);
        left: 0;
        min-width: 220px;
        background: #fff;
        border: 1px solid var(--bs-primary);
        border-radius: 0.25rem;
        padding: 0.35rem 0;
        box-shadow: 0 6px 18px rgba(27, 94, 32, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(4px);
        transition: opacity 0.10s ease, transform 0.10s ease, visibility 0.10s ease;
        z-index: 1050;
        height: auto !important;
    }
    .header-9-menu .has-child:hover > .menu-dropdown,
    .header-9-menu .has-child:focus-within > .menu-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .header-9-menu .has-child > .menu-dropdown ul {
        list-style: none;
        padding: 0;
        margin: 0;
        flex-direction: column !important;
    }
    .header-9-menu .has-child > .menu-dropdown .nav-link {
        display: block;
        padding: 0.5rem 0.9rem;
        color: var(--bs-body-color);
        font-size: 0.86rem;
    }
    .header-9-menu .has-child > .menu-dropdown .nav-link:hover {
        background: var(--bs-light-primary);
        color: var(--bs-primary);
    }
    .header-9-menu .nav-item:not(.has-child) > .menu-dropdown {
        display: none !important;
    }
}

/* ---------- Action cluster (right side of green band) ---------- */
.header-9-action {
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 0 0 38px;
}
.header-9-action:hover {
    background: #fff;
    color: var(--bs-primary);
}
.header-9-action-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--bs-warning);
    color: var(--bs-body-color);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Mobile drawer (slides from left) ---------- */
@media (max-width: 991.98px) {
    .header-9-nav .container { padding: 0; }
    .header-9-nav-row { display: none !important; }

    .header-9-drawer {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 86vw;
        max-width: 320px;
        background: #fff;
        color: var(--bs-body-color);
        overflow-y: auto;
        z-index: 1085;
        transform: translateX(-100%);
        transition: transform 0.20s ease;
        display: flex;
        flex-direction: column;
        box-shadow: 4px 0 16px rgba(27, 94, 32, 0.10);
    }
    body.is-mobile-nav-open .header-9-drawer { transform: translateX(0); }

    .header-9-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid var(--bs-border-color);
    }
    .header-9-drawer-close {
        width: 36px; height: 36px;
        background: transparent;
        border: none;
        color: var(--bs-body-color);
        border-radius: 0.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .header-9-drawer-close:hover { background: var(--bs-light-primary); color: var(--bs-primary); }

    .header-9-drawer-body { flex: 1 1 auto; padding: 0.5rem 0; }
    .header-9-drawer-menu { list-style: none; padding: 0; margin: 0; }
    .header-9-drawer-menu .nav-item { border-bottom: 1px solid var(--bs-border-color); }
    .header-9-drawer-menu .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 1rem;
        color: var(--bs-body-color);
        font-size: 0.95rem;
        font-weight: 500;
        text-decoration: none;
    }
    .header-9-drawer-menu .nav-link:hover {
        background: var(--bs-light-primary);
        color: var(--bs-primary);
    }
    .header-9-drawer-menu .has-child > .nav-link::after {
        content: '';
        display: inline-block;
        width: 6px; height: 6px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-2px) rotate(45deg);
    }
    .header-9-drawer-menu .has-child.is-expanded > .nav-link::after {
        transform: translateY(2px) rotate(-135deg);
    }
    .header-9-drawer-menu .menu-dropdown {
        display: none !important;
        background: var(--bs-light-secondary);
    }
    .header-9-drawer-menu .has-child.is-expanded > .menu-dropdown { display: block !important; }
    .header-9-drawer-menu .menu-dropdown ul {
        list-style: none;
        padding-left: 1.25rem;
        margin: 0;
    }
    .header-9-drawer-menu .menu-dropdown .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.88rem;
    }

    .header-9-drawer-foot {
        padding: 1rem;
        display: grid;
        gap: 0.5rem;
        border-top: 1px solid var(--bs-border-color);
    }
    .header-9-drawer-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.65rem 1rem;
        border-radius: 0.4rem;
        font-weight: 700;
        text-decoration: none;
        font-size: 0.92rem;
    }
    .header-9-drawer-cta-primary {
        background: var(--bs-primary);
        color: #fff;
    }
    .header-9-drawer-cta-outline {
        background: transparent;
        border: 1px solid var(--bs-primary);
        color: var(--bs-primary);
    }
    .header-9-drawer-cta-primary:hover { background: var(--bs-secondary); color: #fff; }
    .header-9-drawer-cta-outline:hover { background: var(--bs-primary); color: #fff; }

    .header-9-overlay {
        position: fixed;
        inset: 0;
        background: rgba(27, 94, 32, 0.45);
        z-index: 1080;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.15s ease, visibility 0.15s ease;
        pointer-events: none;
    }
    body.is-mobile-nav-open .header-9-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}
@media (min-width: 992px) {
    .header-9-drawer,
    .header-9-overlay { display: none !important; }
}

/* ---------- 3. Mobile bottom fixed nav with FLOATING circular HOME button (cohort signature) ---------- */
.header-9-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--bs-border-color);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.5rem;
    z-index: 1070;
    box-shadow: 0 -4px 12px rgba(27, 94, 32, 0.08);
}
body { padding-bottom: 72px; }
@media (min-width: 992px) {
    body { padding-bottom: 0; }
    .header-9-bottom-nav { display: none !important; }
}

.header-9-bottom-icon {
    color: var(--bs-primary);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.10s ease;
}
.header-9-bottom-icon:hover {
    background: var(--bs-light-primary);
}
.header-9-bottom-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--bs-danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* THE SIGNATURE — floating circular HOME center (amber warm break from green chrome) */
.header-9-bottom-home {
    width: 60px;
    height: 60px;
    background: var(--bs-warning, #FFB300);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-top: -28px;
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.35);
    border: 4px solid #fff;
    transition: background 0.10s ease, transform 0.10s ease;
}
.header-9-bottom-home:hover {
    background: #E5A100;
    color: #fff;
    transform: translateY(-2px);
}
