/* ==========================================================================
   Site header + footer modernization
   Loaded AFTER style.css / custom.css — overrides the CityTours theme header
   while preserving every JS contract:
     - header.sticky           (functions.js scroll handler)
     - .main-menu.show         (mobile drawer toggle)
     - li.submenu > ul         (dropdowns, hover on desktop / .show_normal mobile)
     - .megamenu .menu-wrapper (categories megamenu, .show_mega on mobile)
     - .cmn-toggle-switch      (hamburger)
     - .dropdown-cart          (Bootstrap data-toggle dropdown)
   Palette + type match the product page redesign (Fredoka / Nunito Sans,
   coral #FF6B4A, teal #1F7A6C, cream #FFF6EE, ink #241F1B).
   ========================================================================== */

/* ---------- Top line (announcement / account bar) ---------- */

header#plain #top_line {
    background: #1F7A6C;
    color: #EAF5F2;
    border-bottom: none;
    height: auto;
    padding: 8px 0;
    margin-bottom: 0;
    font-size: 12.5px;
    transition: all 0.2s ease-in-out;
}

/* keep the theme's collapse-on-sticky behavior working */
header#plain.sticky #top_line {
    height: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

header#plain #top_line a {
    color: #fff;
}

header#plain #top_line a:hover {
    color: #FFB238;
}

.top-line-msg {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #EAF5F2;
}

.top-line-msg i {
    color: #FFB238;
}

header#plain ul#top_links li {
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

header#plain ul#top_links li:first-child {
    border-left: none;
}

header#plain ul#top_links a {
    color: #fff;
    font-weight: 600;
}

header#plain ul#top_links :hover a {
    color: #FFB238;
}

/* ---------- Header shell ---------- */

/* The theme header is always position:fixed — page content clears it via
   .main-content padding. The old value (70px in custom.css) matched the old
   header height; the modernized header is taller. This is the CSS fallback;
   the master page syncs the exact value from the header's measured height. */
.main-content {
    padding-top: 130px;
}

header#plain {
    background-color: #fff;
    border-bottom: 1px solid #F0E2D6;
    padding-bottom: 0;
}

header#plain > .container > .row {
    align-items: center;
}

header#plain nav {
    margin-top: 14px !important;
}

header#plain.sticky nav {
    margin-top: 10px !important;
}

header#plain #logo img {
    height: 54px;
    width: auto;
    margin: 10px 0 8px;
    transition: height 0.2s ease;
}

header#plain.sticky #logo img {
    height: 44px;
    margin: 6px 0;
}

/* softer, glassy sticky bar */
header#plain.sticky {
    background-color: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-box-shadow: 0 6px 24px rgba(36, 31, 27, 0.10);
    -moz-box-shadow: 0 6px 24px rgba(36, 31, 27, 0.10);
    box-shadow: 0 6px 24px rgba(36, 31, 27, 0.10);
    border-bottom: none;
}

/* ---------- Desktop menu links ---------- */

header#plain .main-menu > ul > li > a {
    font-family: "Fredoka", "Nunito Sans", Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    color: #241F1B;
    padding: 8px 15px;
    border-radius: 22px;
    letter-spacing: 0.01em;
    transition: background-color 0.15s ease, color 0.15s ease;
}

header#plain .main-menu > ul > li:hover > a {
    color: #E24E2F;
    background-color: #FFF6EE;
}

/* Wholesale — highlighted item */
header#plain .main-menu > ul > li.menu-highlight > a {
    color: #fff;
    background-color: #FF6B4A;
}

header#plain .main-menu > ul > li.menu-highlight:hover > a {
    color: #fff;
    background-color: #E24E2F;
}

@media (min-width: 992px) and (max-width: 1200px) {
    header#plain .main-menu > ul > li > a {
        padding: 8px 10px;
        font-size: 13.5px;
    }
}

/* ---------- Dropdowns + megamenu (desktop) ---------- */

@media only screen and (min-width: 992px) {

    .main-menu ul ul,
    .main-menu ul li .menu-wrapper {
        border-top: 3px solid #FF6B4A;
        border-radius: 12px;
        -webkit-box-shadow: 0 14px 34px rgba(36, 31, 27, 0.14);
        box-shadow: 0 14px 34px rgba(36, 31, 27, 0.14);
    }

    .main-menu ul ul:before {
        border-bottom-color: #FF6B4A;
    }

    .main-menu ul ul li a {
        color: #4A4039;
        padding: 9px 14px;
    }

    .main-menu ul ul li:hover > a {
        color: #E24E2F;
        background-color: #FFF6EE;
        padding-left: 18px;
    }

    .main-menu ul li.megamenu .menu-wrapper {
        max-width: calc(100vw - 30px);
        padding: 18px 30px 24px !important;
    }

    .main-menu ul .menu-wrapper h3 {
        font-family: "Fredoka", "Nunito Sans", Arial, sans-serif;
        font-size: 14px;
        font-weight: 600;
        color: #241F1B;
        text-transform: none;
        border-bottom: 2px solid #FFE9D6;
        padding: 12px 0 8px;
    }

    .main-menu ul .menu-wrapper ul li a {
        border-radius: 8px;
        padding: 7px 10px;
    }
}

/* ---------- Cart button ---------- */

ul#top_tools {
    top: 4px;
}

