:root {
    --color-texto: #4B5563;
    --color-fondo: #F8FAFC;
    --color-enlace: #2563EB;
    --color-acento: #2563EB;
    --color-primario: #2563EB;
    --color-secundario: #06B6D4;
    --color-borde: #E5E7EB;
    --color-sombra: rgba(37, 99, 235, 0.1);
    --azul-tech: #2563EB;
    --negro-industrial: #1A1A2E;
}

.producto-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--color-sombra);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--color-borde);
    overflow: hidden;
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--color-acento);
}

.badge-descuento {
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.3);
}

/* .badge-stock {
    background: #FEF3C7;
    color: #92400E;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
} */

.badge-sku {
    background: #E0E7FF;
    color: #3730A3;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

.badge-parte {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #1A1A2E;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* .badge-stock-bajo {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.7rem;
    animation: pulse 2s infinite;
} */

.badge-garantia {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.7rem;
}

.btn-compra-rapida {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-compra-rapida:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.cta-banner {
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 8px 25px rgba(139, 95, 191, 0.2);
}

.cta-banner h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.cta-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.producto-especifico {
    border: 2px solid var(--color-acento);
    position: relative;
}

.producto-especifico::before {
    content: 'ESPECÍFICO';
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--color-acento);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 10;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.tooltip-sku {
    position: relative;
    cursor: help;
}

.tooltip-sku:hover::after {
    content: 'Código único del producto. Útil para referencia técnica.';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1F2937;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 5px;
}

.filtro-rapido {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filtro-rapido h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-texto);
}

.precio-actual {
    color: var(--color-secundario);
    font-weight: 700;
    font-size: 1.5rem;
}

.precio-original {
    color: #9CA3AF;
    text-decoration: line-through;
    font-size: 1.125rem;
}

.btn-agregar {
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-agregar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 95, 191, 0.4);
}

.btn-detalles {
    background: var(--color-fondo);
    color: var(--color-texto);
    border: 2px solid var(--color-borde);
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-detalles:hover {
    border-color: var(--color-acento);
    background: var(--color-acento);
    color: white;
}

.rating-stars {
    color: #FBBF24;
}

.categoria-tag {
    background: var(--color-fondo);
    color: var(--color-enlace);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid var(--color-borde);
    transition: all 0.3s ease;
}

.categoria-tag:hover {
    background: var(--color-enlace);
    color: white;
}

.paginacion-btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--color-borde);
    background: white;
    color: var(--color-texto);
}

.paginacion-btn:hover {
    border-color: var(--color-enlace);
    color: var(--color-enlace);
}

