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

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f5f5f5;
}

/* Navbar */
.navbar {
    background-color: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 24px;
    font-weight: 600;
    color: #e6007e;
    text-decoration: none;
}

.navbar .btn {
    padding: 10px 20px;
    background-color: #e6007e;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.navbar .btn a {
    color: #fff;
    text-decoration: none;
}

.navbar .btn:hover {
    background-color: #d5006f;
}

/* Sección de Login y Registro con imagen de fondo y degradado */
.login-section, .register-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: url('../img/CHALUPA5.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.login-section .overlay, .register-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

@media (max-width: 768px) {
    .login-section, .register-section {
        background-image: url('../img/CHALUPA6.jpg');
    }
}

.login-section .container, .register-section .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    margin-left: 41%; /* Mantener margen izquierdo en pantallas grandes */
}

.login-form, .register-form {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 10px;
}

.login-form h1, .register-form h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #e6007e;
    text-align: center;
}

.login-form p, .register-form p {
    margin-bottom: 30px;
    color: #666;
    text-align: center;
}

.login-form .form-group, .register-form .form-group {
    margin-bottom: 20px;
}

.login-form label, .register-form label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.login-form input, .register-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.login-form .btn-primary, .register-form .btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #e6007e;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.login-form .btn-primary:hover, .register-form .btn-primary:hover {
    background-color: #d5006f;
}

.register-form .error-message, .login-form .error-message {
    color: red;
    margin-bottom: 10px;
}

.login-form .register-link {
    margin-top: 20px;
    text-align: center;
}

.login-form .register-link a {
    color: #e6007e;
    text-decoration: none;
}

.login-form .register-link a:hover {
    text-decoration: underline;
}

/* Sección de Promociones (cargada dinámicamente) */
.promotions-section {
    background-color: #f9f9f9;
    padding: 60px 20px;
    background-image: url(../img/fondolog.jpg);
    background-size: cover;
}

.promotions-section .container {
    text-align: center;
}

.promotions-section h2 {
    font-size: 32px;
    color: white;
    margin-bottom: 40px;
    margin-top: 20px;
    text-align: -webkit-center;
}

.promo-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.promo-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    width: 300px;
    text-align: center;
    padding: 15px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.promo-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
    display: none; /* Las imágenes inicialmente no se muestran */
}

.promo-item p {
    font-size: 20px;
    color: #e6007e;
}

.promo-item img.loaded {
    display: block; /* Mostrar la imagen cuando esté cargada */
}

.promo-item:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-10px);
}

/* Sección de Pasos */
.steps-section {
    background-color: #fff;
    padding: 60px 20px;
    background-image: url(../img/fondolog.jpg);
}

.steps-section .container {
    text-align: center;
}

.steps-section h2 {
    font-size: 32px;
    color: white;
    margin-bottom: 40px;
}

.steps-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.step-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    max-width: 300px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: #e6007e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px auto;
}

.step-item h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

.step-item p {
    color: #666;
    font-size: 16px;
}

/* Chat Flotante Mejorado */
#chatBubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #e6007e;
    color: #fff;
    border-radius: 50%;
    padding: 15px;
    cursor: pointer;
    z-index: 1000;
}

#chatBubble i {
    font-size: 24px;
}

.chat {
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    z-index: 1001;
}

.chat-header {
    background-color: #e6007e;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.chat-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.chat-body {
    padding: 15px;
    flex-grow: 1;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
}

.message.received {
    text-align: left;
}

.message.sent {
    text-align: right;
}

.message p {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 20px;
    background-color: #f1f1f1;
    max-width: 80%;
}

.message.received p {
    background-color: #e6007e;
    color: #fff;
}

.chat-footer {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-top: 1px solid #ddd;
}

.chat-footer input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
}

.chat-footer button {
    background-color: #e6007e;
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
}

.chat-footer button:hover {
    background-color: #d5006f;
}

.chat-footer button i {
    font-size: 18px;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 20px;
    text-align: center;
}

footer a {
    color: #e6007e;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p {
    margin-top: 10px;
}

/* Responsivo */
@media (max-width: 768px) {
    .login-section, .register-section {
        background-image: url('../img/CHALUPA6.jpg');
    }

    .login-form, .register-form {
        padding: 20px;
    }

    .promotions-section, .steps-section {
        padding: 40px 20px;
        background-image: url(../img/fondologvert.jpg);
    }

    .promo-container, .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .navbar .btn {
        padding: 8px 16px;
    }

    #chatWindow {
        width: 90%;
        right: 5%;
    }

    /* Modificaciones específicas para pantallas pequeñas */
    .login-section .container, .register-section .container {
        margin: 50px auto 0 auto; /* Centrar horizontalmente y añadir margen superior */
        padding: 15px; /* Reducir padding para optimizar espacio */
    }

    .login-form, .register-form {
        padding: 20px; /* Ajustar padding interno */
    }

    .login-form h1, .register-form h1 {
        font-size: 28px; /* Reducir tamaño de fuente */
    }

    .login-form p, .register-form p {
        margin-bottom: 20px;
        font-size: 14px; /* Reducir tamaño de fuente */
    }
}
