/* Estilos para la búsqueda de productos - SGB */

/* Estilos para el modal de SweetAlert2 */
.swal-productos-popup {
    border-radius: 15px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
}

.swal-productos-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.swal-productos-container {
    max-height: 70vh !important;
    overflow-y: auto !important;
    padding: 0 !important;
}

/* Estilos para las tarjetas de productos */
.producto-card {
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: linear-gradient(145deg, #ffffff, #f8f9fa) !important;
    max-width: 100% !important;
}

/* Reducir padding interno de las tarjetas */
.swal2-container .swal2-popup.swal-productos-popup .producto-card .card-body {
    padding: 1rem !important;
}

/* Eliminar barras laterales y scrollbars no deseados del modal */
.swal2-container .swal2-popup.swal-productos-popup {
    overflow: hidden !important;
}

.swal2-container .swal2-popup.swal-productos-popup .swal2-html-container {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #c1c1c1 #f1f1f1 !important;
}

/* Ocultar scrollbar horizontal en WebKit */
.swal2-container .swal2-popup.swal-productos-popup .swal2-html-container::-webkit-scrollbar-x {
    display: none !important;
}

/* Estilizar scrollbar vertical */
.swal2-container .swal2-popup.swal-productos-popup .swal2-html-container::-webkit-scrollbar {
    width: 8px !important;
}

.swal2-container .swal2-popup.swal-productos-popup .swal2-html-container::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 10px !important;
}

.swal2-container .swal2-popup.swal-productos-popup .swal2-html-container::-webkit-scrollbar-thumb {
    background: #c1c1c1 !important;
    border-radius: 10px !important;
}

.swal2-container .swal2-popup.swal-productos-popup .swal2-html-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8 !important;
}

.producto-card:hover {
    border-color: #007bff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15) !important;
}

/* Producto seleccionado */
.producto-card:has(input[type="radio"]:checked) {
    border-color: #28a745 !important;
    background: linear-gradient(145deg, #f8fff9, #e8f5e8) !important;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.2) !important;
}

/* Estilos SÚPER ESPECÍFICOS para badges SOLO dentro de modales de SweetAlert2 de productos */
.swal2-container .swal2-popup.swal-productos-popup .badge {
    font-size: 0.85rem !important;
    padding: 0.6em 1em !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    vertical-align: baseline !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease !important;
}

.swal2-container .swal2-popup.swal-productos-popup .badge.fs-6 {
    font-size: 1rem !important;
    padding: 0.7em 1.2em !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15) !important;
}

/* Asegurar que los badges dentro de las tarjetas de productos se vean correctamente */
.swal2-container .swal2-popup.swal-productos-popup .producto-card .badge {
    font-size: 0.85rem !important;
    padding: 0.6em 1em !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    position: static !important;
    transform: none !important;
    margin: 0 !important;
}

/* Estilos para el título del producto en el modal */
.swal2-container .swal2-popup.swal-productos-popup .producto-card h5 {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin-bottom: 0.75rem !important;
}

/* Mejorar el espaciado de los badges principales */
.swal2-container .swal2-popup.swal-productos-popup .d-flex.gap-2 {
    gap: 0.75rem !important;
}

/* Estilo especial para el badge de precio prominente */
.swal2-container .swal2-popup.swal-productos-popup .precio-prominente {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    padding: 1.5rem 2.5rem !important;
    border-radius: 30px !important;
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.6) !important;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: 4px solid rgba(255, 255, 255, 0.5) !important;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4) !important;
    min-width: 220px !important;
    width: auto !important;
    text-align: center !important;
    letter-spacing: 1px !important;
    display: inline-block !important;
    white-space: nowrap !important;
    transform: scale(1.05) !important;
    transition: all 0.3s ease !important;
}

/* Efecto hover para el badge de precio */
.swal2-container .swal2-popup.swal-productos-popup .precio-prominente:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 12px 24px rgba(40, 167, 69, 0.7) !important;
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%) !important;
}

/* Badges secundarios más pequeños y discretos */
.swal2-container .swal2-popup.swal-productos-popup .badge:not(.precio-prominente) {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.7rem !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
}

/* Específicamente para badges dentro de las filas de productos en el modal */
.swal2-container .swal2-popup.swal-productos-popup .row .badge {
    position: static !important;
    transform: none !important;
    float: none !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Estilos para el input de filtro */
#swalFiltroProductos {
    border-radius: 10px !important;
    border: 2px solid #e9ecef !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

#swalFiltroProductos:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    outline: none !important;
}

/* Estilos para los radio buttons */
input[type="radio"] {
    accent-color: #28a745 !important;
    cursor: pointer !important;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto-card {
    animation: fadeInUp 0.3s ease-out !important;
}

/* Estilos para iconos */
.bi {
    vertical-align: -0.125em !important;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .swal-productos-popup {
        width: 95% !important;
        margin: 10px !important;
    }
    
    .producto-card .card-body {
        padding: 1rem !important;
    }
    
    .badge {
        font-size: 0.7rem !important;
        padding: 0.3em 0.6em !important;
    }
}

/* Estilos para el scrollbar */
.swal-productos-container::-webkit-scrollbar {
    width: 8px;
}

.swal-productos-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.swal-productos-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.swal-productos-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Efectos adicionales */
.cursor-pointer {
    cursor: pointer !important;
}

/* Estilos para estados de stock ULTRA ESPECÍFICOS para modales de SweetAlert2 */
.swal2-container .swal2-popup.swal-productos-popup .badge.bg-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

.swal2-container .swal2-popup.swal-productos-popup .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.swal2-container .swal2-popup.swal-productos-popup .badge.bg-success {
    background-color: #28a745 !important;
    color: white !important;
}

.swal2-container .swal2-popup.swal-productos-popup .badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.swal2-container .swal2-popup.swal-productos-popup .badge.bg-primary {
    background-color: #007bff !important;
    color: white !important;
}

/* Prevenir que otros estilos de la página interfieran con los badges del modal */
.swal2-container .swal2-popup.swal-productos-popup .badge {
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
    vertical-align: baseline !important;
    float: none !important;
    clear: none !important;
}

/* Mejoras para la accesibilidad */
.producto-card:focus-within {
    outline: 2px solid #007bff !important;
    outline-offset: 2px !important;
}

/* Estilos para el loading */
.swal2-loading {
    border-color: #007bff transparent #007bff transparent !important;
}

/* NO TOCAR BADGES GLOBALES - Solo aplicar estilos específicos al modal */

/* Asegurar que el modal tenga la clase correcta para aplicar los estilos */
.swal2-popup[data-productos-modal="true"] {
    /* Esta clase se puede agregar dinámicamente al modal */
}