.paginacion-btn.active {
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
    color: white;
    border-color: transparent;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Optimización de carga de imágenes */
.producto-card img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============ TOAST CARRITO MEJORADO ============ */
.toast-carrito-mejorado {
    position: fixed;
    top: 100px;
    right: 16px;
    z-index: 99999;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    max-width: 380px;
    width: calc(100vw - 32px);
    transform: translateX(calc(100% + 20px));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.toast-carrito-mejorado.toast-carrito-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-carrito-icono {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-carrito-icono i {
    color: white;
    font-size: 24px;
}

.toast-carrito-contenido {
    flex: 1;
    min-width: 0;
}

.toast-carrito-mensaje {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    margin-bottom: 4px;
}

.toast-carrito-resumen {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.toast-carrito-items {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toast-carrito-total {
    font-size: 14px;
    font-weight: 700;
    color: #10B981;
}

.toast-carrito-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #8B5FBF 0%, #6D28D9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-carrito-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.4);
}

.toast-carrito-cerrar {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}

.toast-carrito-cerrar:hover {
    color: #374151;
}

.toast-carrito-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #8B5FBF;
    border-radius: 0 0 16px 16px;
    animation: toast-progress 5s linear forwards;
}

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ============ QUICK VIEW MODAL ============ */
.quickview-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quickview-modal.active {
    opacity: 1;
    visibility: visible;
}

.quickview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.quickview-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.quickview-modal.active .quickview-content {
    transform: scale(1);
}

.quickview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #6b7280;
}

.quickview-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #8B5FBF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.quickview-producto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 640px) {
    .quickview-producto {
        grid-template-columns: 1fr;
    }
}

.quickview-imagen {
    position: relative;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.quickview-imagen img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 12px;
}

.quickview-badge-oferta {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #EF4444;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.quickview-detalles {
    padding: 32px;
    position: relative;
}

.quickview-cerrar {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.quickview-cerrar:hover {
    background: #e5e7eb;
    color: #374151;
}

.quickview-sku {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0e7ff;
    color: #3730a3;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
}

.quickview-titulo {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    line-height: 1.3;
}

.quickview-precio {
    margin-bottom: 24px;
}

.quickview-precio-actual {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #8B5FBF, #6D28D9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quickview-acciones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.quickview-btn-comprar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.quickview-btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.quickview-btn-agregar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #8B5FBF 0%, #6D28D9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quickview-btn-agregar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(139, 95, 191, 0.4);
}

.quickview-ver-mas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #8B5FBF;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.quickview-ver-mas:hover {
    color: #6D28D9;
    text-decoration: underline;
}

.quickview-error {
    text-align: center;
    padding: 60px;
    color: #EF4444;
}

.quickview-error i {
    font-size: 48px;
    margin-bottom: 16px;
}

.quickview-error p {
    margin-bottom: 20px;
    color: #6b7280;
}

.quickview-btn-cerrar {
    padding: 12px 24px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

/* ============ STICKY ADD TO CART (MOBILE) ============ */
.sticky-add-to-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 9990;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.sticky-add-to-cart.visible {
    transform: translateY(0);
    opacity: 1;
}

.sticky-info {
    flex: 1;
    min-width: 0;
}

.sticky-text {
    font-size: 13px;
    color: #6b7280;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-btn-carrito {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #8B5FBF 0%, #6D28D9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sticky-btn-carrito:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(139, 95, 191, 0.4);
}

@media (min-width: 768px) {
    .sticky-add-to-cart {
        display: none !important;
    }
}

/* ============ BOTON COMPRAR AHORA EN GRID ============ */
.btn-comprar-ahora {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-comprar-ahora:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* =============================================
   ESTILOS DE PAGINA DE BUSQUEDA - Encapsulados
   No interfieren con el header de Tailwind
============================================= */
.search-page {

/* =============================================
   LAYOUT — mobile first
============================================= */
.container-mobile {
    width: 100%;
    padding: 0 .75rem;
    margin: 0 auto;
}
@media (min-width: 768px)  { .container-mobile { max-width: 960px;  padding: 0 1.25rem; } }
@media (min-width: 1024px) { .container-mobile { max-width: 1200px; padding: 0 1.5rem;  } }
@media (min-width: 1280px) { .container-mobile { max-width: 1440px; } }

/* =============================================
   GRID DE PRODUCTOS — responsive
============================================= */
.products-grid,
#productsGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}

@media (min-width: 640px) {
    .products-grid,
    #productsGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid,
    #productsGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* =============================================
   VISTA DE LISTA - Estilo ShopJimmy
============================================= */
.kuListView .products-grid {
    display: block;
    gap: 0;
}

.kuListView .product-card {
    display: flex;
    flex-direction: row;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    transition: all 0.2s;
}

.kuListView .product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.kuListView .product-image-container {
    width: 200px;
    min-width: 200px;
    margin-right: 20px;
}

.kuListView .product-image-container img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
}

.kuListView .product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kuListView .product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.kuListView .product-sku {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.kuListView .product-part-number {
    font-size: 14px;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 12px;
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.kuListView .product-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kuListView .product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.kuListView .product-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.kuListView .btn-comprar {
    flex: 2;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.kuListView .btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.kuListView .btn-comparar {
    flex: 1;
    background: linear-gradient(135deg, #0c72c0 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.kuListView .btn-comparar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 114, 192, 0.3);
}

/* =============================================
   VISTA DE GRID (default)
   SOLO 1 COLUMNA PARA MOBILE Y TABLET
============================================= */
.kuGridView .products-grid {
    display: grid;
    grid-template-columns: 1fr; /* SOLO 1 COLUMNA PARA MOBILE Y TABLET */
    gap: 20px;
}

/* 3 columnas solo en desktop (≥1024px) */
@media (min-width: 1024px) {
    .kuGridView .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.kuGridView .product-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    transition: all 0.2s;
}

.kuGridView .product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.kuGridView .product-image-container {
    width: 100%;
    height: 200px;
    margin-bottom: 16px;
}

.kuGridView .product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
}

/* Estilos generales para badges y elementos */
/* .product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
} */


/* =============================================
   ESTILOS DE DESCRIPCION - EXPAND/COLLAPSE
============================================= */
.product-description-container { margin: .5rem 0; }

.toggle-desc-btn {
    width: 100%;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 2px solid #2563eb;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
    font-weight: 700;
    color: #1e40af;
    transition: all 0.25s ease;
    margin-bottom: .5rem;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.toggle-desc-btn:active { transform: scale(0.98); background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%); }
.toggle-desc-btn:hover { background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%); border-color: #1d4ed8; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }
.toggle-desc-btn i { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-size: .9rem; }
.toggle-desc-btn.expanded { background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%); border-color: #16a34a; color: #166534; }
.toggle-desc-btn.expanded:hover { background: linear-gradient(135deg, #bbf7d0 0%, #dcfce7 100%); border-color: #15803d; }
.toggle-desc-btn.expanded i { transform: rotate(180deg); }
.toggle-desc-btn .btn-text { display: flex; align-items: center; gap: .5rem; }

.descripcion-preview {
    font-size: .78rem;
    color: var(--text-muted);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .5rem .625rem;
    line-height: 1.55;
    white-space: pre-line;
    flex-shrink: 0;
    max-height: 60px;
    overflow: hidden;
    position: relative;
}
.descripcion-preview::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #f9fafb);
}
.descripcion-completa {
    font-size: .78rem;
    color: var(--text-muted);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .5rem .625rem;
    line-height: 1.55;
    white-space: pre-line;
    flex-shrink: 0;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}
.descripcion-completa.expanded { display: block; }
.hidden { display: none !important; }
.descripcion-preview:not(.hidden) { display: block; }
.descripcion-completa::-webkit-scrollbar { width: 4px; }
.descripcion-completa::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.descripcion-completa::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.descripcion-completa::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

@media (min-width: 1024px) {
    .product-description-container { display: block; }
    .toggle-desc-btn { display: none; }
    .descripcion-preview { display: none; }
    .descripcion-completa { display: block; max-height: 110px; }
}

/* =============================================
   FILTROS MOVILES
============================================= */
.filtros-mobile {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37,99,235,.35);
    cursor: pointer;
    transition: all .25s ease;
    font-size: 1.2rem;
}
.filtros-mobile:hover { transform: scale(1.1); box-shadow: 0 8px 24px rgba(37,99,235,.45); }
.filtros-mobile:active { transform: scale(0.95); }

.filtros-sidebar {
    position: fixed;
    top: 0; left: -100%;
    width: 85%; max-width: 340px;
    height: 100%;
    background: #fff;
    z-index: 1100;
    overflow-y: auto;
    transition: left .3s cubic-bezier(.25,.46,.45,.94);
    box-shadow: 6px 0 24px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
}
.filtros-sidebar.active { left: 0; }

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1050;
    opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility .3s;
    backdrop-filter: blur(2px);
}
.overlay.active { opacity: 1; visibility: visible; }

.filtros-desktop { display: none !important; }
.filtros-mobile { display: none !important; }
@media (max-width: 767px) { .filtros-mobile { display: block !important; } }

/* =============================================
   MODAL DETALLE PRODUCTO
============================================= */
.modal-detalle {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-detalle.active { display: flex; }
.modal-detalle-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.modal-detalle-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-detalle-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.modal-detalle-header h2 {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.4;
}
.modal-sku {
    font-size: .7rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: .25rem .5rem;
    border-radius: .25rem;
    font-family: monospace;
    white-space: nowrap;
}
.modal-close {
    background: #f3f4f6;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #6b7280;
}

/* =============================================
   ESTILOS SHOPJIMMY
============================================= */
.kuResultList { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); width: 100%; max-width: 100%; }
.kuResultInfo { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #e5e7eb; }
.kuTotalResultsTab { float: left; }
.kuPagination { float: right; }
.kuPagination a { display: inline-block; padding: 6px 12px; margin: 0 2px; background: #f3f4f6; color: #374151; text-decoration: none; border-radius: 4px; font-size: 14px; transition: all 0.2s; }
.kuPagination a.kuCurrent { background: #2563eb; color: white; }
.kuPagination a:hover:not(.kuCurrent) { background: #e5e7eb; }
.kuClearBoth, .kuClearLeft { clear: both; }
.kuView { display: flex; align-items: center; gap: 8px; }
.kuGridviewBtn, .kuListviewBtn { padding: 6px; border: 1px solid #d1d5db; border-radius: 4px; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; text-decoration: none; color: #374151; background: white; transition: all 0.2s; }
.kuListviewBtn.kuCurrent, .kuGridviewBtn.kuCurrent { border-color: #2563eb; background: #eff6ff; color: #2563eb; }
.kuGridviewBtn:hover:not(.kuCurrent), .kuListviewBtn:hover:not(.kuCurrent) { background: #f9fafb; border-color: #9ca3af; }

/* =============================================
   RESULTADOS DE BUSQUEDA - Header
============================================= */
.results-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
@media (min-width: 640px) {
    .results-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.results-count {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .95rem;
}
.count-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
}
.count-label {
    color: #6b7280;
    font-weight: 500;
}
.count-query {
    color: #374151;
}
.count-query strong {
    color: #2563eb;
}

.results-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.sort-select {
    padding: .5rem .75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: .85rem;
    background: white;
    cursor: pointer;
    color: #374151;
}
.sort-select:focus {
    outline: none;
    border-color: #2563eb;
}

.view-toggle {
    display: flex;
    gap: .25rem;
    background: #f3f4f6;
    padding: .25rem;
    border-radius: 8px;
}
.view-btn {
    padding: .5rem .75rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all .2s;
}
.view-btn:hover {
    background: white;
    color: #374151;
}
.view-btn.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* =============================================
   TARJETA DE PRODUCTO - GRID
============================================= */
.product-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all .3s;
    position: relative;
}
.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    border-color: #2563eb;
}

/* .product-badges {
    position: absolute;
    top: .75rem;
    left: .75rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    z-index: 2; */
}

.product-image-link {
    display: block;
    text-decoration: none;
}
.product-image {
    position: relative;
    height: 120px;
    background: #f8fafc;
    overflow: hidden;
}
@media (min-width: 480px) { .product-image { height: 140px; } }
@media (min-width: 768px) { .product-image { height: 160px; } }

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s;
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}

.viewers-badge {
    position: absolute;
    bottom: .5rem;
    right: .5rem;
    background: rgba(0,0,0,0.75);
    color: white;
    font-size: .7rem;
    font-weight: 600;
    padding: .25rem .5rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: .25rem;
    backdrop-filter: blur(4px);
}
.live-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.product-content {
    padding: .625rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
@media (min-width: 768px) { .product-content { padding: .75rem; } }

.product-sku {
    font-size: .7rem;
    font-family: 'Courier New', monospace;
    color: #6b7280;
    background: #f3f4f6;
    padding: .2rem .4rem;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.product-name {
    font-size: .8rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.product-name a {
    color: inherit;
    text-decoration: none;
}
.product-name a:hover {
    color: #2563eb;
}

.product-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .8rem;
}
.stars {
    display: flex;
    gap: .1rem;
}
.stars i {
    font-size: .75rem;
    color: #d1d5db;
}
.stars i.active {
    color: #f59e0b;
}
.rating-value {
    font-weight: 600;
    color: #374151;
}
.sales-badge {
    color: #10b981;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .2rem;
}
.sales-badge i {
    font-size: .7rem;
}

/* =============================================
   PRECIO - PRODUCTO
============================================= */
.product-price-box {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .35rem;
}
.price-current {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
}
.price-original {
    font-size: .9rem;
    color: #9ca3af;
    text-decoration: line-through;
}
.price-savings {
    font-size: .75rem;
    font-weight: 600;
    color: #059669;
    background: #d1fae5;
    padding: .2rem .5rem;
    border-radius: 999px;
}

/* =============================================
   STOCK
============================================= */
.stock-indicator {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.stock-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    max-width: 80px;
}
.stock-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 3px;
    transition: width .3s;
}
.stock-text {
    font-size: .75rem;
    color: #6b7280;
    font-weight: 500;
}
.out-of-stock-badge {
    background: #fee2e2;
    color: #991b1b;
    padding: .4rem .75rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 700;
    text-align: center;
}

/* =============================================
   ACCIONES DEL PRODUCTO
============================================= */
.product-actions {
    display: flex;
    gap: .35rem;
    margin-top: auto;
}
.btn-add-cart {
    flex: 1;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: .5rem .6rem;
    border-radius: .5rem;
    font-weight: 700;
    font-size: .75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
    transition: all .2s;
}
.btn-add-cart:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.btn-add-cart:active {
    transform: translateY(0);
}
.btn-disabled {
    flex: 1;
    background: #9ca3af;
    color: white;
    border: none;
    padding: .5rem .6rem;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .75rem;
    cursor: not-allowed;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
}
.btn-compare {
    padding: .5rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    transition: all .2s;
}
.btn-compare:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* =============================================
   PAGINACION
============================================= */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}
.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: all .2s;
}
.page-btn:hover {
    background: #f3f4f6;
    border-color: #2563eb;
    color: #2563eb;
}
.page-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* =============================================
   HELP SECTION
============================================= */
.help-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    margin-top: 2rem;
}
.help-icon {
    width: 48px;
    height: 48px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.help-text {
    flex: 1;
}
.help-text p {
    margin: 0 0 .25rem;
    font-size: .9rem;
    color: #374151;
}
.help-text a {
    font-size: .85rem;
    color: #2563eb;
    font-weight: 600;
}
.help-btn {
    padding: .5rem 1rem;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.help-btn:hover {
    background: #1d4ed8;
}

/* =============================================
   TRUST BADGES
============================================= */
.trust-header {
    text-align: center;
    margin-bottom: 1.25rem;
}
.trust-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 .25rem;
}
.trust-header p {
    font-size: .8rem;
    color: #6b7280;
    margin: 0;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
}
.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all .2s;
}
.trust-item:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.1);
}
.trust-item i {
    font-size: 1.5rem;
    color: #2563eb;
    margin-bottom: .5rem;
}
.trust-item span {
    font-size: .75rem;
    font-weight: 600;
    color: #374151;
}
.trust-item small {
    font-size: .65rem;
    color: #6b7280;
}

/* =============================================
   BADGES COMPLEMENTARIOS
============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.4;
}
.badge-discount { background: #ef4444; color: white; }
/* Estas clases están comentadas para evitar conflictos con la barra superior */
/* .badge-stock { background: #f59e0b; color: white; } */
/* .badge-available { background: #10b981; color: white; } */

/* Badges específicos para index.php */
.badge-stock-index {
    background: #f59e0b;
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
}

.badge-stock-bajo-index {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    animation: pulse-badge 2s infinite;
}

.badge-stock-bajo-ofertas {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    animation: pulse-badge 2s infinite;
}

/* Badges para sección AJAX en search.php */
.ajax-badge-stock-low {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: .35rem .65rem;
    border-radius: .5rem;
    font-size: .7rem;
    font-weight: 700;
    animation: pulse-badge 2s infinite;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
    z-index: 10;
}

.ajax-badge-stock-available {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: #10b981;
    color: white;
    padding: .35rem .65rem;
    border-radius: .5rem;
    font-size: .7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    z-index: 10;
}

.ajax-badge-stock-out {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    font-size: .85rem;
    font-weight: 700;
    z-index: 10;
}

.ajax-badge-discount {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: .35rem .65rem;
    border-radius: .5rem;
    font-size: .75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

/* =============================================
   NO RESULTS STATE
============================================= */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
}
.no-results i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}
.no-results h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 .5rem;
}
.no-results p {
    color: #6b7280;
    margin: 0 0 1.5rem;
}

/* =============================================
   BTN COMPRAR (legacy)
============================================= */
.btn-comprar {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: .75rem 1rem;
    border-radius: .625rem;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    transition: all .2s;
}
.btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,99,235,0.4);
}
.btn-ver {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: .75rem .875rem;
    border-radius: .625rem;
    font-weight: 600;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    cursor: pointer;
}
.btn-ver:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

} /* Fin .search-page */

