/*
 * CBD Shop France - Custom Header Styles
 * Pixel-perfect recreation from WordPress reference
 */

/* ========================================================================== */
/*                              CSS Variables                                  */
/* ========================================================================== */
:root {
    --cbd-primary: #004437;
    --cbd-primary-light: #004437;
    --cbd-secondary: #ADD66C;
    --cbd-accent: #FFD517;
    --cbd-text: #3D3D3D;
    --cbd-text-light: #BCBCBC;
    --cbd-bg-light: #F9F9F9;
    --cbd-border: #f2f2f2;
    --cbd-border-dark: #E6E9EF;
    --cbd-font: "Neufile Grotesk Variable", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --cbd-max-width: 1390px;
}

/* ========================================================================== */
/*                    Override default PrestaShop header styles                */
/* ========================================================================== */
#header {
    background: #fff;
    box-shadow: none;
    position: relative;
    top: 0;
    z-index: 1000;
}

#header .header-banner,
#header .header-nav,
#header .header-top {
    all: unset;
    display: block;
}

/* ========================================================================== */
/*                         ROW 1: Top Bar (green)                             */
/* ========================================================================== */
.cbd-topbar {
    background-color: var(--cbd-primary);
    padding: 11px 20px;
    width: 100%;
    box-sizing: border-box;
}

