/* ==========================================
   0. RESET Y VARIABLES GLOBALES
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #efefef;
    color: #262626;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* ==========================================
   1. CONTENEDOR PRINCIPAL (ESTILO MÓVIL)
   ========================================== */
.app-container {
    width: 100%;
    max-width: 430px; /* Ancho estándar de teléfono móvil moderno */
    height: 100vh;
    max-height: 932px; /* Alto simulado de pantalla móvil */
    background-color: #ffffff;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* En pantallas de escritorio se ve como una app flotante, en móviles ocupa el 100% */
@media (max-width: 480px) {
    .app-container {
        height: 100vh;
        max-height: none;
        box-shadow: none;
    }
}

/* ==========================================
   2. GESTIÓN DE PANELES (OCULTO / VISIBLE)
   ========================================== */
.panel {
    display: none; /* Por defecto todos los paneles están ocultos */
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 70px; /* Espacio para que la barra inferior no tape el contenido */
}

.panel.active {
    display: flex; /* Solo el panel activo se muestra */
}

/* Cabeceras internas de cada panel */
.panel-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dbdbdb;
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.panel-content {
    padding: 10px;
    flex: 1;
}

/* ==========================================
   3. BARRA DE NAVEGACIÓN INFERIOR (ESTILO INSTAGRAM)
   ========================================== */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    border-top: 1px solid #dbdbdb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8e8e8e;
    cursor: pointer;
    flex: 1;
    font-size: 0.7rem;
}

.nav-btn i {
    font-size: 1.3rem;
    margin-bottom: 3px;
}

/* Estado activo del botón en la barra inferior */
.nav-btn.active {
    color: #0095f6; /* Azul clásico de interacción */
}

/* ==========================================
   4. TARJETAS DEL PANEL PRINCIPAL (HOME)
   ========================================== */
.business-card {
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

/* Cabecera de la tarjeta (Logo y Nombre) */
.card-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
}

.card-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Logo redondo estilo perfil */
    object-fit: cover;
    margin-right: 10px;
    border: 1px solid #dbdbdb;
}

.card-meta {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #262626;
}

.card-category {
    font-size: 0.75rem;
    color: #8e8e8e;
}

/* Contenedor de la foto principal y la descripción superpuesta */
.card-media-container {
    position: relative;
    width: 100%;
    background-color: #000;
}

.card-photo {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

/* Descripción superpuesta sobre la foto */
.card-overlay-description {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: #ffffff;
    padding: 15px 12px 10px 12px;
    font-size: 0.85rem;
}

/* Pie de tarjeta (Dirección y Botón de WhatsApp) */
.card-footer {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #fafafa;
}

.card-address {
    font-size: 0.8rem;
    color: #666;
}

.card-address i {
    color: #ed4956;
    margin-right: 4px;
}

/* Botón directo a WhatsApp con mensaje armado */
.btn-whatsapp-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25d366;
    color: #ffffff;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.btn-whatsapp-card:hover {
    background-color: #1ebe5d;
}

/* Estados de carga o vacío */
.loading-text, .empty-text {
    text-align: center;
    color: #8e8e8e;
    padding: 20px;
    font-size: 0.9rem;
}