:root {
    color-scheme: light only;
    --primary: #9E292F;
    --primary-hover: #861F26;
    --primary-dim: #861F26;
    --primary-light: #F3DFE0;
    --secondary: #002B54;
    --secondary-hover: #0B3D68;
    --bg-color: #fffefd;
    /* --light: #F3ECE3; */
    --white: #FFFFFF;
    --pure-white: #FFFFFF;
    --border-color: #E8DED2;
    --text-color: #342E2D;
    --dark-color: #211D1D;
}

html,
body {
    color-scheme: light only;
    background-color: var(--bg-color);
}

body.dark {
    background-color: var(--bg-color);
    --pure-white: #FFFFFF;
    --primary-light: #F3DFE0;
    --text-color: #342E2D;
    --product-variant: #F5EFE8;
    --basket-item-variants: #F8F3ED;
    --white: #FFFFFF;
    --border-color: #E8DED2;
    --light: #F3ECE3;
}

body a:not(.btn):not([class*="button"]) {
    color: var(--secondary);
}

body a:not(.btn):not([class*="button"]):hover,
body a:not(.btn):not([class*="button"]):focus {
    color: var(--secondary-hover);
}

body a:not(.btn) > i,
body a:not(.btn) > svg {
    color: inherit;
}

.btn-primary,
.bg-primary,
button[type="submit"]:not(.btn-link) {
    color: #fff !important;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.bg-primary:hover,
button[type="submit"]:not(.btn-link):hover,
button[type="submit"]:not(.btn-link):focus,
button[type="submit"]:not(.btn-link):active {
    color: #fff !important;
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-secondary,
.bg-secondary {
    color: #fff !important;
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.bg-secondary:hover {
    color: #fff !important;
    background-color: var(--secondary-hover) !important;
    border-color: var(--secondary-hover) !important;
}

.btn-primary *,
.btn-secondary *,
button[type="submit"]:not(.btn-link) * {
    color: #fff !important;
}

/* Keep action icons white even when an older template supplies an inline icon color. */
.btn-primary i,
.btn-primary svg,
.btn-secondary i,
.btn-secondary svg,
button[type="submit"]:not(.btn-link) i,
button[type="submit"]:not(.btn-link) svg {
    color: #fff !important;
    fill: #fff !important;
    stroke: #fff !important;
}

.text-primary {
    color: var(--primary) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff !important;
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

::selection {
    color: #fff;
    background: var(--primary);
}

/* Shared storefront header: the homepage and inner pages use the same compact header. */
@media (min-width: 992px) {
    body header {
        padding-top: 0 !important;
        background: #fff !important;
    }

    body #header-top {
        min-height: 62px;
        margin: 0 !important;
        padding: 4px 0 6px !important;
        background: #fff;
    }

    body #header-top > .container,
    body #header-menu > .container {
        width: calc(100% - 40px);
        max-width: 1320px;
    }

    body #header-top > .container > .d-flex {
        min-height: 52px;
        gap: 20px;
    }

    body #search-input-wrapper,
    body #search-input-wrapper form {
        flex: 1;
    }

    body #searchInput {
        width: min(620px, 45vw);
        min-width: 300px !important;
        height: 40px !important;
        border: 1px solid #E8DED2 !important;
        border-radius: 10px !important;
        /* background: #FBF7F0 !important; */
    }

    body #site-logo {
        width: 112px !important;
        height: auto !important;
    }

    body #header-top .btn-with-icon {
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 13px !important;
        border-radius: 10px !important;
        font-size: .78rem !important;
    }

    body #header-top .btn-with-icon i {
        font-size: 1rem !important;
    }

    body #header-menu {
        height: 39px;
        margin: 0 !important;
        border-top: 1px solid #F0E8DE;
        border-bottom: 1px solid #E8DED2;
        background: #fff !important;
        box-shadow: 0 2px 10px rgba(0, 43, 84, .05);
    }

    body #header-menu > .container > .d-flex {
        min-height: 38px;
    }

    body #right-menu {
        gap: 2px;
        margin: 0;
    }

    body #right-menu > li > a,
    body #left-menu > li > a {
        min-height: 38px;
        padding: 0 10px;
        color: #2E3540;
        font-size: .74rem !important;
        font-weight: 700;
        border-bottom: 3px solid transparent;
    }

    body #right-menu > li > a:hover,
    body #left-menu > li > a:hover {
        color: var(--primary) !important;
        border-bottom-color: var(--primary);
    }

    body #right-menu > li:first-child > a {
        gap: 6px;
        color: var(--secondary);
        font-weight: 900;
    }

    body #right-menu > li > a > i {
        margin-inline-start: 4px;
        font-size: .72rem;
    }

    body #right-menu > li:first-child > a > .home-menu-bars {
        margin: 0;
        color: var(--secondary);
        font-size: .9rem;
    }
}

