/**
 * MÓDULO RESULTADOS - Estilos Modernos (Tabla)
 * Mayoreo Joinet v1.0
 * Prefijo: jn-results-
 *
 * NOTA: La fuente Montserrat se hereda de stylecarrito.css (body)
 * No necesitamos redeclararla aquí para evitar conflictos
 */

/* Excepciones para iconos de Font Awesome */
.fa,
.fas,
.far,
.fal,
[class*="fa-"] {
    font-family: 'Font Awesome 6 Free' !important;
}

/* Iconos de marcas (YouTube, WhatsApp, etc.) */
.fab {
    font-family: 'Font Awesome 6 Brands' !important;
    font-weight: 400 !important;
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.jn-results-container {
    padding: 20px 0;
}

/* ========================================
   ENCABEZADO DE RESULTADOS (ROJO)
   ======================================== */
.jn-results-header {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.jn-results-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.jn-results-title i {
    font-size: 24px;
}

.jn-results-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.jn-results-query {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
}

.jn-results-query strong {
    font-weight: 700;
}

.jn-results-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   TABLA MODERNA
   ======================================== */
.jn-results-table-wrapper {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: jn-results-fadeIn 0.4s ease-out;
}

.jn-results-table {
    width: 100%;
    border-collapse: collapse;
}

/* ========================================
   ENCABEZADO DE TABLA
   ======================================== */
.jn-results-table thead {
    background: #2c3e50;
    color: white;
}

.jn-results-table thead th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.jn-col-number {
    width: 60px;
    text-align: center !important;
}

.jn-col-code {
    width: 140px;
}

.jn-col-brand {
    width: 150px;
}

.jn-col-description {
    min-width: 200px;
}

.jn-col-image {
    width: 140px;
    text-align: center !important;
}

.jn-col-stock {
    width: 140px;
}

.jn-col-prices {
    width: 140px;
}

.jn-col-add {
    width: 180px;
    text-align: center !important;
}

/* ========================================
   FILAS DE TABLA
   ======================================== */
.jn-results-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jn-results-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    transform: scale(1.005);
}

.jn-results-table tbody tr:last-child {
    border-bottom: none;
}

.jn-results-table tbody td {
    padding: 2px 6px;
    vertical-align: middle;
}

/* ========================================
   COLUMNA #
   ======================================== */
.jn-cell-number {
    text-align: center;
}

.jn-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================
   COLUMNA CÓDIGO
   ======================================== */
.jn-cell-code {}

.jn-code-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.jn-code {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
}

/* BADGES Y MARCA MINI - Igual que cargacategorias */
.jn-badges-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.jn-badges-left,
.jn-badges-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jn-brand-mini {
    max-height: 30px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
}

/* Ocultar marca mini y su contenedor en columna código solo en escritorio */
.jn-cell-code .jn-brand-mini {
    display: none;
}
.jn-cell-code .jn-badges-left:not(:has(.jn-youtube-icon)) {
    display: none;
}

/* Estilos mejorados para badges en escritorio */
.jn-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.jn-badge-rebaja {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
}

.jn-badge-oferta {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
}

.jn-badge-remate {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
}

.jn-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

@keyframes pulse-rebaja {

    0%,
    100% {
        box-shadow: 0 2px 6px rgba(255, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 4px 15px rgba(255, 0, 0, 0.6);
    }
}

/* Contenedor SKU + Punto de stock en línea */
.jn-sku-stock {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Indicador de stock - Punto pequeño pegado al SKU */
.jn-stock-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.jn-stock-indicator.in-stock {
    background-color: #22c55e;
}

.jn-stock-indicator.out-of-stock {
    background-color: #ef4444;
}

/* SKU clickeable para copiar */
.jn-code {
    cursor: pointer;
    transition: color 0.2s ease;
}

.jn-code:hover {
    color: #ff0000;
}

.jn-code.copied {
    color: #22c55e;
}

/* Tooltip de copiado */
.jn-copy-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s, transform 0.2s;
}

.jn-copy-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Ajustes adicionales para compatibilidad con cargacategorias */
.jn-stock-youtube-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.youtube-icon {
    color: #FF0000 !important;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.youtube-icon:hover {
    color: #cc0000 !important;
}

.jn-youtube-icon {
    color: #FF0000 !important;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.jn-youtube-icon:hover {
    color: #cc0000 !important;
}

.stock-label,
.stock-value {
    display: inline;
}

.enoferta {
    color: red !important;
    font-weight: bold;
    font-size: 13px;
}

.enremate {
    color: red !important;
    font-weight: bold;
    background-color: white;
}

.blinking {
    animation: blinkingText 1s infinite;
    color: red !important;
}

@keyframes blinkingText {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.destacado {
    background-color: #ffffcc;
    padding: 5px;
    border-radius: 5px;
    margin: 2px 0;
}

/* Loader para infinite scroll */
.infinite-scroll-loader {
    text-align: center;
    padding: 30px;
    display: none;
}

.infinite-scroll-loader.active {
    display: block;
}

.loader-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.end-message {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 16px;
    display: none;
}

.end-message.active {
    display: block;
}

/* ========================================
   COLUMNA MARCA (Logo + Categoría)
   ======================================== */
.jn-brand-wrapper-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
    text-align: center;
}

.jn-brand-img-full {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jn-brand-wrapper-new a:hover .jn-brand-img-full {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.jn-category-full {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.4;
    word-wrap: break-word;
    width: 100%;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.jn-category-full:hover {
    color: #ff0000 !important;
}

/* Responsive para móvil */

/* Oferta Semana - Verde */
.jn-badge-oferta-semana { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; }
/* Liquidacion - Rojo */
.jn-badge-liquidacion { background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff; }
/* Al Costo - Rojo oscuro */
.jn-badge-alcosto { background: linear-gradient(135deg, #b91c1c, #7f1d1d); color: #fff; }

@media (max-width: 768px) {
    .jn-brand-wrapper-new {
        gap: 8px;
        padding: 8px;
    }

    .jn-brand-img-full {
        max-height: 60px;
    }

    .jn-category-full {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .jn-brand-wrapper-new {
        gap: 6px;
        padding: 6px;
    }

    .jn-brand-img-full {
        max-height: 50px;
    }

    .jn-category-full {
        font-size: 11px;
    }
}

/* ========================================
   COLUMNA DESCRIPCIÓN
   ======================================== */
.jn-cell-description {
    font-size: 18px;
    line-height: 1.5;
    color: #495057;
}

.jn-cell-description .product-link {
    color: #212529;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    display: block;
    padding: 5px 0;
    cursor: pointer;
    position: relative;
    z-index: 10;
    font-size: 18px;
}

.jn-cell-description .product-link:hover {
    color: #dc3545;
    text-decoration: underline;
    transform: translateX(3px);
}

/* ========================================
   COLUMNA IMAGEN
   ======================================== */
.jn-cell-image {
    text-align: center;
}

.jn-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.jn-image-wrapper a {
    position: relative;
    display: block;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.jn-image-wrapper a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.jn-image-wrapper a::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
    background: rgba(255, 0, 0, 0.8);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jn-image-wrapper a:hover::after {
    opacity: 1;
}

.jn-product-img {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 5px;
    transition: transform 0.3s ease;
}

.jn-image-wrapper a:hover .jn-product-img {
    transform: scale(1.05);
}

.jn-sku {
    font-size: 11px;
    color: #6c757d;
}

/* ========================================
   RIBBON "NUEVO" - Etiqueta para productos recientes
   ======================================== */
.jn-ribbon-nuevo {
    position: absolute;
    top: 5px;
    left: -5px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px 4px 8px;
    z-index: 15;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1;
    border-radius: 0 3px 3px 0;
}

/* Pliegue superior del ribbon */
.jn-ribbon-nuevo::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    border-style: solid;
    border-width: 0 0 4px 5px;
    border-color: transparent transparent #990000 transparent;
}

/* ========================================
   COLUMNA EXISTENCIAS
   ======================================== */
.jn-stock-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jn-stock-detail {
    font-size: 12px;
    line-height: 1.6;
    color: #6c757d;
}

.jn-stock-detail strong {
    color: #212529;
    font-weight: 600;
}

.jn-stock-total {
    font-size: 13px;
    color: #212529;
    padding-top: 6px;
    border-top: 1px solid #dee2e6;
}

.jn-stock-total strong {
    font-weight: 700;
}

.jn-box-info {
    font-size: 10px;
    color: #6c757d;
    font-style: italic;
}

/* Vendidos usa el mismo estilo que jn-box-info */

/* ========================================
   COLUMNA PRECIOS - Diseño Mini-Tabla Moderna
   ======================================== */
.jn-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 8px;
    border-radius: 8px;
}

.jn-price-item {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    padding: 4px 6px;
    background: white;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.jn-price-item:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    transform: translateX(2px);
}

.jn-price-level {
    font-weight: 700;
    color: #000000;
    font-size: 12px;
    text-align: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
    border-radius: 3px;
    padding: 2px 4px;
    line-height: 1;
}

.jn-price-value {
    font-weight: 400;
    color: #ff0000;
    text-align: right;
    font-size: 14px;
}

/* VERSIÓN ALTERNATIVA - Para rollback fácil
   Descomentar esta sección y comentar la de arriba para volver al diseño anterior */
/*
.jn-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jn-price-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.jn-price-item:hover {
    background: none;
    transform: none;
}

.jn-price-level {
    font-weight: 600;
    color: #495057;
}

.jn-price-value {
    font-weight: 700;
    color: #212529;
}
*/

/* ========================================
   COLUMNA AGREGAR
   ======================================== */
.jn-cell-add {
    text-align: center;
}

.jn-add-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.jn-add-row-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.jn-qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jn-btn-qty {
    width: 32px;
    height: 32px;
    border: 2px solid #ff0000;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 700;
    color: #ff0000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jn-btn-qty:hover {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
}

.jn-btn-qty:active {
    transform: scale(0.95);
}

.jn-qty-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.jn-qty-input:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.jn-btn-add {
    background: linear-gradient(135deg, #222222 0%, #000000 100%) !important;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    margin-top: 10px;
}

.jn-btn-add:hover {
    background: linear-gradient(135deg, #333333 0%, #111111 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.jn-btn-add:active {
    transform: translateY(0);
}

/* Contenedor de información sin stock - centrado */
.jn-no-stock-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 8px;
}

.jn-no-stock-info small {
    text-align: center;
    display: none; /* Ocultar el texto adicional */
}

/* Indicador de Agotado - Estilo etiqueta/badge */
.jn-btn-disabled {
    background: transparent;
    color: #dc3545;
    border: 2px dashed #dc3545;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: none;
    letter-spacing: normal;
    opacity: 0.85;
}

/* Botón para productos no disponibles para venta en línea */
.jn-btn-no-online {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%) !important;
    color: #856404 !important;
    border: 1px solid #ffc107 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 12px 16px !important;
    white-space: normal !important;
    flex-direction: column !important;
    text-align: center !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    opacity: 1 !important;
    cursor: default !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.jn-btn-no-online i {
    color: #d68910;
    margin-bottom: 4px;
    font-size: 16px;
}

.jn-btn-no-online .jn-subtext {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    color: #6c5a00;
}

/* ========================================
   ESTADO VACÍO
   ======================================== */
.jn-results-empty {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.jn-results-empty-icon {
    font-size: 72px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.jn-results-empty h3 {
    font-size: 24px;
    font-weight: 700;
    color: #495057;
    margin: 0 0 10px 0;
}

.jn-results-empty p {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 30px 0;
}

.jn-results-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.3);
}

.jn-results-btn-back:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4);
    transform: translateY(-2px);
    color: white;
}

/* ========================================
   RESPONSIVE
   ======================================== */
/* SOLO para tablets/desktop pequeño (NO móvil) */
@media (min-width: 768px) and (max-width: 1400px) {
    .jn-results-table-wrapper {
        overflow-x: auto;
    }

    .jn-results-table {
        min-width: 1200px;
    }
}

/* ============================================
   DISEÑO MÓVIL COMPACTO - Solo para móvil <768px
   Replica exacta del demo-movil-compacto.html
   NO afecta el diseño de escritorio
   ============================================ */
@media (max-width: 767px) {

    /* ===== PREVENCIÓN ABSOLUTA DE OVERFLOW HORIZONTAL ===== */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    body * {
        box-sizing: border-box !important;
    }

    /* Deshabilitar hover effects que causan overflow */
    .jn-results-table tbody tr:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .jn-image-wrapper a:hover,
    .jn-price-item:hover,
    .jn-cell-description .product-link:hover {
        transform: none !important;
    }

    .container-fluid,
    .row,
    .col-sm-12,
    .page-content,
    #content,
    article,
    .jn-results-container {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Forzar Bootstrap a no crear overflow */
    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .col-sm-12,
    [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* ===== ESTRUCTURA BASE ===== */

    /* Evitar overflow horizontal en el contenedor */
    .jn-results-table-wrapper {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .jn-results-table {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        table-layout: fixed !important;
        box-sizing: border-box !important;
    }

    /* Ocultar encabezado de tabla */
    .jn-results-table thead {
        display: none !important;
    }

    /* Convertir tbody en contenedor de cards */
    .jn-results-table tbody {
        display: block !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* Cada fila es ahora una card completa */
    .jn-results-table tbody .jn-results-row,
    .jn-cat-content .jn-results-table tbody .jn-results-row {
        display: block !important;
        background: white !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        padding: 10px !important;
        margin: 8px auto !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Todas las celdas en modo bloque por defecto */
    .jn-results-table tbody .jn-results-row td {
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Celdas que ocupan 100% width */
    .jn-results-table tbody .jn-results-row td.jn-cell-number,
    .jn-results-table tbody .jn-results-row td.jn-cell-code,
    .jn-results-table tbody .jn-results-row td.jn-cell-description,
    .jn-results-table tbody .jn-results-row td.jn-cell-brand,
    .jn-results-table tbody .jn-results-row td.jn-cell-add {
        display: block !important;
        width: 100% !important;
    }

    /* Ocultar columna # y columna marca en móvil */
    .jn-results-table tbody .jn-results-row td.jn-cell-number,
    .jn-results-table tbody .jn-results-row td.jn-cell-brand {
        display: none !important;
    }

    /* Ocultar pseudo-elementos ::before en móvil */
    .jn-results-table tbody .jn-results-row td.jn-cell-stock::before,
    .jn-results-table tbody .jn-results-row td.jn-cell-prices::before {
        display: none !important;
        content: none !important;
    }

    /* ===== FILA 1: SKU + BADGES + MARCA ===== */

    .jn-results-table tbody .jn-results-row td.jn-cell-code {
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-code-wrapper {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        flex-direction: row !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-code {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #333 !important;
        letter-spacing: 0 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-badges-wrapper {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        flex-wrap: wrap !important;
        max-width: 100% !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-badges-left {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        flex-wrap: nowrap !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-badges-right {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        flex-wrap: wrap !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-brand-mini {
        display: block !important;
        height: 20px !important;
        width: auto !important;
        max-width: 40px !important;
        object-fit: contain !important;
        border-radius: 3px !important;
        border: 1px solid #e0e0e0 !important;
        background: white !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-youtube-icon {
        color: #FF0000 !important;
        font-size: 14px !important;
        text-decoration: none !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-badge {
        padding: 3px 8px !important;
        border-radius: 4px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-badge-rebaja {
        background: #f59e0b !important;
        color: white !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-badge-oferta {
        background: #ffd700 !important;
        color: #333 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-badge-remate {
        background: #dc2626 !important;
        color: white !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-stock-indicator {
        width: 5px !important;
        height: 5px !important;
        margin-left: 3px !important;
    }

    /* ===== FILA 2: DESCRIPCIÓN ===== */

    .jn-results-table tbody .jn-results-row td.jn-cell-description {
        margin-bottom: 10px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-description a {
        font-size: 15px !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        color: #333 !important;
        text-decoration: none !important;
        display: block !important;
    }

    /* ===== FILA 3: DISEÑO 3 COLUMNAS - IMAGEN | EXISTENCIAS | PRECIOS ===== */

    /* Las 3 columnas en la misma fila */
    .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-results-table tbody .jn-results-row td.jn-cell-prices,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices {
        display: inline-block !important;
        vertical-align: top !important;
        box-sizing: border-box !important;
        margin-bottom: 8px !important;
    }

    /* Columna 1: Imagen - 28% */
    .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image {
        width: 28% !important;
        max-width: 28% !important;
        text-align: center !important;
        padding-right: 4px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-image-wrapper,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-image-wrapper {
        width: 70px !important;
        height: 70px !important;
        display: inline-block !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-product-img,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-product-img {
        width: 70px !important;
        height: 70px !important;
        object-fit: contain !important;
        border-radius: 6px !important;
        border: 1px solid #e0e0e0 !important;
        background: white !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-sku,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-sku {
        display: none !important;
    }

    /* Columna 2: Existencias - 36% */
    .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock {
        width: 36% !important;
        max-width: 36% !important;
        padding: 0 2px !important;
        font-size: 0 !important;
    }

    /* Columna 3: Precios - 36% */
    .jn-results-table tbody .jn-results-row td.jn-cell-prices,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices {
        width: 36% !important;
        max-width: 36% !important;
        padding-left: 2px !important;
        font-size: 0 !important;
    }

    /* Stock - Diseño mejorado y más limpio */
    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-wrapper,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-wrapper {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
        padding: 6px !important;
        border-radius: 6px !important;
        border: 1px solid #dee2e6 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
        min-height: auto !important;
        display: block !important;
        font-size: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail {
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        font-size: 10px !important;
        margin-bottom: 4px !important;
        padding: 2px 0 !important;
        color: #495057 !important;
        line-height: 1.4 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail:last-of-type,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail:last-of-type {
        margin-bottom: 4px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail .stock-label,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail .stock-label {
        font-weight: 600 !important;
        color: #6c757d !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail .stock-value,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail .stock-value {
        font-weight: 700 !important;
        color: #212529 !important;
        font-size: 10px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-total,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-total {
        border-top: 2px solid #ff0000 !important;
        padding-top: 4px !important;
        margin-top: 4px !important;
        font-weight: 700 !important;
        color: #ff0000 !important;
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        font-size: 11px !important;
        background: rgba(255, 0, 0, 0.05) !important;
        padding: 4px 4px !important;
        border-radius: 3px !important;
        margin: 4px -4px 4px -4px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-total .stock-label,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-total .stock-label {
        font-weight: 700 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-total .stock-value,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-total .stock-value {
        font-weight: 700 !important;
        font-size: 11px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-box-info,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-box-info {
        font-size: 9px !important;
        color: #6c757d !important;
        margin-top: 4px !important;
        line-height: 1.3 !important;
        text-align: center !important;
        background: #fff !important;
        padding: 3px !important;
        border-radius: 3px !important;
        border: 1px solid #e9ecef !important;
    }

    /* Precios - Diseño compacto y limpio para móvil */
    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-wrapper,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-wrapper {
        background: linear-gradient(135deg, #fff9e6 0%, #fff3d6 100%) !important;
        padding: 5px !important;
        border-radius: 6px !important;
        border: 1px solid #ffd966 !important;
        box-shadow: 0 1px 3px rgba(255, 193, 7, 0.15) !important;
        min-height: auto !important;
        display: block !important;
        font-size: 9px !important;
        height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 3px !important;
        font-size: 9px !important;
        margin-bottom: 2px !important;
        padding: 2px 4px !important;
        line-height: 1.2 !important;
        background: #fff !important;
        border-radius: 3px !important;
        border-left: 2px solid #ff0000 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:last-child,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:last-child {
        margin-bottom: 0 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(1),
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(1) {
        border-left-color: #ff0000 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(2),
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(2) {
        border-left-color: #ff3333 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(3),
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(3) {
        border-left-color: #ff6666 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(4),
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(4) {
        border-left-color: #ff9999 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(5),
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(5) {
        border-left-color: #ffb3b3 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(6),
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item:nth-child(6) {
        border-left-color: #ffcccc !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-level,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-level {
        color: #000000 !important;
        font-weight: 700 !important;
        font-size: 9px !important;
        min-width: 10px !important;
        flex-shrink: 0 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-value,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-value {
        font-weight: 400 !important;
        color: #ff0000 !important;
        font-size: 10px !important;
        text-align: right !important;
        white-space: nowrap !important;
    }

    /* ===== FILA 4: AGREGAR AL CARRITO - Selector y Botón lado a lado ===== */

    .jn-results-table tbody .jn-results-row td.jn-cell-add,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add {
        margin-top: 10px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-add-wrapper,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-add-wrapper {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-qty-controls,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-qty-controls {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        flex-shrink: 0 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-qty,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-qty {
        width: 26px !important;
        height: 26px !important;
        border: 2px solid #ff0000 !important;
        background: white !important;
        border-radius: 4px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        color: #ff0000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 4px rgba(255, 0, 0, 0.15) !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-qty:active,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-qty:active {
        transform: scale(0.95) !important;
        background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%) !important;
        color: white !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-qty-input,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-qty-input {
        width: 38px !important;
        height: 26px !important;
        text-align: center !important;
        border: 2px solid #dee2e6 !important;
        border-radius: 4px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #212529 !important;
        background: white !important;
        transition: all 0.2s ease !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-qty-input:focus,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-qty-input:focus {
        outline: none !important;
        border-color: #ff0000 !important;
        box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1) !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-add,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-add {
        flex: 1 !important;
        height: 36px !important;
        min-width: 0 !important;
        background: linear-gradient(135deg, #222222 0%, #000000 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        transition: all 0.2s ease !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        margin-top: -5px !important;
        padding: 0 8px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-add:active,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-add:active {
        transform: scale(0.98) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-disabled,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-disabled {
        height: auto !important;
        width: auto !important;
        background: transparent !important;
        color: #dc3545 !important;
        border: 2px dashed #dc3545 !important;
        padding: 6px 12px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {
    .jn-results-header {
        padding: 12px 8px;
    }

    .jn-results-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .jn-results-title h2 {
        font-size: 16px;
    }

    .jn-results-empty {
        padding: 50px 12px;
    }

    .jn-results-empty-icon {
        font-size: 48px;
    }

    .jn-results-empty h3 {
        font-size: 18px;
    }

    /* Cards aún más compactas en móviles pequeños */
    .jn-results-table tbody .jn-results-row,
    .jn-cat-content .jn-results-table tbody .jn-results-row {
        padding: 8px !important;
        margin: 6px auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-code,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-code {
        font-size: 13px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-description a,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-description a {
        font-size: 14px !important;
    }

    /* ===== 3 COLUMNAS FORZADAS EN 480px ===== */
    .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-results-table tbody .jn-results-row td.jn-cell-prices,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices {
        display: inline-block !important;
        vertical-align: top !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image {
        width: 75px !important;
        max-width: 75px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-image-wrapper,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-image-wrapper {
        width: 75px !important;
        height: 75px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-product-img,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-product-img {
        width: 75px !important;
        height: 75px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock {
        width: calc((100% - 75px - 8px) / 2) !important;
        max-width: calc((100% - 75px - 8px) / 2) !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices {
        width: calc((100% - 75px - 8px) / 2) !important;
        max-width: calc((100% - 75px - 8px) / 2) !important;
    }
}

/* Media query adicional para móviles muy pequeños */
@media (max-width: 380px) {

    .jn-results-table tbody .jn-results-row,
    .jn-cat-content .jn-results-table tbody .jn-results-row {
        padding: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 4px auto !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-code,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-code .jn-code {
        font-size: 12px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-description a,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-description a {
        font-size: 13px !important;
        line-height: 1.2 !important;
    }

    /* ===== 3 COLUMNAS FORZADAS EN 380px ===== */
    .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-results-table tbody .jn-results-row td.jn-cell-prices,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices {
        display: inline-block !important;
        vertical-align: top !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image {
        width: 70px !important;
        max-width: 70px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-image-wrapper,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-image-wrapper {
        width: 70px !important;
        height: 70px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-product-img,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-image .jn-product-img {
        width: 70px !important;
        height: 70px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock {
        width: calc((100% - 70px - 6px) / 2) !important;
        max-width: calc((100% - 70px - 6px) / 2) !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices {
        width: calc((100% - 70px - 6px) / 2) !important;
        max-width: calc((100% - 70px - 6px) / 2) !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-wrapper,
    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-wrapper,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-wrapper,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-wrapper {
        padding: 4px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-stock .jn-stock-detail {
        font-size: 9px !important;
        margin-bottom: 3px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-item {
        font-size: 9px !important;
        padding: 2px 3px !important;
        margin-bottom: 3px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-level,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-level {
        font-size: 9px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-value,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-prices .jn-price-value {
        font-size: 10px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-qty-input,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-qty-input {
        width: 34px !important;
        font-size: 12px !important;
    }

    .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-add,
    .jn-cat-content .jn-results-table tbody .jn-results-row td.jn-cell-add .jn-btn-add {
        font-size: 11px !important;
        padding: 0 6px !important;
    }
}

/* Asegurar que los loaders y mensajes se vean bien en móvil */
@media (max-width: 768px) {

    .infinite-scroll-loader,
    .end-message {
        padding: 20px 15px;
    }

    .loader-spinner {
        width: 35px;
        height: 35px;
    }

    .end-message i {
        font-size: 40px !important;
    }

    .end-message p {
        font-size: 14px;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes jn-results-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animaciones solo en DESKTOP - NO en móvil */
@media (min-width: 768px) {
    .jn-results-row {
        animation: jn-results-rowSlideIn 0.3s ease-out backwards;
    }

    .jn-results-row:nth-child(1) {
        animation-delay: 0.05s;
    }

    .jn-results-row:nth-child(2) {
        animation-delay: 0.1s;
    }

    .jn-results-row:nth-child(3) {
        animation-delay: 0.15s;
    }

    .jn-results-row:nth-child(4) {
        animation-delay: 0.2s;
    }

    .jn-results-row:nth-child(5) {
        animation-delay: 0.25s;
    }

    .jn-results-row:nth-child(6) {
        animation-delay: 0.3s;
    }

    .jn-results-row:nth-child(7) {
        animation-delay: 0.35s;
    }

    .jn-results-row:nth-child(8) {
        animation-delay: 0.4s;
    }
}

/* En móvil: animación simple de fade-in SIN translateX */
@media (max-width: 767px) {
    .jn-results-row {
        animation: jn-results-mobileFadeIn 0.3s ease-out backwards;
    }

    .jn-results-row:nth-child(1) {
        animation-delay: 0.05s;
    }

    .jn-results-row:nth-child(2) {
        animation-delay: 0.1s;
    }

    .jn-results-row:nth-child(3) {
        animation-delay: 0.15s;
    }

    .jn-results-row:nth-child(4) {
        animation-delay: 0.2s;
    }

    .jn-results-row:nth-child(5) {
        animation-delay: 0.25s;
    }

    .jn-results-row:nth-child(6) {
        animation-delay: 0.3s;
    }

    .jn-results-row:nth-child(7) {
        animation-delay: 0.35s;
    }

    .jn-results-row:nth-child(8) {
        animation-delay: 0.4s;
    }
}

@keyframes jn-results-rowSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes jn-results-mobileFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========================================
   RIBBON "NUEVO" PARA PRODUCTOS RECIENTES
   ======================================== */
.jn-ribbon-nuevo {
    position: absolute;
    top: 5px;
    left: -5px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px 4px 8px;
    z-index: 15;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1;
    border-radius: 0 3px 3px 0;
}

.jn-ribbon-nuevo::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    border-style: solid;
    border-width: 0 0 4px 5px;
    border-color: transparent transparent #990000 transparent;
}

/* ========================================
   BOTÓN AGREGAR CAJA - TABLA DE RESULTADOS
   ======================================== */
@keyframes pulse-soft-caja {
    0%, 100% { box-shadow: 0 3px 10px rgba(255, 69, 0, 0.3), 0 0 15px rgba(255, 100, 0, 0.2); }
    50% { box-shadow: 0 5px 15px rgba(255, 69, 0, 0.4), 0 0 25px rgba(255, 100, 0, 0.3); }
}

@keyframes shimmer-caja {
    0% { left: -100%; }
    100% { left: 100%; }
}

.jn-btn-add-caja {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #e63900 0%, #ff4500 50%, #ff5722 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin-top: 10px !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 10px rgba(255, 69, 0, 0.3), 0 0 15px rgba(255, 100, 0, 0.2) !important;
    animation: pulse-soft-caja 2s ease-in-out infinite !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    overflow: hidden !important;
}

.jn-btn-add-caja::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: shimmer-caja 3s ease-in-out infinite;
}

.jn-btn-add-caja:hover {
    background: linear-gradient(135deg, #ff4500 0%, #ff5722 50%, #ff6f3c 100%) !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4), 0 0 30px rgba(255, 100, 0, 0.3) !important;
    animation: none !important;
}

.jn-btn-add-caja:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 69, 0, 0.3) !important;
}

.jn-btn-add-caja i {
    font-size: 14px !important;
}

.jn-price-caja {
    background-color: rgba(255, 69, 0, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    margin-top: 4px;
}

.jn-price-level-caja,
.jn-price-value-caja {
    color: #e63900 !important;
}

@media (max-width: 767px) {
    .jn-btn-add-caja {
        width: 100% !important;
        height: 40px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
        margin-top: 0 !important;
        border-radius: 8px !important;
        animation: none !important;
    }

    .jn-btn-add-caja::before {
        display: none !important;
    }

    .jn-btn-add-caja i {
        font-size: 12px !important;
    }
}

/* Asegurar que el wrapper de imagen tenga position relative */
.jn-image-wrapper {
    position: relative;
}