/* ===== HEADER REDESIGN - Works with existing HTML structure ===== */

/* Top section: Logo + Contact bar */
.header-layout2 .navbar {
    padding: 0 !important;
    max-height: none !important;
}

.header-layout2 .navbar>.container {
    height: auto !important;
    max-height: none !important;
    padding-top: 12px;
    padding-bottom: 12px;
}

.header-layout2 .navbar-brand {
    line-height: normal !important;
}

.header-layout2 .navbar-brand img {
    max-height: 65px !important;
}

/* Contact topbar styling */
.header-layout2 .header-topbar {
    margin-top: 5px;
}

.header-layout2 .header-topbar__contact li {
    margin-right: 20px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
}

.header-layout2 .header-topbar__contact li>i {
    font-size: 18px !important;
    color: #27407c !important;
    margin-right: 12px !important;
}

.header-layout2 .header-topbar__contact li div span {
    color: #888 !important;
    font-size: 11px !important;
    display: block !important;
}

.header-layout2 .header-topbar__contact li div strong,
.header-layout2 .header-topbar__contact li div strong a {
    color: #333 !important;
    font-size: 13px !important;
}

/* Send Inquiry Button */
.header-layout2 .header__btn {
    padding: 8px 22px !important;
    height: auto !important;
    line-height: normal !important;
    font-size: 12px !important;
    border-radius: 50px !important;
    background: #27407c !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease !important;
    white-space: nowrap;
}

.header-layout2 .header__btn:hover {
    background: #e31b23 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(227, 27, 35, 0.25) !important;
}

/* ===== BOTTOM NAVBAR (Navigation + Search + Cart + Account) ===== */
.header-layout2 .navbar__bottom {
    background: #27407c !important;
    padding: 0 !important;
}

.header-layout2 .navbar__bottom>.container {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    height: auto !important;
    padding-top: 0;
    padding-bottom: 0;
}

/* Navbar collapse should not grow, let header-actions take remaining space */
.header-layout2 .navbar__bottom .navbar-collapse {
    flex: 0 0 auto !important;
    width: auto !important;
}

/* Nav items */
.header-layout2 .navbar__bottom .navbar-nav .nav__item {
    margin-right: 0 !important;
}

.header-layout2 .navbar__bottom .navbar-nav .nav__item-link {
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 55px !important;
    padding: 0 18px !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    transition: all 0.3s ease !important;
}

.header-layout2 .navbar__bottom .navbar-nav .nav__item-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.header-layout2 .navbar__bottom .navbar-nav .nav__item-link::before {
    display: none !important;
}

/* ===== HEADER-ACTIONS: Search full-width, Cart & Account on right ===== */
.header-layout2 .navbar__bottom .header-actions {
    margin-left: 15px !important;
    flex: 1 1 auto !important;
    max-width: none !important;
    width: auto !important;
}

.header-layout2 .navbar__bottom .header-actions__list {
    gap: 0 !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

/* ===== SEARCH FORM - FULL WIDTH ===== */
.header-layout2 .navbar__bottom .header-actions__list>li:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
}

.header-layout2 .navbar__bottom .header-search__form {
    border-left: none !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 50px !important;
    padding: 0 5px 0 0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease;
    max-width: none !important;
    width: 95% !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    height: 40px !important;
    overflow: visible !important;
    margin: 0 15px !important;
}

.header-layout2 .navbar__bottom .header-search__form:focus-within {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}

.header-layout2 .navbar__bottom .header-search__form .form-control {
    height: 38px !important;
    min-height: unset !important;
    max-height: 38px !important;
    padding: 0 15px !important;
    font-size: 13px !important;
    color: #fff !important;
    border: none !important;
    background: transparent !important;
    line-height: 38px !important;
    flex: 1 !important;
}

.header-layout2 .navbar__bottom .header-search__form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.header-layout2 .navbar__bottom .header-search__form .header-search__btn {
    position: static !important;
    transform: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
    padding: 0 12px !important;
    background: transparent !important;
    border: none !important;
    height: 38px !important;
    line-height: 38px !important;
    flex-shrink: 0 !important;
    cursor: pointer;
}