/* Final storefront header layout: readable, centered and consistently branded. */
body,
body header,
body #header-top,
body #header-menu {
    /* background-color: #FBF7F0 !important; */
}

@media (min-width: 992px) {
    body #header-top > .container > .d-flex {
        position: relative;
        min-height: 74px;
        align-items: center;
    }

    body #header-logo-wrapper {
        display: block;
        flex: 0 0 auto;
        z-index: 2;
    }

    body #search-input-wrapper {
        position: absolute !important;
        left: 50%;
        display: block !important;
        width: min(760px, 52vw) !important;
        max-width: none !important;
        transform: translateX(-50%);
        z-index: 1;
    }

    body #search-input-wrapper form {
        display: block;
        width: 100% !important;
        max-width: none !important;
    }

    body #searchInput {
        width: 100% !important;
        min-width: 100% !important;
        max-width: none !important;
        height: 52px !important;
        padding-inline: 22px 58px !important;
        font-size: 1rem !important;
        color: var(--secondary) !important;
        /* background: #FBF7F0 !important; */
    }

    body .header-actions {
        display: flex;
        align-items: center;
        gap: 22px;
        margin-right: auto;
        z-index: 2;
    }

    body .header-cart-link {
        position: relative;
        display: inline-flex;
        width: 32px;
        height: 42px;
        align-items: center;
        justify-content: center;
        color: var(--secondary) !important;
        background: transparent !important;
        font-size: 1.45rem;
    }

    body .header-cart-link > span:not(.cart-counter) {
        display: none !important;
    }

    body .header-cart-link .cart-counter {
        top: 0;
        right: -8px;
        width: 19px;
        height: 19px;
        border: 2px solid #FBF7F0;
        color: #fff;
        background: var(--primary);
        font-size: .65rem;
    }

    body .user-dropdown-trigger,
    body .header-actions > a.user-dropdown-trigger {
        display: inline-flex;
        align-items: center;
        min-height: 42px;
        color: var(--secondary) !important;
        background: transparent !important;
        font-size: 1rem;
        font-weight: 800;
        white-space: nowrap;
    }

    body .header-actions > a:not(.header-cart-link) .btn,
    body .header-actions .user-dropdown-wrapper > button {
        all: unset;
        color: var(--secondary) !important;
        cursor: pointer;
        font-size: 1rem;
        font-weight: 800;
    }

    body .header-login-link,
    body .header-login-text {
        display: inline-flex;
        min-height: 42px;
        align-items: center;
        color: var(--secondary) !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        font-size: 1rem;
        font-weight: 800;
        white-space: nowrap;
    }

    body .header-login-link i,
    body .header-login-text i {
        display: none !important;
    }

    body .header-actions > a:not(.header-cart-link) .btn i,
    body .header-actions .user-dropdown-wrapper > button i {
        display: none !important;
    }

    body .header-actions .user-dropdown a,
    body .header-actions .user-dropdown i,
    body .header-actions .user-dropdown button {
        color: var(--secondary) !important;
    }

    body #header-menu {
        height: auto !important;
        min-height: 52px;
        border-color: rgba(0, 43, 84, .14) !important;
        /* background: #FBF7F0 !important; */
    }

    body #header-menu > .container > .d-flex {
        min-height: 50px;
        justify-content: center !important;
    }

    body #right-menu,
    body #left-menu {
        gap: 4px;
    }

    body #right-menu > li > a,
    body #left-menu > li > a,
    body #right-menu > li > a[style] {
        min-height: 50px;
        padding: 0 13px;
        color: var(--secondary) !important;
        font-size: 1rem !important;
        font-weight: 800;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body #right-menu > li > a:hover,
    body #left-menu > li > a:hover {
        color: var(--secondary) !important;
        border-bottom-color: transparent !important;
    }

    body #right-menu > li > a > i {
        display: none !important;
    }

    body #right-menu > li:first-child > a {
        color: var(--secondary) !important;
        font-weight: 800 !important;
    }

    body #right-menu > li:has(> .simple-dropdown) > a {
        display: none !important;
    }

    body #right-menu > li:has(> .simple-dropdown) {
        display: contents;
    }

    body #right-menu > li:has(> .simple-dropdown) > .simple-dropdown {
        display: contents !important;
        position: static;
        min-width: 0;
        padding: 0;
        box-shadow: none;
    }

    body #right-menu > li:has(> .simple-dropdown) > .simple-dropdown a {
        display: inline-flex;
        min-height: 50px;
        align-items: center;
        padding: 0 13px;
        color: var(--secondary) !important;
        font-size: 1rem;
        font-weight: 800;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body #right-menu > li:has(> .simple-dropdown) > .simple-dropdown a:hover {
        color: var(--secondary) !important;
        background: transparent !important;
    }
}
