/* ==========================================================================
   1. VARIABLES Y RESET GLOBAL
   ========================================================================== */
:root {
    --primary: #0d6efd;
    --light-bg: #f8f9fa;
    --border-radius-sm: 8px;
    --border-radius-md: 15px;
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.2);
    --transition: all 0.2s ease;
}

body {
    background-color: #f0f2f5;
}
html, body {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

/* ==========================================================================
   2. NAVBAR
   ========================================================================== */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #eee;
}

.nav-logo-custom {
    height: 45px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .nav-logo-custom { height: 35px; }
}

.nav-link-custom {
    font-weight: 600;
    color: #495057 !important;
    transition: var(--transition);
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--primary) !important;
}

/* ==========================================================================
   3. CARDS Y ELEMENTOS UI
   ========================================================================== */
.card-product, .card-login, .user-card {
    border: none;
    border-radius: var(--border-radius-md);
}

.card-product {
    cursor: pointer;
    transition: transform 0.2s;
}

.card-product:hover {
    transform: scale(1.02);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.active-cat {
    background-color: var(--primary) !important;
    color: white !important;
}

.my-custom-close-button {
    background-color: white !important;
    color: #333 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
    box-shadow: var(--shadow-soft) !important;
    border: none !important;
    margin: -10px !important;
    transition: var(--transition);
}

.my-custom-close-button:hover { transform: scale(1.1); }

/* ==========================================================================
   4. CHAT Y MENSAJERÍA
   ========================================================================== */
.chat-container {
    height: 65vh;
    overflow-y: auto;
    background: var(--light-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.bubble {
    max-width: 75%;
    padding: 10px 15px;
    margin-bottom: 10px;
    clear: both;
    word-wrap: break-word;
}

.msg-envio {
    background: var(--primary);
    color: white;
    border-radius: 15px 15px 0 15px;
    margin-left: auto;
}

.msg-recibo {
    background: #e9ecef;
    color: #333;
    border-radius: 15px 15px 15px 0;
}

/* ==========================================================================
   5. UTILERÍAS
   ========================================================================== */
.zoom-img { transition: var(--transition); }
.zoom-img:hover { transform: scale(1.15); }

.search-group {
    background-color: var(--light-bg);
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.search-group:focus-within {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.user-pill {
    background-color: var(--light-bg);
    border-radius: 50px;
    padding: 4px 12px 4px 4px;
    transition: background 0.2s;
}

.user-pill:hover { background-color: #e9ecef; }


.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}


.container {
        flex: 1; /* Empuja el footer hacia abajo */
    }

    #viewMain {
    cursor: zoom-in;
}
/* Forzamos al modal a ser más ancho en computadoras */
    @media (min-width: 992px) {
        .modal-xl {
            max-width: 95% !important; /* Ocupa el 95% de la pantalla */
        }
    }

    /* Aseguramos que la imagen use el espacio ganado */
    #lightboxImage {
        max-height: 90vh !important; /* Un poquito más de altura */
        width: auto;
    }