/* SCROLL SOLO EN CONTENEDOR DE PROMOCIONES */
body.pagina-promociones {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.papromociones header,
body.promociones nav.menu-barra-contenedor {
    flex-shrink: 0;
    /* Se mantienen estáticos sin sticky */
}

body.promociones main.contenedor {
    flex: 1;
    overflow-y: auto; /* Scroll aquí */
    padding: 20px 0;
}

body.pagina-promociones footer {
    flex-shrink: 0;
    /* Se mantiene estático sin sticky */
}

/* TUS ESTILOS ORIGINALES DE PROMOCIONES */
.contenedor-promociones {
    padding: 20px 0;
    margin: 0 auto;
    padding-left: 50px;
    padding-right: 50px;
    width: 100%;
    max-width: 1200px;
}

/* MULTIPLES FILAS DE PROMOCIONES */
.contenedor-promociones .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.col-md-4 {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    margin-bottom: 30px;
}

/* ESTILOS DE LAS TARJETAS */
.promo-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    transition: transform 0.3s;
    height: 100%;
    min-height: 400px;
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-img-top {
    height: 150px;
    object-fit: contain;
    padding: 10px;
    width: 100%;
}

.card-body {
    padding: 20px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
}

.card-title {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
    font-size: 1.2em;
    padding: 0 5px;
    margin-top: 0;
}

.d-flex.justify-content-between {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ESTILOS DE PRECIOS Y DESCUENTOS */
.precio-anterior {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9em;
}

.precio-actual {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2em;
}

.descuento-badge {
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9em;
}

/* CONTENEDOR PRINCIPAL - SIN IMAGEN DEL DOCTOR */
main.contenedor {
    display: flex;
    justify-content: center;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .col-md-4 {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
    
    .contenedor-promociones {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
/* ESTILOS PARA MENSAJES DE ÉXITO/ERROR */
/* Estos estilos van al FINAL de tu archivo CSS actual */

.alert-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Estilo para mensajes que desaparecen automáticamente */
.auto-dismiss {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOut {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

/* Botón para cerrar mensajes */
.close-message {
    float: right;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    transition: opacity 0.2s;
}

.close-message:hover {
    opacity: 1;
}

/* Iconos para los mensajes */
.alert-message::before {
    margin-right: 10px;
    font-size: 1.2em;
}

.alert-success::before {
    content: "✅";
}

.alert-error::before {
    content: "❌";
}

.alert-info::before {
    content: "ℹ️";
}

.alert-warning::before {
    content: "⚠️";
}

/* Contenedor de mensajes múltiples */
#messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

/* Mensajes que se apilan verticalmente */
#messages-container .alert-message {
    margin: 0;
    animation: slideIn 0.3s ease-out;
}

/* Efecto de desvanecimiento al eliminar */
.alert-message.fade-out {
    animation: slideOut 0.3s ease-in forwards;
}

/* Responsive para mensajes */
@media (max-width: 768px) {
    .auto-dismiss, #messages-container {
        min-width: 250px;
        max-width: 300px;
        right: 10px;
        left: 10px;
        margin: 0 auto;
    }
    
    #messages-container {
        right: 10px;
        left: 10px;
        max-width: 300px;
    }
}

/* Estilos específicos para la página de edición de promociones */
body.promociones-edit .alert-message {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
}

/* Si prefieres mensajes en la parte superior */
.mensajes-superiores {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.mensajes-superiores .alert-message {
    width: 90%;
    max-width: 800px;
    margin-bottom: 10px;
}
/* Agrega esto al final de tu archivo promocionesedit.css */

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}