/* =============================================
   BREADCRUMB
============================================= */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .625rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: .8rem;
}
.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .4rem;
    border-radius: 4px;
    transition: all .2s;
}
.breadcrumb a:hover {
    background: #eff6ff;
    color: #1d4ed8;
}
.breadcrumb a i {
    font-size: .75rem;
}
.breadcrumb span[aria-hidden="true"] {
    color: #9ca3af;
    font-weight: 300;
}

/* =============================================
   RESULTADOS SEARCH HEADER
============================================= */
.search-results-header {
    margin-bottom: 1rem;
}
.search-results-header p {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}
.search-results-header .results-label {
    font-weight: 600;
    color: #2563eb;
}
.search-results-header .search-query {
    font-family: 'Courier New', monospace;
    background: #f3f4f6;
    padding: .25rem .5rem;
    border-radius: 6px;
    color: #1f2937;
    font-size: .9rem;
}

/* =============================================
   CONTENEDOR CON MARGENES MINIMOS - SEARCH.PHP
   ============================================= */

/* Contenedor principal con márgenes */
.container-contained {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid principal en contenedor */
.grid-contained {
    display: grid;
    gap: 1.5rem;
}

/* Grid de productos en contenedor */
.products-grid-contained {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Tarjeta de producto en contenedor */
.product-card-contained {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
}

.product-card-contained:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #d1d5db;
}

/* Badges en contenedor */
/* .product-card-contained .product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
} */

.product-card-contained .badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card-contained .badge-discount {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.product-card-contained .badge-stock-contained {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    animation: pulse-badge 2s infinite;
}

.product-card-contained .badge-available-contained {
    background: #10b981;
    color: white;
}

/* Imagen del producto en contenedor */
.product-card-contained .product-image-link {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.product-card-contained .product-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-card-contained .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
}

.product-card-contained .viewers-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.product-card-contained .live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

/* Contenido del producto en contenedor */
.product-card-contained .product-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-card-contained .product-sku {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

.product-card-contained .product-name {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

.product-card-contained .product-name a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-contained .product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-card-contained .stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.product-card-contained .stars i {
    font-size: 0.7rem;
    color: #d1d5db;
}

.product-card-contained .stars i.active {
    color: #f59e0b;
}

.product-card-contained .rating-value {
    font-size: 0.7rem;
    color: #6b7280;
}

.product-card-contained .sales-badge {
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Descripción del producto en contenedor */
.product-card-contained .product-description-container {
    margin: 0.5rem 0;
}

.product-card-contained .toggle-desc-btn {
    width: 100%;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.product-card-contained .toggle-desc-btn:hover {
    background: #e5e7eb;
}

.product-card-contained .descripcion-preview,
.product-card-contained .descripcion-completa {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #6b7280;
}

.product-card-contained .descripcion-completa {
    display: none;
}

/* Precio en contenedor */
.product-card-contained .product-price-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid #fcd34d;
}

.product-card-contained .price-current {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.product-card-contained .price-original {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-card-contained .price-savings {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.7rem;
    color: #92400e;
    font-weight: 600;
}

/* Stock indicator en contenedor */
.product-card-contained .stock-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-card-contained .stock-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.product-card-contained .stock-fill {
    height: 100%;
    background: #10b981;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.product-card-contained .stock-text {
    font-size: 0.65rem;
    color: #6b7280;
    font-weight: 500;
}

.product-card-contained .out-of-stock-badge {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

/* Acciones en contenedor */
.product-card-contained .product-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.product-card-contained .btn-add-cart {
    flex: 1;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.product-card-contained .btn-add-cart:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.product-card-contained .btn-disabled {
    flex: 1;
    background: #9ca3af;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: not-allowed;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-card-contained .btn-compare {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.product-card-contained .btn-compare:hover {
    background: #e5e7eb;
}

/* Header de resultados en contenedor */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.results-count .count-number {
    font-weight: 700;
    color: #111827;
    font-size: 1.1rem;
}

.results-count .count-query {
    color: #6b7280;
}

.results-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #374151;
    background: white;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active {
    background: white;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Paginación en contenedor */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.page-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.page-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.page-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Sección de ayuda en contenedor */
.help-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 1px solid #bae6fd;
    margin: 1.5rem 0;
}

.help-icon {
    width: 48px;
    height: 48px;
    background: #0ea5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.help-text {
    flex: 1;
}

.help-text h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0369a1;
}

.help-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #0c4a6e;
}

.help-btn {
    padding: 0.75rem 1.25rem;
    background: #0ea5e9;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.help-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

/* Trust badges en contenedor */
.trust-header {
    text-align: center;
    margin: 2rem 0 1rem;
}

.trust-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}

.trust-header p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.trust-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s;
}

.trust-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.trust-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-item span {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.trust-item small {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Animaciones */
@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsividad para contenedor */
@media (max-width: 768px) {
    .container-contained {
        padding: 0 15px;
    }
    
    .products-grid-contained {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .results-toolbar {
        width: 100%;
        justify-content: space-between;
    }
    
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container-contained {
        padding: 0 10px;
    }
    
    .products-grid-contained {
        grid-template-columns: 1fr;
    }
    
    .product-card-contained .product-actions {
        flex-direction: column;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .help-section {
        flex-direction: column;
        text-align: center;
    }
    
    .help-icon {
        margin-bottom: 0.75rem;
    }
}

/* Botón de filtros en contenedor */
.filters-container-contained {
    margin: 1rem 0;
}

.btn-filters-contained {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-filters-contained:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-filters-contained i {
    color: #2563eb;
}

.filters-active-badge {
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #2563eb;
    color: white;
    font-size: 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

/* Sin resultados en contenedor */
.no-results-contained {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}

.no-results-contained h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #111827;
}

.no-results-contained p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 0 1.25rem;
}

.no-results-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .no-results-buttons {
        flex-direction: row;
    }
}

.btn-primary-contained {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary-contained:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline-contained {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-outline-contained:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Breadcrumb en contenedor */
.breadcrumb-contained {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.breadcrumb-contained a {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb-contained a:hover {
    text-decoration: underline;
}

.breadcrumb-contained span[aria-hidden="true"] {
    color: #d1d5db;
}

.breadcrumb-contained .search-term {
    color: #111827;
    font-weight: 500;
}

/* Encabezado de búsqueda en contenedor */
.search-header-contained {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.search-header-contained p {
    margin: 0;
    font-size: 1rem;
    color: #4b5563;
}

.search-header-contained .search-term-contained {
    font-family: 'Courier New', monospace;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    color: #1f2937;
    font-size: 0.9rem;
}

/* Sidebar de filtros móvil en contenedor */
.filtros-sidebar-contained {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.filtros-sidebar-contained.active {
    right: 0;
}

.filtros-header-contained {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
}

.filtros-header-contained h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filtros-content-contained {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

/* Mejoras de responsividad adicionales */
@media (min-width: 481px) and (max-width: 640px) {
    .products-grid-contained {
        grid-template-columns: 1fr;
    }
    
    .product-card-contained .product-content {
        padding: 1rem;
    }
    
    .product-card-contained .price-current {
        font-size: 1.25rem;
    }
    
    .results-count {
        flex-wrap: wrap;
    }
    
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .trust-item {
        padding: 1rem;
    }
}

@media (max-width: 400px) {
    .products-grid-contained {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card-contained .product-actions {
        flex-direction: column;
    }
    
    .btn-add-cart,
    .btn-disabled,
    .btn-compare {
        width: 100%;
    }
}
