/* Solución definitiva: Oculta el botón hamburguesa cuando la sidebar está abierta */
body.sidebar-open .menu-toggle-v2 {
    display: none !important;
}
/* Oculta el botón hamburguesa cuando la sidebar está abierta */
.nav-sidebar.open ~ .menu-toggle-v2,
.nav-sidebar.open + .menu-toggle-v2 {
    display: none !important;
}

.nav-sidebar {
  right: -100% !important; /* Oculto por defecto */
  z-index: 10000;
}
.nav-sidebar.open {
  right: 0 !important; /* Visible solo cuando abierto */
}

@media (max-width: 1024px) {
    .nav-sidebar {
        pointer-events: none !important;
    }
    .nav-sidebar.open {
        pointer-events: auto !important;
    }
}
/* ==========================================================================
   1. VARIABLES Y RESET LUXURY
   ========================================================================== */
:root {
    --oro: #a1816b;
    --oro-claro: #e7d7c7;
    --crema: #f9f7f2;
    --texto: #2c2c2c;
    --texto-gris: #666666;
    --blanco: #ffffff;
    --fuente-titulos: 'Cormorant Garamond', serif;
    --fuente-cuerpo: 'Montserrat', sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html.no-scroll, html.no-scroll body { overflow: hidden; }

/* ==========================================================================
   2. HEADER ESTRUCTURA (GENERAL)
   ========================================================================== */
.header-aruma-main {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 80px;
    background: transparent;
    z-index: 9999;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.header-scrolled, body:not(.home) .header-aruma-main {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 36px 48px 24px 48px;
    width: 100%;
    gap: 32px;
}

/* --- LOGO --- */
.logo-wrapper {
    position: relative;
    width: 260px;
    flex-shrink: 0;
}

.logo-img {
    position: absolute;
    top: 0px; left: 0;
    transform: translateY(-40%);
    height: 160px;
    width: auto !important;
    object-fit: contain;
    transition: var(--transition);
}

.header-scrolled .logo-img, body:not(.home) .logo-img {
    height: 150px;
    transform: translateY(-50%);
}

/* ==========================================================================
   3. NAVEGACIÓN DESKTOP
   ========================================================================== */
.nav-main-list {
    display: flex;
    gap: 45px;
    list-style: none;
    align-items: center;
    margin-top: 0px;
}

.nav-main-list > li { position: relative; }

.nav-main-list > li > a {
    text-decoration: none;
    font-family: var(--fuente-cuerpo);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--blanco);
    font-weight: 500;
    transition: var(--transition);
     position: relative;
}


.header-scrolled .nav-main-list > li > a, 
body:not(.home) .nav-main-list > li > a {
    color: var(--texto);
}

/* Punto Dorado Hover */
.nav-main-list > li > a::after {
    content: '';
    position: absolute;
    bottom: -12px; left: 50%;
    width: 5px; height: 5px;
    background-color: var(--oro);
    border-radius: 50%;
    transform: translateX(-50%) scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-main-list > li:hover > a::after { transform: translateX(-50%) scale(1); }

.btn-header-luxury {
    background: var(--oro);
    color: #fff !important;
    padding: 12px 25px;
    font-size: 11px;
    letter-spacing: 1px;
    border-radius: 2px;
}

/* ==========================================================================
   4. MEGA MENÚ PREMIUM (Desktop)
   ========================================================================== */
/* El li crea un puente invisible hacia abajo */
.has-mega-menu {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* El mega menú tiene un pseudo-elemento que actúa de puente */
.mega-menu-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1250px, calc(100vw - 80px));
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px) saturate(120%);
    padding-left: 50px;
    box-shadow: 0 12px 48px 0 rgba(161,129,107,0.22), 0 8px 32px 0 rgba(0,0,0,0.18), 0 1.5px 8px 0 rgba(0,0,0,0.12);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
    /* Puente invisible hacia arriba */
    margin-top: 0;
}

/* Pseudo-elemento que cubre el gap entre el li y el menú */
.mega-menu-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}
.mega-menu-container.mega-visible {
    visibility: visible;
    pointer-events: all;
    animation: megaReveal 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes megaReveal {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); clip-path: inset(0 0 100% 0); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0px);  clip-path: inset(0 0 0 0); }
}



.mega-content-wrapper {
    display: grid;
  grid-template-columns: repeat(4, 1fr) 320px;
    gap: 0;
    align-items: stretch;
}

/* Forzar color marca en links (Evita el azul) */
.mega-menu-container a, 
.mega-submenu-list a {
    color: var(--texto-gris) !important;
    text-decoration: none !important;
    font-family: var(--fuente-cuerpo);
    font-size: 15px;
    display: block;
    padding: 6px 0 !important;
    transition: 0.3s ease;
}

/* Hover premium: sin mover el layout */
.mega-menu-container a,
.mega-submenu-list a {
  position: relative;
  padding: 6px 0 !important;
  transition: color .25s ease, opacity .25s ease, transform .25s ease;
}

.mega-menu-container a::after,
.mega-submenu-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1px;
  background: rgba(161,129,107,.55);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.mega-menu-container a:hover,