header#plain ul#top_tools a.hdr-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #FF6B4A;
    color: #fff;
    padding: 7px 13px;
    border-radius: 20px;
    font-family: "Fredoka", "Nunito Sans", Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

header#plain ul#top_tools a.hdr-cart-btn:hover {
    background-color: #E24E2F;
    color: #fff;
    box-shadow: 0 6px 16px rgba(255, 107, 74, 0.35);
}

header#plain ul#top_tools a.hdr-cart-btn i {
    font-size: 14px;
    font-weight: normal;
}

/* Bootstrap's dropdown caret — keep it, but small and tight */
header#plain ul#top_tools a.hdr-cart-btn::after {
    margin-left: 1px;
    vertical-align: middle;
    opacity: 0.85;
}

.hdr-cart-count {
    background: #fff;
    color: #E24E2F;
    border-radius: 10px;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    text-align: center;
    font-size: 10.5px;
    font-weight: 800;
    padding: 0 5px;
}

/* ---------- Cart dropdown ---------- */

.dropdown-cart .dropdown-menu {
    border: 1px solid #F0E2D6;
    border-radius: 14px;
    -webkit-box-shadow: 0 14px 34px rgba(36, 31, 27, 0.14);
    box-shadow: 0 14px 34px rgba(36, 31, 27, 0.14);
    padding: 15px;
    margin-top: 12px;
}

.dropdown-cart .dropdown-menu:before {
    border-bottom-color: #FF6B4A;
}

.dropdown-cart .dropdown-menu a.button_drop {
    border-radius: 20px;
    border-color: #1F7A6C;
    color: #1F7A6C;
    font-weight: 700;
}

.dropdown-cart .dropdown-menu a.button_drop:hover {
    background-color: #1F7A6C;
    color: #fff;
}

/* ---------- Mobile drawer + hamburger ---------- */

@media only screen and (max-width: 991px) {

    /* nav's visible content is the off-canvas drawer, so the element is ~0px
       tall here — centering the row would push the absolutely-positioned
       hamburger/cart below the header. Top-align instead. */
    header#plain > .container > .row {
        align-items: flex-start;
    }

    /* restore the theme's compact mobile logo (source image is 200px wide —
       larger heights upscale and blur it) */
    header#plain #logo img,
    header#plain.sticky #logo img {
        height: 32px;
        margin: 8px 0 6px;
    }

    ul#top_tools,
    .sticky ul#top_tools {
        top: 6px;
    }

    .cmn-toggle-switch {
        top: 8px;
    }

    .main-menu {
        width: 78%;
        max-width: 340px;
    }

    #header_menu {
        background: #FFF6EE;
        padding: 22px 15px 14px;
    }

    .main-menu ul li {
        border-bottom: 1px solid #F6ECE1;
    }

    .main-menu ul li a {
        font-family: "Nunito Sans", Arial, sans-serif;
        font-weight: 600;
        font-size: 13.5px;
        padding: 12px 18px !important;
    }

    .main-menu ul li a:hover,
    a.show-submenu:hover,
    a.show-submenu:focus,
    a.show-submenu-mega:hover,
    a.show-submenu-mega:focus {
        color: #E24E2F !important;
        background-color: #FFF6EE;
    }

    .main-menu ul li.menu-highlight a {
        color: #E24E2F !important;
    }

    .main-menu h3 {
        font-family: "Fredoka", "Nunito Sans", Arial, sans-serif;
        color: #241F1B;
        font-size: 13px;
        padding: 10px 0 10px 18px;
        text-transform: none;
    }

    /* hamburger lines in brand coral */
    header#plain .cmn-toggle-switch span,
    header#plain .cmn-toggle-switch span::before,
    header#plain .cmn-toggle-switch span::after,
    header#plain.sticky .cmn-toggle-switch span::before,
    header#plain.sticky .cmn-toggle-switch span::after {
        background-color: #E24E2F;
        border-radius: 2px;
    }

    header#plain .cmn-toggle-switch__htx.active span {
        background: none !important;
    }

    /* compact cart pill on small screens */
    header#plain ul#top_tools a.hdr-cart-btn {
        padding: 7px 11px;
    }
}

@media only screen and (max-width: 480px) {
    .hdr-cart-label {
        display: none;
    }
}

/* ---------- Footer refresh ---------- */

footer {
    background: #241F1B;
    color: #B9AC9F;
    padding: 44px 0 14px;
}

.footer-links-block {
    font-size: 13.5px;
    line-height: 2.1;
    text-align: left;
    color: #8F8378;
    margin-bottom: 22px;
}

.footer-links-block strong {
    display: block;
    font-family: "Fredoka", "Nunito Sans", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FFF6EE;
    margin-bottom: 4px;
}

footer a {
    color: #D8CCC0;
}

footer a:hover {
    color: #FF8362;
}

#social_footer {
    border-top: 1px solid rgba(255, 246, 238, 0.12);
}

#social_footer ul li a {
    background: rgba(255, 246, 238, 0.08);
    color: #fff;
}

#social_footer ul li a:hover {
    background: #FF6B4A;
    color: #fff;
}

#social_footer p a {
    color: #8F8378;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    header#plain #top_line,
    header#plain #logo img,
    header#plain .main-menu > ul > li > a,
    header#plain ul#top_tools a.hdr-cart-btn {
        transition: none;
    }
}
