/* ==========================================================================
   WWR NAVIGATION
   ========================================================================== */

/* ── Desktop floating pill ── */
.custom-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid #588157;
    border-radius: 20px;
    padding: 10px 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    max-width: 90%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.custom-nav a {
    text-decoration: none;
    color: #333;
    font-family: 'DM Serif Display', serif;
    font-weight: 500;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.custom-nav a:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.04);
}

/* When the page has been scrolled — fully opaque so it reads clearly over light sections */
.custom-nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    border-color: #588157;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}


/* ── Hamburger button ── */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
}

.hamburger-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 15px;
    padding: 12px;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    outline: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X when active */
.hamburger-btn.active .hamburger-icon:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.hamburger-btn.active .hamburger-icon:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active .hamburger-icon:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ── Mobile full-screen overlay ── */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 28px;
    padding: 16px 40px;
    border-radius: 15px;
    min-width: 200px;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.mobile-menu-overlay a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
    transform: scale(1.04);
}

/* Lock body scroll when overlay is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ── Cart icon inside nav ── */
.custom-nav .wwr-cart-icon-link {
    margin-left: 8px;
    padding: 6px 8px;
    color: #333;
    border-left: 1px solid rgba(0,0,0,0.1);
}

.custom-nav .wwr-cart-icon-link:hover {
    color: #588157;
    background: rgba(0,0,0,0.04);
}

/* ── Mobile floating cart button (FAB) ── */
.wwr-mobile-cart-fab {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    .wwr-mobile-cart-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 24px;
        left: 20px;
        z-index: 2147483646;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: #2d3f2b;
        box-shadow: 0 4px 18px rgba(45,63,43,0.38);
        /* Same stacking-context trick used by the nav to escape Divi transforms */
        transform: translateZ(9999px);
        isolation: isolate;
        will-change: transform;
    }

    .wwr-mobile-cart-fab .wwr-cart-icon-link {
        color: #fff;
        padding: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    .wwr-mobile-cart-fab .wwr-cart-icon-link:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }

    .wwr-mobile-cart-fab .wwr-cart-badge {
        top: -4px;
        right: -4px;
        background: #c0392b;
        min-width: 18px;
        height: 18px;
        font-size: 11px;
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .custom-nav {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: block;
    }
}

/* ── Breadcrumb (used on retreat, cart, checkout pages) ── */

.wwr-breadcrumb {
    display: block;
}

.wwr-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
    font-weight: 500;
}

.wwr-breadcrumb-item {
    display: flex;
    align-items: center;
    color: #6b7068;
}

.wwr-breadcrumb-item + .wwr-breadcrumb-item::before {
    content: '/';
    margin: 0 7px;
    opacity: 0.5;
}

.wwr-breadcrumb-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.wwr-breadcrumb-item a:hover {
    color: #2d3f2b;
}

.wwr-breadcrumb-item--current {
    color: #2c2c2c;
    font-weight: 600;
    /* truncate long retreat titles */
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Breadcrumb on pages (cart, checkout, my-account) */
.wwr-page-breadcrumb {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .wwr-breadcrumb-item--current {
        max-width: 130px;
    }
}