.mega-submenu-list a:hover {
  color: var(--oro) !important;
  transform: translateX(2px);
}

.mega-menu-container a:hover::after,
.mega-submenu-list a:hover::after {
  transform: scaleX(.55);
}

/* Columnas */
.mega-col {
   padding: 36px 34px;
    position: relative;
    border-right: 1px solid rgba(161, 129, 107, 0.1);
}

.mega-col h4 {
    font-family: var(--fuente-titulos);
    color: var(--oro);
    font-size: 18px;
    font-style: italic;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--crema);
    padding-bottom: 15px;
    letter-spacing: 1px;
}

/* Submenús Acordeón Desktop */
.mega-submenu-list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, max-height 0.35s ease; /* El JS maneja el max-height */
}

.mega-submenu.active > .mega-submenu-list {
    opacity: 1;
    padding: 8px 0 10px 10px;
    max-height: 250px;
    overflow-y: auto;
}

.mega-submenu-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    font-family: var(--fuente-cuerpo);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--oro);
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--oro);
}

.mega-submenu-title::after {
    content: '▾';
    font-size: 14px;
    margin-left: 10px;
    transition: transform 0.3s ease;
    color: var(--oro);
}


.mega-submenu.active > .mega-submenu-list{
  padding: 10px 0 14px 12px;
  max-height: 180px;   /* antes 250, se sentía gigante */
  overflow-y: auto;
}

/* Scrollbar fino (solo desktop webkit) */
.mega-submenu-list::-webkit-scrollbar{ width: 6px; }
.mega-submenu-list::-webkit-scrollbar-thumb{
  background: rgba(161,129,107,.35);
  border-radius: 10px;
}
.mega-submenu-list::-webkit-scrollbar-track{
  background: rgba(0,0,0,.03);
}

/* Imagen Lateral */
.mega-image-col{
  min-height: auto;
  padding: 36px 28px;
  margin-top: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.mega-image-col img{
  width: 150px;
  height: 150px;
    object-fit: cover;  
    transition: transform 1.5s ease;
}

.mega-menu-container:hover .mega-image-col img { transform: scale(1.08); }

.image-overlay-text {
    position: absolute;
    bottom: 40px; right: 40px;
    font-family: var(--fuente-titulos);
    font-size: 38px;
    font-style: italic;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 5;
}

.mega-vertical-label {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%) rotate(-180deg);
    writing-mode: vertical-rl;
    font-family: var(--fuente-cuerpo);
    font-size: 10px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--oro);
    opacity: 0.5;
}

/* =============================================
   OVERLAY — fix global (fuera de media queries)
============================================= */
.sidebar-overlay {
    display: none !important;
    pointer-events: none !important;
}

.sidebar-overlay.active {
    display: block !important;
    pointer-events: auto !important;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
}

/* ==========================================================================
   5. RESPONSIVE (Sidebar & Mobile)
   ========================================================================== */

