/* Site header (was an inline <style> in components/layouts/header.blade.php; Vue-mounted
   pages such as the cart strip <style> tags inside their #app root, so it lives here now). */
.custom-select-field {
    height: 60px;
    width: 100%;
    padding: 12px 25px;
}

.custom-div {
    display: -webkit-box;
}

.header-lower .menu-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-lower .menu-area .search-box {
    order: -1;
    width: 100%;
    margin-top: 10px;
}

.header-lower .menu-area .main-menu {
    order: 1;
}

/* Match search-bar component styles */
.search-box form {
    position: relative;
    float: none;
    width: 100%;
    z-index: 99;
}

.search-box form .form-group {
    position: relative;
    background: #fff;
    border-radius: 30px;
    margin-bottom: 0px;
}

/* .search-box .form-group div.relative {
    position: absolute;
    width: 100%;
} */

.search-box form .form-group input {
    position: relative;
    display: block;
    float: none;
    width: 100%;
    border: none;
    height: 40px;
    font-size: 17px;
    color: #848484;
    padding: 10px 40px 10px 25px;
    border-radius: 30px;
    border: 1px solid #f3f3f9;
}

.search-box form .form-group button:not(.clear-btn) {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 500ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #00A0A3;
}

.search-box form .form-group .clear-btn {
    position: absolute;
    top: 20px;
    right: 50px;
    transform: translateY(-50%);
    line-height: 49px;
    text-align: center;
    font-size: 14px;
    border: none;
    width: 30px;
    height: 30px;
    background: #00A0A3;
    border-radius: 50%;
    color: #fff;
    z-index: 2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box .form-group .relative {
    position: relative;
    width: 100%;
}

.search-box #searchHeaderResults.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    display: block;
    z-index: 999;
    margin-top: 0;
}

/* ---- Responsive header ----
   responsive.css pins the cart (.btn-box) with position:absolute; right:65px at most
   breakpoints, so it floated over the search bar and menu. Lay the row out with flex instead. */
.main-header.style-two .header-top .top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 4px;
}
/* .top-inner is also .clearfix: its ::before/::after became flex items and pulled
   Login/Register away from the right edge. */
.main-header.style-two .header-top .top-inner::before,
.main-header.style-two .header-top .top-inner::after {
    display: none;
}
.main-header.style-two .header-top .top-left,
.main-header.style-two .header-top .top-right {
    float: none !important;
    display: block !important;
    background: transparent !important;
}
.main-header.style-two .header-lower .outer-box,
.main-header .sticky-header .outer-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 24px;
    row-gap: 10px;
}
.main-header.style-two .header-lower .menu-area {
    flex: 1 1 0;
    min-width: 0;
}
.main-header .header-lower .btn-box,
.main-header .sticky-header .btn-box {
    position: static !important;
    right: auto !important;
    display: flex !important;
    margin-left: auto;
    flex: 0 0 auto;
}
.main-header .btn-box .cart-btn-top {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    /* Row 1: logo | cart + menu button. Row 2: full-width search. Up to 1199px the six menu
       links, search and cart don't fit on one row, so the menu moves behind the toggler. */
    .menu-area .mobile-nav-toggler {
        display: block;
    }
    .main-header.style-two .header-lower .menu-area {
        display: contents;
    }
    .main-header.style-two .header-lower .logo-box { order: 1; }
    .main-header.style-two .header-lower .btn-box { order: 2; }
    .main-header.style-two .header-lower .mobile-nav-toggler {
        order: 3;
        float: none;
        margin: 0;
    }
    .main-header.style-two .header-lower .search-box {
        order: 4;
        flex: 0 0 100%;
        width: 100%;
        margin: 0 0 10px;
    }
    .main-header.style-two .header-lower .main-menu {
        display: none;
    }
    /* Sticky (scroll) header: logo + cart only; its cloned menu overlapped them here. */
    .main-header .sticky-header .main-menu {
        display: none;
    }
}

@media (max-width: 575px) {
    .main-header.style-two .header-top .top-inner { justify-content: center; }
    .main-header.style-two .header-top .info li { margin: 0 6px; }
    .main-header.style-two .header-top .top-left li { margin-right: 12px; }
    .main-header.style-two .header-lower .outer-box { column-gap: 12px; }
    .main-header .logo-box .logo img { min-width: 110px; }
}

/* Mobile menu: no dark overlay over the page (the backdrop still closes the menu on tap). */
.mobile-menu .menu-backdrop,
.mobile-menu-visible .mobile-menu .menu-backdrop {
    background: transparent !important;
}


/* Mid desktop widths: the 18px link padding made the six menu items wrap onto a second
   line next to the search and cart. */
@media (min-width: 1200px) and (max-width: 1399px) {
    .main-header .header-lower .main-menu .navigation > li > a {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Logo starts on the same left edge as the page titles and page content. */
.main-header .logo-box .logo {
    padding-left: 0;
}

/* Desktop: search (fixed width) and the menu under it are centered between logo and cart. */
@media (min-width: 1200px) {
    .main-header.style-two .header-lower .menu-area {
        align-items: center;
    }
    .main-header.style-two .header-lower .menu-area .search-box {
        max-width: 720px;
    }
}
