/* ============================================================
   Yellow Picnic — Global Navigation
   yp-nav.css | loaded site-wide EXCEPT the homepage template
   (the homepage ships this same nav via yp-homepage.css).
   ============================================================ */

:root {
    --yp-espresso:   #473B37;
    --yp-juniper:    #286841;
    --yp-ivory:      #F5F5F2;
    --yp-fawn:       #D9D6D0;
    --yp-onyx:       #221F1B;
    --yp-white:      #FFFFFF;
    --yp-black:      #000000;
    --yp-gray-light: #E8E5DF;
    --yp-gray-mid:   #9E9A95;
    --yp-espresso-hover: #413733;
    --yp-font-serif: 'Instrument Serif', Georgia, serif;
    --yp-font-sans:  'Montserrat', sans-serif;
    --yp-nav-h:      80px;
    --yp-radius:     4px;
    --yp-t-btn:  background-color 180ms ease, border-color 180ms ease, color 180ms ease, opacity 180ms ease;
    --yp-t-link: color 180ms ease, opacity 180ms ease, transform 180ms ease;
    --yp-pad-h-desk: 80px;
    --yp-pad-h-mob:  24px;
}

/* Replace Salient's header with the YP nav site-wide.
   #header-space is Salient's spacer that reserves room for the (now hidden)
   fixed header — hide it too or it leaves a large gap at the top. */
#header-outer,
#header-secondary-outer,
#header-space,
.nectar-mobile-menu-holder { display: none !important; }

.yp-nav, .yp-nav *, .yp-nav *::before, .yp-nav *::after { box-sizing: border-box; }

/* ── Nav ──────────────────────────────────────────────────── */
.yp-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--yp-ivory);
    border-bottom: 1px solid var(--yp-fawn);
    height: var(--yp-nav-h);
    font-family: var(--yp-font-sans);
}
.yp-nav__right .yp-btn { width: auto !important; height: 37px !important; padding: 0 20px !important; }
.yp-nav__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--yp-pad-h-desk);
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}
.yp-nav__left,
.yp-nav__right { display: flex; align-items: center; gap: 30px; }
.yp-nav__right { justify-content: flex-end; }
.yp-nav__left a,
.yp-nav__right a:not(.yp-btn) {
    font-family: var(--yp-font-sans);
    font-size: 14px;
    font-weight: 400;
    color: var(--yp-black);
    text-decoration: none;
    transition: var(--yp-t-link);
    text-underline-offset: 2px;
}
.yp-nav__left a:hover,
.yp-nav__right a:not(.yp-btn):hover {
    text-decoration: underline;
    text-decoration-color: rgba(34,31,27,0.7);
    text-decoration-thickness: 1px;
}
/* Account dropdown (shown when logged in) */
.yp-nav__account { position: relative; display: flex; align-items: center; height: 100%; }
.yp-nav__account-toggle {
    font-family: var(--yp-font-sans);
    font-size: 14px;
    font-weight: 400;
    color: var(--yp-black);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.yp-nav__caret { font-size: 10px; line-height: 1; }
.yp-nav__account-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 230px;
    background: var(--yp-white);
    border: 1px solid var(--yp-fawn);
    border-radius: var(--yp-radius);
    padding: 6px 0;
    box-shadow: 0 10px 28px rgba(34,31,27,0.14);
    display: none;
    flex-direction: column;
    z-index: 1001;
}
.yp-nav__account:hover .yp-nav__account-menu,
.yp-nav__account:focus-within .yp-nav__account-menu { display: flex; }
.yp-nav__account-menu a {
    font-family: var(--yp-font-sans);
    font-size: 14px;
    font-weight: 400;
    color: var(--yp-espresso);
    text-decoration: none;
    padding: 11px 20px;
    white-space: nowrap;
    transition: background-color 120ms ease;
}
.yp-nav__account-menu a:hover { background: var(--yp-ivory); }

.yp-nav__logo {
    font-family: var(--yp-font-serif);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    color: var(--yp-espresso);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.yp-nav__logo-img { max-height: 44px; width: auto; display: block; }

.yp-nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    padding: 4px;
}
.yp-nav__hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--yp-espresso);
    transition: var(--yp-t-link);
}
/* Figma: 2-line hamburger — hide the middle span */
.yp-nav__hamburger span:nth-child(2) { display: none; }

.yp-nav__mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;        /* fallback for browsers without svh */
    height: 100svh;       /* cover only the visible viewport (no URL-bar gap) */
    min-height: 100svh;
    background: var(--yp-ivory);
    z-index: 100000;      /* above Salient's header, slide-out menu, and all page content */
    transform: translateX(-100%);
    transition: transform 300ms ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}
