/* ==========================================
   INFRAESTRUCTURA UNIFICADA (drawer.css)
   ========================================== */

/* Fondo oscuro detrás del panel */
#drawerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10500;
    display: none;
}

#drawerOverlay.show {
    display: block;
}

/* El panel lateral */
#unifiedDrawer {
    position: fixed;
    right: 0;
    top: 0;
    width: 420px;
    max-width: 95%;
    height: 100%;
    height: -webkit-fill-available;
    background-color: #ffffff;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    overscroll-behavior: none;
}

#unifiedDrawer.show {
    transform: translateX(0);
}

/* Cabecera con pestañas (Wishlist, Cuenta, Bag) */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f5f5f5;
}

.drawer-tabs {
    display: flex;
    gap: 15px;
}

.tab-btn {
    font-size: 13px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

.tab-btn.active-tab {
    color: #000;
    font-weight: 700;
}

.tab-btn.active-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #000;
}

/* Botón de cerrar (X) */
.close-x {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close-x:hover {
    color: #bfa36a;
}

/* Contenedor donde se inyecta el contenido dinámico */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* Contenedor del grupo */
.menu-item-group {
    border-bottom: 1px solid #f2f2f2;
}

/* El submenú oculto por defecto */
.sub-menu-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fafafa;
    padding-left: 20px;
}

.sub-menu-container.open {
    max-height: 200px; /* Ajusta según el contenido */
    padding-bottom: 10px;
}

/* Items del submenú */
.sub-menu-item {
    padding: 12px 0;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.sub-menu-item:hover {
    color: #bfa36a; /* Tu dorado de marca */
}

/* Ajuste para que el row de configuración no tenga borde doble */
.menu-item-group .menu-item-row {
    border-bottom: none;
}