/* ==========================================================================
   CREST MODE — UNIFIED LUXURY MOBILE NAVIGATION DRAWER
   Minimalist, Distinctive, Editorial Atelier Aesthetic
   ========================================================================== */

:root {
    --cm-mn-bg: #12161f;                 /* Deep midnight slate matching site's dark palette */
    --cm-mn-border: rgba(255, 255, 255, 0.08);
    --cm-mn-gold: #dfb76c;               /* Warm champagne gold thread accent */
    --cm-mn-text: #9aa2b0;               /* Soft silver-grey */
    --cm-mn-heading: #f4f6f8;            /* Crisp off-white */
    --cm-mn-hover: #ffffff;
    --cm-mn-active: #dfb76c;
}

/* ── Frosted Glass Backdrop ── */
.cm-mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 10, 15, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9998;
}

.cm-mobile-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ── Main Navigation Drawer Shell ── */
.cm-mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 86%;
    max-width: 380px;
    height: 100%;
    height: 100dvh;
    background-color: var(--cm-mn-bg);
    color: var(--cm-mn-text);
    z-index: 9999;
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.6);
    border-left: 1px solid var(--cm-mn-border);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    font-family: var(--secondary-font, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

.cm-mobile-nav-drawer *,
.cm-mobile-nav-drawer *::before,
.cm-mobile-nav-drawer *::after {
    box-sizing: border-box;
}

.cm-mobile-nav-drawer.active {
    transform: translateX(0);
}

/* ── Drawer Header (Logo & Close) ── */
.cm-mobile-nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--cm-mn-border);
    flex-shrink: 0;
    position: relative;
}

.cm-mobile-nav-logo {
    font-family: var(--primary-font, 'Poppins', sans-serif);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.22em;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.cm-mobile-nav-logo:hover {
    color: var(--cm-mn-gold);
}

.cm-mobile-nav-close {
    background: transparent;
    border: none;
    color: var(--cm-mn-text);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.25s ease;
    padding: 0;
}

.cm-mobile-nav-close svg {
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.cm-mobile-nav-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.cm-mobile-nav-close:hover svg {
    transform: rotate(90deg);
}

/* ── Scrollable Drawer Body ── */
.cm-mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 28px 20px;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for cleaner look */
.cm-mobile-nav-body::-webkit-scrollbar {
    width: 4px;
}
.cm-mobile-nav-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Group Headers */
.cm-mobile-nav-group {
    margin-bottom: 24px;
}

.cm-mobile-nav-heading {
    display: block;
    font-family: var(--primary-font, 'Poppins', sans-serif);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cm-mn-gold);
    margin-bottom: 14px;
    opacity: 0.9;
}

/* ── Primary Links (Editorial Boldness) ── */
.cm-mobile-primary-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-mobile-primary-links li {
    margin-bottom: 4px;
}

.cm-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--primary-font, 'Poppins', sans-serif);
    font-size: 1.05rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cm-mn-heading);
    text-decoration: none;
    padding: 10px 0;
    min-height: 44px;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.cm-mobile-link::after {
    content: '→';
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.2s ease, transform 0.2s ease;
}

.cm-mobile-link:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.cm-mobile-link:hover::after {
    color: var(--cm-mn-gold);
    transform: translateX(3px);
}

.cm-mobile-link.active {
    color: var(--cm-mn-gold);
    font-weight: 500;
}

.cm-mobile-link.active::after {
    content: '●';
    font-size: 0.55rem;
    color: var(--cm-mn-gold);
    transform: none;
}

/* ── Sartorial Hand-Sewn Seam Divider ── */
.cm-mobile-nav-stitch {
    position: relative;
    height: 16px;
    margin: 16px 0 24px;
}

.cm-mobile-nav-stitch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.cm-mobile-nav-stitch::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.8) 0px,
        rgba(223, 183, 108, 0.9) 1px,
        #f6e2b8 4px,
        rgba(223, 183, 108, 0.9) 6px,
        rgba(0, 0, 0, 0.8) 7px,
        transparent 7px,
        transparent 14px
    );
    opacity: 0.75;
}

/* ── Secondary Client Links ── */
.cm-mobile-secondary-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-mobile-secondary-links li {
    margin-bottom: 2px;
}

.cm-mobile-sublink {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--secondary-font, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--cm-mn-text);
    text-decoration: none;
    padding: 8px 0;
    min-height: 40px;
    width: 100%;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cm-mobile-sublink i {
    font-size: 13px;
    width: 16px;
    color: var(--cm-mn-gold);
    text-align: center;
}

.cm-mobile-sublink:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.cm-mobile-sublink.active {
    color: var(--cm-mn-gold);
    font-weight: 500;
}

/* ── Direct Concierge & Socials Box ── */
.cm-mobile-nav-concierge {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--cm-mn-border);
}

.cm-mobile-concierge-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(223, 183, 108, 0.25);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 400;
    margin-bottom: 16px;
    transition: all 0.25s ease;
}

.cm-mobile-concierge-pill i {
    font-size: 16px;
    color: #25D366; /* Official WhatsApp Green */
}

.cm-concierge-badge {
    margin-left: auto;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(37, 211, 102, 0.15);
    color: #25D366;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cm-concierge-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #25D366;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #25D366;
}

.cm-mobile-concierge-pill:hover {
    background: rgba(223, 183, 108, 0.08);
    border-color: var(--cm-mn-gold);
    transform: translateY(-1px);
}

/* Social Icon Row */
.cm-mobile-nav-socials {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cm-mobile-nav-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cm-mn-border);
    color: var(--cm-mn-text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.25s ease;
}

.cm-mobile-nav-socials a:hover {
    color: #ffffff;
    border-color: var(--cm-mn-gold);
    background: rgba(223, 183, 108, 0.1);
    transform: translateY(-2px);
}

/* ── Drawer Footer Meta ── */
.cm-mobile-nav-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--cm-mn-border);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: #6c7482;
    text-transform: uppercase;
    text-align: center;
}

/* ── Prevent body scrolling while drawer is open ── */
body.cm-nav-locked,
html.cm-nav-locked {
    overflow: hidden !important;
    touch-action: none;
}

/* ── Universal Mobile Toggle Hit Area & Reset ── */
.mobile-toggle,
#mobileToggle,
#hamburger,
.hamburger {
    display: none;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #111111;
    padding: 10px;
    margin: -10px;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    z-index: 1000;
}

@media (max-width: 768px) {
    .mobile-toggle,
    #mobileToggle,
    #hamburger,
    .hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}
