/* ALIANZAGSM — Directorio Comercial v13.0 — Estilos del Perfil y Modal Auditoría */

/* Backdrop para Drawer */
.profile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.profile-backdrop.active { opacity: 1; pointer-events: auto; }

/* PERFIL DRAWER */
/* PERFIL DRAWER (FLOATING GLASS CARD - 2026 STYLE) */
#profile-view {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 480px;
    max-width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    background: rgba(13, 19, 34, 0.82);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    z-index: 9999;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transform: translateX(110%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
#profile-view.active { transform: translateX(0); }

/* Responsive para dispositivos móviles */
@media (max-width: 768px) {
    #profile-view {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100vw;
        height: 85vh;
        border-radius: 28px 28px 0 0;
        transform: translateY(110%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
    }
    #profile-view.active {
        transform: translateY(0);
    }
}

.profile-topbar {
    position: sticky; top: 0; z-index: 10;
    background: linear-gradient(180deg, rgba(9, 13, 22, 0.95) 0%, transparent 100%);
    padding: 14px 20px;
    display: flex; align-items: center;
}
.btn-back { 
    background: rgba(0, 0, 0, 0.6); 
    border: 1px solid var(--glass-border); 
    color: white; 
    width: 40px; height: 40px; 
    border-radius: 50%; 
    font-size: 1.2rem; 
    cursor: pointer; 
    display: flex; align-items: center; justify-content: center; 
}

.profile-header { 
    padding: 85px 20px 24px; 
    display: flex; align-items: flex-end; gap: 16px; 
    background-size: cover; background-position: center;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}
.profile-header::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(9,13,22,0.3) 0%, #0d1322 100%);
    z-index: 1;
}

.avatar-box {
    width: 70px; height: 70px; 
    border-radius: 20px; 
    background: rgba(9, 13, 22, 0.85);
    display: flex; align-items: center; justify-content: center; 
    font-size: 2.2rem;
    border: 2px solid var(--brand-color); 
    position: relative; flex-shrink: 0; z-index: 2;
}

.verified-seal {
    position: absolute; bottom: -5px; right: -5px; 
    background: var(--brand-color); color: #000; 
    width: 24px; height: 24px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 0.7rem; font-weight: 900;
    border: 2px solid var(--bg-base); 
}

.info-header { z-index: 2; }
.info-header h1 { font-size: 1.35rem; font-weight: 800; margin: 0 0 3px 0; color: white; }
.info-header p { color: var(--brand-color); font-size: 0.84rem; font-weight: 600; margin: 0; }


.trust-banner {
    margin: 0 20px 20px; 
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
    border: 1px solid rgba(16, 185, 129, 0.35); 
    border-radius: 16px; padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between; 
    cursor: pointer;
}
.trust-banner-info-wrap { display: flex; align-items: center; gap: 12px; }
.trust-banner-text-wrap h4 { margin: 0 0 2px 0; font-size: 0.88rem; font-weight: 700; color: var(--accent-green); }
.trust-banner-text-wrap p { margin: 0; font-size: 0.76rem; color: var(--text-dim); }
.trust-banner-arrow { font-size: 0.82rem; font-weight: 700; color: var(--accent-green); }

.menu-section { padding: 0 20px 20px; }
.section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 12px; font-weight: 700; }

.menu-item {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 14px; margin-bottom: 10px;
}
.item-details h4 { font-size: 0.95rem; margin: 0 0 3px 0; color: white; font-weight: 600; }
.item-details p { font-size: 0.8rem; color: var(--text-dim); margin: 0; }
.item-price { font-weight: 700; color: var(--brand-color); font-size: 0.9rem; margin-top: 4px; display: block; }

.add-btn {
    background: rgba(255, 255, 255, 0.1); border: none; color: var(--text-main);
    width: 40px; height: 40px; border-radius: 12px; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 10px; 
}

.dir-empty-catalog { padding: 20px; font-size: 13px; color: var(--text-dim); text-align: center; }

/* BARRA DE ACCIONES CONTEXTUAL */
.bottom-action-bar {
    position: fixed; bottom: 0; right: 0;
    width: 560px; max-width: 100vw; z-index: 99999;
    background: rgba(9, 13, 22, 0.97);
    border-top: 1px solid var(--glass-border);
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: none;
}

.action-layout-cart { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.total-display-span { font-size: 1.15rem; font-weight: 800; color: var(--brand-color); }
.count-display-span { font-size: 0.75rem; color: var(--text-dim); }

.action-layout-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-layout-single { display: block; width: 100%; }

.btn-action {
    width: 100%; padding: 13px 12px; border-radius: 14px; border: none;
    font-weight: 700; font-size: 0.88rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit; min-height: 44px;
}
.btn-primary { background: var(--brand-color); color: #000; }
.btn-whatsapp { background: #25D366; color: #000; }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid var(--glass-border); }
.btn-alert { background: var(--accent-red); color: #fff; }

/* Modal Auditoría Digital */
.modal-overlay { 
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.8); 
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 100000; display: none; align-items: center; justify-content: center; 
    padding: 16px; 
}
.modal-overlay.active { display: flex; }
.modal-card { 
    background: #0f172a; border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 24px; width: 100%; max-width: 380px; padding: 22px; 
    animation: fadeUp 0.25s ease; 
}
.modal-card-header h3 { margin: 0; font-size: 1.1rem; font-weight: 800; color: white; }
.btn-close-modal {
    background: rgba(255, 255, 255, 0.1); border: none; color: var(--text-dim);
    width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.modal-card-desc { font-size: 0.84rem; color: var(--text-dim); margin: 12px 0 16px; }
.modal-card-badge {
    background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green); padding: 10px 14px; border-radius: 12px; font-size: 0.82rem; font-weight: 600; margin-bottom: 10px;
}