.yp-nav__mobile-overlay.is-open { transform: translateX(0); }

/* Top bar inside the overlay: close (×) left, logo centered */
.yp-nav__mobile-bar {
    position: relative;
    flex: 0 0 60px;
    background: var(--yp-ivory);
    border-bottom: 1px solid var(--yp-fawn);
}
.yp-nav__close {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* SVG close icon: 14×14px inside the 20×20 touch target */
    color: var(--yp-onyx);
    cursor: pointer;
}
.yp-nav__close svg { display: block; }
.yp-nav__mobile-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    font-family: var(--yp-font-serif);
    font-size: 18px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--yp-espresso);
    text-decoration: none;
}
.yp-nav__mobile-logo img { max-height: 31px; width: auto; display: block; }

/* Utility strip: Log In | FAQ */
.yp-nav__mobile-util {
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--yp-white);
}
.yp-nav__mobile-util a {
    font-family: var(--yp-font-sans);
    font-size: 12px;
    font-weight: 400;
    color: var(--yp-black);
    text-decoration: none;
}

/* Link rows */
/* Figma: container has NO horizontal padding — padding moves to each link
   so the divider border-bottom runs full edge-to-edge (393px wide) */
.yp-nav__mobile-links {
    display: flex;
    flex-direction: column;
    background: var(--yp-ivory);
    padding: 0;
}
.yp-nav__mobile-links > a {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 24px;
    font-family: var(--yp-font-sans);
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    color: var(--yp-black);
    text-decoration: none;
    border-bottom: 1px solid var(--yp-fawn);
}
/* CTA row: 84px tall container, button 44px × full-width, padding 0 20px */
.yp-nav__mobile-cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 84px;
    padding: 0 24px;
    border-bottom: 1px solid var(--yp-fawn);
}
.yp-nav__mobile-overlay .yp-nav__mobile-cta-row .yp-btn {
    width: 100% !important;
    height: 44px !important;
    padding: 0 20px !important;
    border-radius: 0 !important;
    letter-spacing: 0.12em !important;
}

/* Promo offer fills the remaining space */
.yp-nav__mobile-promo {
    flex: 1 0 auto;
    display: flex;
    align-items: flex-start;
    padding: 24px;
    background: var(--yp-ivory);
}
.yp-nav__mobile-promo-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-family: var(--yp-font-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yp-espresso);
    text-decoration: none;
}
.yp-nav__mobile-promo-arrow { font-size: 14px; line-height: 1; }

/* ── Buttons in the mobile overlay only ───────────────────── */
.yp-nav__mobile-overlay .yp-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    padding: 0 28px !important;
    font-family: var(--yp-font-sans) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    border: 1.5px solid transparent !important;
    border-radius: 0 !important;
    transition: var(--yp-t-btn) !important;
    white-space: nowrap !important;
    line-height: normal !important;
    cursor: pointer !important;
    text-decoration: none !important;
}
.yp-nav__mobile-overlay .yp-btn--espresso {
    background: var(--yp-espresso) !important;
    color: var(--yp-white) !important;
    border-color: var(--yp-espresso) !important;
}
.yp-nav__mobile-overlay .yp-btn--full { width: 100% !important; }

/* ── Desktop nav CTA — Figma: 37px tall, auto width, px-20, sharp corners ── */
/* Placed AFTER the overlay block so !important specificity wins correctly    */
.yp-nav__right .yp-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 37px !important;
    padding: 0 20px !important;
    font-family: var(--yp-font-sans) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    white-space: nowrap !important;
    line-height: normal !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: var(--yp-t-btn) !important;
}
.yp-nav__right .yp-btn--espresso {
    background: var(--yp-espresso) !important;
    color: var(--yp-white) !important;
    border: none !important;
    position: relative !important;
}
.yp-nav__right .yp-btn--espresso::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--yp-onyx);
    opacity: 0;
    transition: opacity 180ms ease;
}
.yp-nav__right .yp-btn--espresso:hover::after,
.yp-nav__right .yp-btn--espresso:focus-visible::after { opacity: 0.15; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 767px) {
    :root { --yp-nav-h: 60px; }
    .yp-nav__left,
    .yp-nav__right { display: none; }
    .yp-nav__inner {
        grid-template-columns: 48px 1fr 48px;
        padding: 0 var(--yp-pad-h-mob);
    }
    .yp-nav__hamburger { display: flex; }
    .yp-nav__logo { font-size: 18px; }
}