.cbd-topbar__inner {
    max-width: var(--cbd-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbd-topbar__text {
    color: #99b4af;
    font-size: 15px;
    line-height: 29px;
    margin: 0;
    text-align: center;
    font-family: var(--cbd-font);
}

.cbd-topbar__text strong {
    font-weight: 700;
    color: #99b4af;
}

/* ========================================================================== */
/*                       ROW 2: Main Header                                   */
/* ========================================================================== */
.cbd-header-main {
    background-color: #fff;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.cbd-header-main__inner {
    max-width: var(--cbd-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Logo */
.cbd-header-main__logo {
    flex-shrink: 0;
}

.cbd-header-main__logo a {
    display: block;
}

.cbd-header-main__logo img {
    display: block;
    width: 172px;
    height: 84px;
    object-fit: contain;
}

/* ========================================================================== */
/*                           Search Bar                                       */
/* ========================================================================== */
.cbd-header-main__search {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.as_ps_searchbar {
    border: 1px solid var(--cbd-primary-light);
    border-radius: 10px;
    overflow: hidden;
}

.as_ps_searchbar form.search-form {
    display: flex;
    width: 40vw;
}

.as_ps_searchbar input.search-input {
    width: 100%;
    border: none;
    border-top-left-radius: 9px;
    border-bottom-left-radius: 9px;
    padding: 20px;
    background: var(--cbd-bg-light);
    font-weight: 700;
    font-size: 15px;
    color: #acaaa6;
    outline: 0;
    font-family: var(--cbd-font);
    box-sizing: border-box;
}

.as_ps_searchbar input.search-input::placeholder {
    color: #acaaa6;
    font-weight: 700;
}

.as_ps_searchbar button.search-button {
    border: none;
    border-top-right-radius: 9px;
    border-bottom-right-radius: 9px;
    padding: 0 30px;
    background: var(--cbd-bg-light);
    color: green;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.5s;
    font-family: var(--cbd-font);
    white-space: nowrap;
}

.as_ps_searchbar button.search-button:hover {
    background: var(--cbd-primary-light);
    color: #fff;
}

/* ========================================================================== */
/*                      Account / Wishlist / Cart Buttons                     */
/* ========================================================================== */
.cbd-header-main__account {
    flex-shrink: 0;
}

.as-ps-account-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    align-items: center;
}

.as-ps-account-buttons .login-resgister-container {
    display: flex;
    align-items: center;
}

.as-ps-account-buttons .login-resgister-container .right-side {
    padding-left: 11px;
    font-weight: 700;
    font-size: 13px;
    line-height: 22px;
    color: var(--cbd-text);
    text-align: left;
    font-family: var(--cbd-font);
    white-space: nowrap;
}

.as-ps-account-buttons .login-resgister-container .right-side .hello {
    font-family: var(--cbd-font);
    font-weight: 700;
    color: var(--cbd-text-light);
    font-size: 13px;
}

.as-ps-account-buttons .login-resgister-container .right-side a {
    font-family: var(--cbd-font);
    font-weight: 700;
    color: var(--cbd-text);
    text-decoration: none;
    font-size: 13px;
}

.as-ps-account-buttons .login-resgister-container .right-side a:hover {
    color: var(--cbd-primary-light);
}

.as-ps-account-buttons .login-resgister-container .right-side .line-text {
    color: var(--cbd-text-light);
    margin: 0 2px;
}

.as-ps-account-buttons .icon {
    color: var(--cbd-primary-light);
    height: 50px;
    width: 50px;
    border-radius: 12px 12px 28px 12px;
    line-height: 56px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}

.as-ps-account-buttons .icon svg {
    width: 24px;
    height: 24px;
    fill: var(--cbd-primary-light);
}

.as-ps-account-buttons .icon--user {
    background: rgba(173, 214, 108, 0.2);
}

.as-ps-account-buttons .icon--wishlist {
    transition: all 0.3s;
    background: rgba(52, 119, 88, 0.1);
}

.as-ps-account-buttons .icon--wishlist:hover {
    background: rgba(52, 119, 88, 0.2);
}

.as-ps-account-buttons .icon--cart {
    transition: all 0.3s;
    background: rgba(244, 195, 64, 0.2);
}

.as-ps-account-buttons .icon--cart:hover {
    background: rgba(244, 195, 64, 0.4);
}

.cart-products-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--cbd-primary-light);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: var(--cbd-font);
}

/* ========================================================================== */
/*                       ROW 3: Navigation Bar                                */
/* ========================================================================== */
.cbd-navbar {
    background-color: #fff;
    padding: 10px 20px;
    width: 100%;
    box-sizing: border-box;
}

.cbd-navbar__inner {
    max-width: var(--cbd-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Categories dropdown */
.cbd-navbar__categories {
    flex-shrink: 0;
    position: relative;
    max-width: 16%;
    border-right: 1px solid var(--cbd-border);
}

.select_box {
    box-sizing: border-box;
    padding: 15px;
    position: relative;
}

#select-op-btn {
    display: block;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="%233D3D3D" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 10px 6px;
    font-family: var(--cbd-font);
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 0.288px;
    color: var(--cbd-text);
    cursor: pointer;
    transition: all 0.3s ease;
    padding-right: 20px;
    white-space: nowrap;
}

#select-op-btn:hover {
    color: var(--cbd-primary-light);
}

ul#options {
    position: absolute;
    left: 0;
    top: 60px;
    z-index: 9999;
    background: #fff;
    height: auto;
    overflow: visible;
    width: 260px;
    list-style-type: none;
    font-size: 0px;
    border-color: var(--cbd-border);
    border-style: solid;
    border-width: 0px 1px 1px 1px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    display: none;
}

ul#options.is-open {
    display: block;
}

ul#options li {
    border-bottom: 1px solid #eee;
    padding: 15px;
    list-style: none;
}

ul#options li a {
    display: block;
    color: #777;
    font-size: 16px;
    font-family: var(--cbd-font);
    font-weight: 700;
    line-height: 24px;
    text-decoration: none;
}

ul#options li a label {
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

ul#options li:hover {
    background: #fafafa;
}

ul#options li a:hover,
ul#options li a:hover label {
    color: var(--cbd-primary-light);
}

/* Navigation links */
.cbd-navbar__nav {
    flex: 1;
    padding-left: 30px;
}

.cbd-navbar__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: center;
}

.cbd-navbar__menu li {
    list-style: none;
}

.cbd-navbar__menu li a {
    display: block;
    color: #000;
    font-family: var(--cbd-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-decoration: none;
    padding: 10px 15px;
    transition: color 0.3s;
    white-space: nowrap;
}

.cbd-navbar__menu li a:hover {
    color: var(--cbd-primary-light);
}

/* CTA Button */
.cbd-navbar__cta {
    flex-shrink: 0;
    max-width: 20vw;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
}

.cbd-cta-button {
    display: inline-block;
    background-color: #1f4037;
    color: #ffd516 !important;
    font-family: "Neufile Grotesk Variable" !important;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.4;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
}

.cbd-cta-button:hover {
    background-color: #ffd516;
    color: #1f4037 !important;
    text-decoration: none;
}

/* ========================================================================== */
/*                            Mobile Menu                                     */
/* ========================================================================== */
.cbd-mobile-menu-toggle {
    display: none;
}

.cbd-mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
}