.header-layout2 .navbar__bottom .header-search__form .header-search__btn:hover {
    color: #fff !important;
}

/* ===== SEARCH RESULTS - HIDDEN BY DEFAULT ===== */
.header-layout2 .navbar__bottom .header-search__form .search-results {
    display: none;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    min-width: 450px !important;
    width: max-content !important;
    max-width: 600px !important;
    background: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18) !important;
    z-index: 9999 !important;
    max-height: 420px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.header-layout2 .navbar__bottom .header-search__form .search-results ol {
    list-style: none !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    counter-reset: none !important;
}

.header-layout2 .navbar__bottom .header-search__form .search-results ol li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    line-height: normal !important;
    list-style: none !important;
    float: none !important;
    width: 100% !important;
}

.header-layout2 .navbar__bottom .header-search__form .search-results ol li:last-child {
    border-bottom: none !important;
}

.header-layout2 .navbar__bottom .header-search__form .search-results ol li a {
    display: block !important;
    padding: 12px 18px !important;
    color: #333 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    justify-content: flex-start !important;
}

.header-layout2 .navbar__bottom .header-search__form .search-results ol li a:hover {
    background: #f4f6f9 !important;
    color: #27407c !important;
    padding-left: 24px !important;
}

/* ===== CART & ACCOUNT ICONS - Right side ===== */
.header-layout2 .navbar__bottom .header-actions__list>li:not(:first-child) {
    flex-shrink: 0 !important;
    width: 12%;
}

.header-layout2 .navbar__bottom .header-actions__list li {
    position: relative;
}