@media (min-width: 1025px) {
    
    .nav-sidebar {
        display: none !important;
        right: -100% !important;
    }
   
    .menu-toggle-v2 {
        display: none !important;
    }
    .sidebar-btn-sticky {
        display: none !important;
    }
    .close-sidebar {
        display: none !important;
    }
}
@media (max-width: 1024px) {
    .nav-desktop { display: none !important; }

    /* Hamburguesa */
    .menu-toggle-v2 {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        background: none; border: none;
        width: 44px; height: 44px;
        align-items: center; justify-content: center;
        position: relative; top: 50px;
        z-index: 10201; cursor: pointer;
    }

    .menu-toggle-v2 span {
        width: 28px; height: 3px;
        border-radius: 2px;
        background: var(--blanco);
        box-shadow: 0 1px 2px rgba(161,129,107,0.08);
    }

    .header-scrolled .menu-toggle-v2 span, 
    body:not(.home) .menu-toggle-v2 span { background: var(--oro); }

    .header-aruma-main { height: 70px !important; }

    /* Logo Mobile */
    .logo-img {
        position: relative !important;
        height: 70px !important;
        top: 80px !important;
        transition: top 0.3s, height 0.3s;
    }

    .header-scrolled .logo-img, body:not(.home) .logo-img {
        top: 30px !important; height: 60px !important;
    }

    .header-scrolled .menu-toggle-v2, body:not(.home) .menu-toggle-v2 { top: 10px !important; }

    /* =============================================
       SIDEBAR CONTENEDOR
    ============================================= */
    .nav-sidebar {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0; right: -100%;
        width: 85%; max-width: 380px;
        height: 100vh;
        background: #fff;
        z-index: 10000;
        transition: right 0.4s ease;
        padding: 80px 0 100px 0;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        overflow-y: auto;
    }

    .nav-sidebar.open { right: 0; }

    .sidebar-content { 
        padding: 0 24px; 
        width: 100%; 
        flex: 1 1 auto; 
    }

    /* =============================================
       LISTA PRINCIPAL
    ============================================= */
    .sidebar-nav-list { list-style: none; }

    .sidebar-nav-list > li {
        border-bottom: 1px solid #f0ebe5;
        padding-bottom: 0;
        overflow: visible;
    }

    /* Links de primer nivel (Home, Equipo, Blog) */
    .sidebar-nav-list > li > a {
        font-family: var(--fuente-cuerpo);
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
       color: var(--oro) !important;
        display: block;
        padding: 16px 0 !important;
        text-decoration: none !important;
        transition: 0.3s ease;
    }

    .sidebar-nav-list > li > a:hover {
        color: var(--oro) !important;
        padding-left: 8px !important;
    }

    /* =============================================
       ACORDEÓN — JERARQUÍA VISUAL CLARA
    ============================================= */

    /* NIVEL 1: "Tratamientos" — fila tocable entera */
    .sidebar-nav-list > li > .mega-submenu-title.main-cat {
        font-family: var(--fuente-cuerpo);
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--oro) !important;
        padding: 16px 0;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: none;
        width: 100%;
    }

    /* NIVEL 2: "Faciales", "Corporales", etc. — categorías */
    .sidebar-submenu-list > .mega-submenu > .mega-submenu-title.cat-title {
        font-family: var(--fuente-cuerpo);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: var(--oro) !important;
        background: rgba(161,129,107,0.06);
        padding: 13px 12px !important;
        border-radius: 3px;
        border-bottom: 1px solid rgba(161,129,107,0.2);
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2px;
        width: 100%;
    }

    /* NIVEL 3: "Neuromoduladores", "Rellenos", etc. — subcategorías */
    .sidebar-submenu-list .mega-submenu .mega-submenu-list .mega-submenu > .mega-submenu-title {
        font-family: var(--fuente-cuerpo);
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--texto-gris) !important;
        background: transparent;
        border-bottom: 1px dashed rgba(161,129,107,0.25);
        padding: 11px 8px !important;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Flecha en todos los acordeones */
    .sidebar-submenu-title::after {
        content: '▾';
        font-size: 14px;
        color: var(--oro);
        transition: transform 0.3s ease;
        flex-shrink: 0;
        margin-left: 8px;
    }

    .mega-submenu.active > .sidebar-submenu-title::after {
        transform: rotate(-180deg);
    }

    /* =============================================
       LISTAS CERRADAS / ABIERTAS
    ============================================= */
    .nav-sidebar .mega-submenu-list,
    .nav-sidebar .sidebar-submenu-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        padding: 0 !important;
    }

    /* Primer nivel abierto — espacio para categorías */
    .nav-sidebar .mega-submenu.active > .mega-submenu-list,
    .nav-sidebar .mega-submenu.active > .sidebar-submenu-list {
        max-height: 2000px;
        padding: 8px 0 12px 0 !important;
        overflow: visible;
    }

    /* Segundo nivel abierto — espacio para subcategorías */
    .nav-sidebar .mega-submenu.active > .mega-submenu-list > .mega-submenu.active > .mega-submenu-list {
        max-height: 1000px;
        overflow: visible;
    }

    /* =============================================
       LINKS FINALES (items de tratamiento)
    ============================================= */
    .nav-sidebar .mega-submenu-list a,
    .nav-sidebar .sidebar-submenu-list a {
        font-family: var(--fuente-cuerpo);
        font-size: 12px !important;
        font-weight: 400;
        color: var(--texto-gris) !important;
        text-transform: none !important;
        letter-spacing: 0.5px;
        display: block;
        padding: 10px 12px !important;
        text-decoration: none !important;
        border-bottom: 1px solid #f7f4f0;
        transition: 0.25s ease;
    }

    .nav-sidebar .mega-submenu-list a:hover,
    .nav-sidebar .sidebar-submenu-list a:hover {
        color: var(--oro) !important;
        padding-left: 18px !important;
        background: rgba(161,129,107,0.04);
    }

    /* =============================================
       BOTÓN STICKY Y CERRAR
    ============================================= */
    .sidebar-btn-sticky {
        position: fixed;
        bottom: 0; left: 0; width: 100vw;
        display: none; justify-content: center;
        z-index: 10100;
        background: #fff;
        padding: 16px 24px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    }

    .nav-sidebar.open .sidebar-btn-sticky { display: flex; }

    .sidebar-btn-sticky a {
        background: var(--oro);
        font-size: 13px; font-weight: 600;
        color: #fff !important; 
        padding: 14px 40px;
        text-decoration: none;
        border-radius: 2px;
        width: 100%;
        text-align: center;
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }

    .close-sidebar {
        position: absolute;
        top: 20px; right: 16px;
        color: var(--oro); background: #fff;
        border: 1px solid var(--oro-claro);
        border-radius: 50%; width: 36px; height: 36px;
        display: flex; align-items: center; justify-content: center;
        z-index: 10200; cursor: pointer;
        font-size: 16px;
    }

    .sidebar-overlay.active {
        display: block !important;
        position: fixed; top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 9998;
    }

    /* Ocultar imagen del mega menu en mobile */
    .mega-image-col { display: none; }
}