.cbd-mobile-menu-overlay.is-open {
    display: block;
}

.cbd-mobile-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 99999;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    box-sizing: border-box;
}

.cbd-mobile-menu.is-open {
    left: 0;
}

.cbd-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cbd-border);
}

.cbd-mobile-menu__header img {
    width: 140px;
    height: auto;
}

.cbd-mobile-menu__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbd-mobile-menu__close svg {
    width: 24px;
    height: 24px;
    fill: var(--cbd-text);
}

.cbd-mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cbd-mobile-menu__list li {
    list-style: none;
}

.cbd-mobile-menu__list li a {
    display: block;
    padding: 12px 0;
    color: var(--cbd-text);
    font-family: var(--cbd-font);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid var(--cbd-border);
    transition: color 0.3s;
}

.cbd-mobile-menu__list li a:hover {
    color: var(--cbd-primary-light);
}

.cbd-mobile-menu__separator {
    height: 1px;
    background: var(--cbd-border-dark);
    margin: 15px 0;
}

.cbd-mobile-menu__list--secondary li a {
    font-size: 16px;
    font-weight: 700;
    color: #777;
}

/* ========================================================================== */
/*                         Responsive: Tablet                                 */
/* ========================================================================== */
@media screen and (max-width: 1024px) {
    .cbd-header-main__inner {
        gap: 15px;
    }

    .as_ps_searchbar form.search-form {
        width: 30vw;
    }

    .as-ps-account-buttons .login-resgister-container .right-side {
        display: none;
    }

    .cbd-navbar__cta {
        display: none;
    }

    .cbd-navbar__categories {
        max-width: 25%;
    }
}

/* ========================================================================== */
/*                         Responsive: Mobile                                 */
/* ========================================================================== */
@media screen and (max-width: 767px) {

    /* Top bar */
    .cbd-topbar {
        padding: 20px;
    }

    .cbd-topbar__text {
        text-align: center;
        font-size: 13px;
        line-height: 22px;
    }

    /* Main header */
    .cbd-header-main {
        padding: 15px;
    }

    .cbd-header-main__inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .cbd-header-main__logo {
        flex: 0 0 auto;
    }

    .cbd-header-main__logo img {
        width: 120px;
        height: auto;
    }

    /* Mobile menu burger */
    .cbd-mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
        background: var(--cbd-primary-light);
        border-radius: 12px 12px 28px 12px;
        border: none;
        cursor: pointer;
        order: -1;
    }

    .cbd-mobile-menu-toggle svg {
        fill: #fff;
        width: 24px;
        height: 24px;
    }

    /* Search bar mobile */
    .cbd-header-main__search {
        order: 10;
        flex: 1 1 100%;
    }

    .as_ps_searchbar form.search-form {
        width: 100%;
        max-width: 100%;
    }

    /* Account buttons fixed bottom bar */
    .cbd-header-main__account.account_buttons_container {
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 9999;
        background: white;
        width: 100vw !important;
        max-width: 100vw !important;
        box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.3) !important;
        padding: 10px 15px !important;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
    }

    .as-ps-account-buttons {
        gap: 15px;
        justify-content: center;
    }

    .as-ps-account-buttons .login-resgister-container .right-side {
        display: none;
    }

    /* Navbar hidden on mobile */
    .cbd-navbar {
        display: none;
    }

    /* Padding bottom for fixed bottom bar */
    body {
        padding-bottom: 80px;
    }
}

/* Fix label text-align */
label, .label {
    color: #414141;
    text-align: left;
    font-size: .875rem;
}

#wrapper .breadcrumb li::after {
    content: "/";
    color: #004437;
    font-family: "Font Awesome 5 Pro";
    margin: .3125rem;
}