/* Only target direct cart/account links, NOT search result links */
.header-layout2 .navbar__bottom .header-actions__list>li>a.cartcountlink,
.header-layout2 .navbar__bottom .header-actions__list>li>a.linkformobilevjh,
.header-layout2 .navbar__bottom .header-actions__list>li.forthismobile>a {
    color: #fff !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.header-layout2 .navbar__bottom .header-actions__list>li>a.cartcountlink:hover,
.header-layout2 .navbar__bottom .header-actions__list>li.forthismobile>a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header-layout2 .navbar__bottom .cartcount {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: #e31b23 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #27407c !important;
    line-height: 1 !important;
}

/* ===== ACCOUNT LINK ===== */
.header-layout2 .navbar__bottom .forthismobile .nav__item-link {
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    line-height: 55px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    white-space: nowrap;
}

.header-layout2 .navbar__bottom .forthismobile .mobileuseraccount {
    font-size: 20px !important;
    margin-left: 6px;
}

.header-layout2 .navbar__bottom .forthismobile .mobiletext-account {
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* ===== STICKY NAVBAR ===== */
.header-layout2 .navbar__bottom.fixed-navbar {
    background: #27407c !important;
    height: auto !important;
    max-height: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-layout2 .navbar__bottom.fixed-navbar>.container {
    height: auto !important;
}

/* ===== FIX HEADER HEIGHT & SLIDER OVERLAP ===== */
.header-layout2 {
    height: auto !important;
    min-height: unset !important;
}

/* ===== DROPDOWN MENUS ===== */
.header-layout2 .navbar__bottom .dropdown-menu {
    border: none !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
    padding: 10px 0 !important;
    margin-top: 0 !important;
}

.header-layout2 .navbar__bottom .dropdown-menu .nav__item-link {
    color: #333 !important;
    line-height: 38px !important;
    font-size: 13px !important;
    text-transform: capitalize !important;
}

.header-layout2 .navbar__bottom .dropdown-menu .nav__item-link:hover {
    color: #27407c !important;
    background: #f4f6f9 !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991px) {
    .header-layout2 {
        height: auto !important;
    }

    /* Top header bar */
    .header-layout2 .navbar>.container {
        height: 60px !important;
        padding-top: 0;
        padding-bottom: 0;
    }

    .header-layout2 .navbar-brand img {
        max-height: 45px !important;
    }

    /* Hide desktop contact info on mobile */
    .header-layout2 .header-topbar {
        display: none !important;
    }

    .header-layout2 .header__btn {
        display: none !important;
    }

    /* ===== BOTTOM NAV BAR ON MOBILE ===== */
    .header-layout2 .navbar__bottom>.container {
        flex-wrap: wrap !important;
        padding: 8px 15px !important;
    }

    /* Navbar collapse - show as flex to not interfere with nav toggler */
    .header-layout2 .navbar__bottom .navbar-collapse {
        flex: none !important;
        width: auto !important;
    }

    /* Header actions - ALL in one row: search + cart + account */
    .header-layout2 .navbar__bottom .header-actions {
        margin-left: 0 !important;
        flex: none !important;
        width: 100% !important;
        order: -1 !important;
        padding: 12px 0;
    }

    .header-layout2 .navbar__bottom .header-actions__list {
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 6px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Search fills remaining space in the row */
    .header-layout2 .navbar__bottom .header-actions__list>li:first-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
        order: 0 !important;
        margin-top: 0 !important;
    }

    /* Cart & Account icons compact, no stretch */
    .header-layout2 .navbar__bottom .header-actions__list>li:not(:first-child) {
        order: 0 !important;
        flex: 0 0 auto !important;
        width: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        margin-right: 0 !important;
    }

    /* Override nav__item full-width for forthismobile on mobile */
    .header-layout2 .navbar__bottom .header-actions__list>li.forthismobile {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    .header-layout2 .navbar__bottom .header-actions__list>li.forthismobile>a {
        /* width: auto !important; */
        padding: 0 5px !important;
    }

    /* Search form full width on mobile */
    .header-layout2 .navbar__bottom .header-search__form {
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    .header-layout2 .navbar__bottom .header-search__form .form-control {
        color: #fff !important;
    }

    .header-layout2 .navbar__bottom .header-search__form .form-control::placeholder {
        color: rgba(255, 255, 255, 0.5) !important;
    }

    .header-layout2 .navbar__bottom .header-search__form .header-search__btn {
        color: rgba(255, 255, 255, 0.7) !important;
    }

    /* Search results on mobile */
    .header-layout2 .navbar__bottom .header-search__form .search-results {
        min-width: unset !important;
        width: 100% !important;
        max-width: none !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Account text hidden on mobile */
    .header-layout2 .navbar__bottom .forthismobile .mobiletext-account {
        display: none !important;
    }

    .header-layout2 .navbar__bottom .forthismobile .mobileuseraccount {
        display: inline-block !important;
        font-size: 18px !important;
        color: #fff !important;
    }

    /* Cart icon on mobile */
    .header-layout2 .navbar__bottom .header-actions__list>li>a.cartcountlink {
        width: 36px !important;
        height: 36px !important;
    }

    .header-layout2 .navbar__bottom .cartcount {
        top: -16px !important;
        right: -10px !important;
        width: 16px !important;
        height: 22px !important;
        font-size: 9px !important;
    }

    /* Mobile nav (when hamburger opens) */
    .header-layout2 .navbar-collapse {
        background: #fff !important;
        border-radius: 0 0 12px 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
        padding: 10px 0 !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
    }

    .header-layout2 .navbar__bottom .navbar-nav .nav__item-link {
        color: #27407c !important;
        line-height: 45px !important;
        padding: 0 20px !important;
        border-bottom: 1px solid #f0f0f0;
    }

    .header-layout2 .navbar__bottom .dropdown-menu .nav__item-link {
        border-bottom: none !important;
    }

    /* Hamburger toggler position fix */
    .header-layout2 .navbar__bottom .navbar-toggler {
        order: 3 !important;
        margin-left: auto !important;
        border: none !important;
        padding: 8px !important;
    }

    .header-layout2 .navbar__bottom .navbar-toggler .menu-lines {
        background: #fff !important;
    }

    .header-layout2 .navbar__bottom .navbar-toggler .menu-lines::before,
    .header-layout2 .navbar__bottom .navbar-toggler .menu-lines::after {
        background: #fff !important;
    }
}

@media (min-width: 320px) and (max-width: 767px) {
    .slider {
        overflow: hidden;
        margin-top: 60px;
    }
}