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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

/* Header actualizado */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #555555;
}

.logo {
    height: 80px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 25px;
    padding: 5px 15px;
    border: 1px solid #ddd;
}

.search-input {
    border: none;
    background: none;
    outline: none;
    padding: 8px;
    width: 300px;
    font-size: 14px;
}

.search-button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.discount-info {
    background-color: #439b59;
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

/* Navegaci車n mejorada */
.main-nav {
    background-color: #b1b1b1;
    padding: 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-button {
    background-color: transparent;
    color: white;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    position: relative;
}

.nav-button:hover {
    background-color: rgba(85, 85, 85, 0.3);
}

.nav-button.active {
    background-color: #599978;
}

.nav-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #8ec500;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 24px;
    color: #555555;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Etiqueta de cantidad */
.quantity-label {
    color: #ff4444;
    font-size: 12px;
    margin-right: 10px;
}

.quantity-label-inline {
    position: absolute;
    top: -20px;
    left: 0;
    color: #ff4444;
    font-size: 11px;
    white-space: nowrap;
}

/* Bot車n flotante WhatsApp actualizado */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 999;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
}

/* Productos */
.products-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-item {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.2;
}

.product-code {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.product-price {
    font-size: 20px;
    color: #5ab92b;
    margin: 5px 0;
    font-weight: bold;
}

.product-iva {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* Control de cantidad en productos */
.product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    position: relative;
}

.add-to-cart {
    background-color: #5b94b3;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.add-to-cart:hover {
    background-color: #333333;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    position: relative;
}

.quantity-btn {
    background-color: #f0f0f0;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-display {
    width: 30px;
    text-align: center;
    font-weight: bold;
}

/* Paginaci車n */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.items-per-page select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.pagination-info {
    color: #666;
}

.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination-nav button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.pagination-nav button:hover:not(:disabled) {
    background-color: #555555;
    color: white;
    border-color: #555555;
}

.pagination-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-nav button.active {
    background-color: #555555;
    color: white;
    border-color: #555555;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    margin-bottom: 20px;
}

.modal-code {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.modal-price {
    font-size: 28px;
    color: #5ab92b;
    margin: 10px 0;
    font-weight: bold;
}

.modal-iva {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.modal-description {
    line-height: 1.6;
    margin-bottom: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.add-to-cart-modal {
    background-color: #5b94b3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.add-to-cart-modal:hover {
    background-color: #333333;
}

.quantity-control-modal {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive - REEMPLAZAR la secci車n @media (max-width: 768px) con esto */
@media (max-width: 768px) {
    .header-top {
        flex-direction: row;
        gap: 10px;
        padding: 10px 15px;
        align-items: center;
    }
    
    .logo {
        height: 45px;
        flex-shrink: 0;
    }
    
    .header-actions {
        flex: 1;
        gap: 10px;
        justify-content: space-between;
    }
    
    .search-container {
        flex: 1;
        padding: 3px 10px;
        max-width: calc(100% - 80px);
    }
    
    .search-input {
        width: 100%;
        padding: 6px;
        font-size: 14px;
    }
    
    .search-button {
        font-size: 16px;
        padding: 3px;
    }
    
    .cart-icon {
        font-size: 20px;
        flex-shrink: 0;
    }
    
    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 12px;
        top: -8px;
        right: -8px;
    }
    
    .discount-info {
        font-size: 12px;
        padding: 8px;
    }
    
    .main-nav {
        flex-wrap: wrap;
    }
    
    .nav-button {
        font-size: 14px;
        padding: 12px 20px;
        flex: 1;
        min-width: 120px;
    }
    
    .products-container {
        grid-template-columns: 1fr !important; /* Agregar !important para asegurar que sea 1 columna */
        gap: 15px;
    }
    
    .product-item {
        flex-direction: row;
        padding: 10px;
    }
    
    .product-image {
        width: 100px;
        height: 100px;
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-code {
        font-size: 11px;
    }
    
    .product-price {
        font-size: 18px;
        margin: 5px 0;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .quantity-control {
        margin-left: 0;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-nav {
        flex-wrap: wrap;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 1024px) {
    .products-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== ESTILOS DEL CARRITO ===== */

/* P芍gina del carrito */
.back-button {
    background-color: #555555;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
}

.back-button:hover {
    background-color: #333333;
}

.cart-page {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-top: 30px;
}

.cart-item-row {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-details h4 {
    margin-bottom: 5px;
}

.cart-item-code {
    color: #666;
    font-size: 14px;
}

.item-total {
    font-size: 18px;
    font-weight: bold;
    color: #555555;
}

.remove-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.remove-button:hover {
    background-color: #c0392b;
}

/* Resumen del carrito */
.cart-summary {
    background-color: #f8f8f8;
    padding: 25px;
    border-radius: 10px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Alerta de medio de pago */
.payment-alert {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.payment-alert.hidden {
    display: none;
}

.payment-options {
    margin: 20px 0;
}

.payment-options h4 {
    margin-bottom: 15px;
    color: #333;
}

.payment-option {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.payment-option input {
    margin-right: 10px;
}

.payment-option span {
    color: #555;
}

.totals {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.discount-line {
    color: #e74c3c;
}

.final-total {
    font-size: 24px;
    font-weight: bold;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #333;
}

.checkout-button {
    width: 100%;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.checkout-button.whatsapp {
    background-color: #25D366;
}

.checkout-button.whatsapp:hover {
    background-color: #20BA5A;
}

.checkout-button.email {
    background-color: #555555;
}

.checkout-button.email:hover {
    background-color: #333333;
}

.empty-cart-message {
    text-align: center;
    padding: 50px;
    color: #666;
}

.empty-cart-message h3 {
    margin-bottom: 15px;
}

.empty-cart-message .add-to-cart {
    background-color: #555555;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
}

.empty-cart-message .add-to-cart:hover {
    background-color: #333333;
}

/* Responsive para el carrito */
@media (max-width: 1024px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 20px;
    }
    
    .cart-item-row {
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
        grid-row: span 3;
    }
    
    .quantity-control {
        grid-column: 2;
        justify-self: start;
        margin-top: 10px;
    }
    
    .item-total {
        grid-column: 2;
        margin-top: 5px;
    }
    
    .remove-button {
        grid-column: 2;
        width: fit-content;
        margin-top: 5px;
    }
    
    .cart-summary {
        padding: 20px;
    }
    
    .checkout-button {
        font-size: 14px;
        padding: 12px;
    }
}

/* Estilos para el bot車n volver en m車vil */
@media (max-width: 768px) {
    .header-top .back-button {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Estilos para el input de ir a p芍gina */
.pagination-nav input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.pagination-nav input[type="number"]::-webkit-inner-spin-button,
.pagination-nav input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Responsive para el input de p芍gina */
@media (max-width: 768px) {
    .pagination-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-nav > div {
        width: 100%;
        margin-top: 10px;
        justify-content: center;
    }
}

.export-pdf-button {
    background-color: #75b176;
    color: white;
    border: none;
    padding: 10px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-left: auto;
    margin-left: 10px;
}

.export-pdf-button:hover {
    background-color: #c82333;
}

@media (max-width: 768px) {
    .export-pdf-button {
        width: 100%;
        margin-top: 10px;
    }
}

/* Información del usuario */
.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 5px;
}

.user-name {
    color: #555;
    font-size: 14px;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.logout-btn:hover {
    background-color: #c82333;
}

@media (max-width: 768px) {
    .user-info {
        margin-bottom: 10px;
    }
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.user-company {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.btn-pedidos {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-pedidos:hover {
    background-color: #218838;
}

/* Navegación mejorada para múltiples marcas */
.nav-desktop {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
}

.nav-mobile {
    display: none;
    padding: 10px;
    width: 100%;
}

.brand-select {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    background-color: #555555;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.brand-select option {
    background-color: white;
    color: #333;
}

/* En móviles, mostrar select y ocultar botones */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .nav-mobile {
        display: block;
    }
}

/* Para tablets, hacer los botones más pequeños */
@media (max-width: 1024px) {
    .nav-button {
        font-size: 14px;
        padding: 10px 15px;
    }
}

/* ====== CARRITO FLOTANTE ====== */
        .floating-cart {
            position: fixed;
            top: 50%;
            right: -350px;
            transform: translateY(-50%);
            width: 350px;
            max-height: 80vh;
            background: white;
            border-radius: 10px 0 0 10px;
            box-shadow: -5px 0 20px rgba(0,0,0,0.3);
            z-index: 1001;
            transition: right 0.3s ease;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        .floating-cart.open {
            right: 0;
        }
        
        .floating-cart-header {
            background: #555555;
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .floating-cart-title {
            font-size: 18px;
            font-weight: bold;
        }
        
        .floating-cart-close {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .floating-cart-body {
            flex: 1;
            overflow-y: auto;
            padding: 0;
        }
        
        .floating-cart-item {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
            gap: 15px;
        }
        
        .floating-cart-item:last-child {
            border-bottom: none;
        }
        
        .floating-cart-item-image {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 5px;
            flex-shrink: 0;
        }
        
        .floating-cart-item-info {
            flex: 1;
            min-width: 0;
        }
        
        .floating-cart-item-name {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 4px;
            line-height: 1.2;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .floating-cart-item-code {
            font-size: 12px;
            color: #666;
            margin-bottom: 4px;
        }
        
        .floating-cart-item-price {
            font-size: 14px;
            color: #5ab92b;
            font-weight: 600;
        }
        
        .floating-cart-item-controls {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }
        
        .floating-cart-quantity {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .floating-cart-qty-btn {
            background: #f0f0f0;
            border: none;
            width: 24px;
            height: 24px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .floating-cart-qty-btn:hover {
            background: #e0e0e0;
        }
        
        .floating-cart-qty-display {
            min-width: 20px;
            text-align: center;
            font-size: 14px;
            font-weight: 600;
        }
        
        .floating-cart-remove {
            background: none;
            border: none;
            color: #dc3545;
            cursor: pointer;
            padding: 2px;
            font-size: 12px;
        }
        
        .floating-cart-remove:hover {
            color: #c82333;
        }
        
        .floating-cart-footer {
            border-top: 2px solid #eee;
            padding: 20px;
            background: #f8f9fa;
        }
        
        .floating-cart-total {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
        }
        
        .floating-cart-checkout {
            width: 100%;
            background: #28a745;
            color: white;
            border: none;
            padding: 12px;
            border-radius: 5px;
            font-size: 16px;
            cursor: pointer;
            transition: background 0.3s;
        }
        
        .floating-cart-checkout:hover {
            background: #218838;
        }
        
        .floating-cart-empty {
            text-align: center;
            padding: 40px 20px;
            color: #666;
        }
        
        .floating-cart-empty h3 {
            margin-bottom: 10px;
            font-size: 16px;
        }
        
        .floating-cart-empty p {
            font-size: 14px;
            margin-bottom: 20px;
        }
        
        .floating-cart-continue {
            background: #555555;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
        }
        
        /* Toggle button */
        .floating-cart-toggle {
            position: fixed;
            top: 50%;
            right: 20px;
            transform: translateY(-50%);
            width: 60px;
            height: 60px;
            background: #555555;
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 24px;
            cursor: pointer;
            z-index: 1002;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }
        
        .floating-cart-toggle:hover {
            transform: translateY(-50%) scale(1.1);
            background: #333333;
        }
        
        .floating-cart-toggle-count {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #dc3545;
            color: white;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .floating-cart {
                width: 300px;
                right: -300px;
            }
            
            .floating-cart-toggle {
                width: 50px;
                height: 50px;
                font-size: 20px;
            }
            
            .floating-cart-toggle-count {
                width: 20px;
                height: 20px;
                font-size: 11px;
            }
        }
        
/* ====== CONTROLES DE VISTA ====== */
        .view-controls {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .view-toggle {
            display: flex;
            background: #f0f0f0;
            border-radius: 5px;
            overflow: hidden;
            border: 1px solid #ddd;
        }
        
        .view-toggle button {
            background: none;
            border: none;
            padding: 8px 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .view-toggle button.active {
            background: #555555;
            color: white;
        }
        
        .view-toggle button:hover:not(.active) {
            background: #e0e0e0;
        }
        
        /* ====== VISTA LISTA ====== */
        .products-container.list-view {
            display: block !important;
        }
        
        .product-item.list-item {
            display: flex !important;
            flex-direction: row !important;
            align-items: center;
            padding: 15px 20px;
            margin-bottom: 10px;
            gap: 20px;
        }
        
        .product-item.list-item .product-image {
            width: 80px !important;
            height: 80px !important;
            flex-shrink: 0;
            margin-bottom: 0 !important;
        }
        
        .product-item.list-item .product-info {
            flex: 1;
            display: grid !important;
            grid-template-columns: 2fr 1fr 1fr 1fr auto;
            gap: 20px;
            align-items: center;
        }
        
        .list-item .product-title {
            font-size: 16px;
            margin-bottom: 5px;
        }
        
        .list-item .product-code {
            font-size: 12px;
            color: #666;
        }
        
        .list-item .product-price {
            font-size: 18px;
            text-align: center;
        }
        
        .list-item .product-iva {
            font-size: 14px;
            text-align: center;
        }
        
        .list-item .product-actions {
            flex-direction: row !important;
            gap: 10px;
            margin-top: 0 !important;
        }
        
        /* ====== VISTA COMPACTA ====== */
        .products-container.compact-view {
            grid-template-columns: repeat(6, 1fr) !important;
            gap: 15px;
        }
        
        .product-item.compact-item {
            padding: 10px !important;
        }
        
        .product-item.compact-item .product-image {
            height: 120px !important;
        }
        
        .compact-item .product-title {
            font-size: 13px !important;
            line-height: 1.2;
            margin-bottom: 5px;
        }
        
        .compact-item .product-code {
            font-size: 11px !important;
        }
        
        .compact-item .product-price {
            font-size: 16px !important;
        }
        
        .compact-item .product-iva {
            font-size: 12px !important;
        }
        
        .compact-item .add-to-cart {
            font-size: 11px !important;
            padding: 6px 8px !important;
        }
        
        /* ====== RESPONSIVE ====== */
        @media (max-width: 1200px) {
            .products-container.compact-view {
                grid-template-columns: repeat(5, 1fr) !important;
            }
        }
        
        @media (max-width: 1024px) {
            .products-container.compact-view {
                grid-template-columns: repeat(4, 1fr) !important;
            }
            
            .product-item.list-item .product-info {
                grid-template-columns: 2fr 1fr 1fr auto;
            }
        }
        
        @media (max-width: 768px) {
            .view-controls {
                flex-direction: column;
                gap: 10px;
            }
            
            .products-container.compact-view {
                grid-template-columns: repeat(2, 1fr) !important;
            }
            
            .product-item.list-item {
                flex-direction: column !important;
                align-items: flex-start;
                gap: 10px;
            }
            
            .product-item.list-item .product-info {
                display: block !important;
                width: 100%;
            }
            
            .product-item.list-item .product-image {
                width: 100px !important;
                height: 100px !important;
                align-self: center;
            }
        }
        
/* ====== BÚSQUEDA INTELIGENTE ====== */
        .search-container {
            position: relative;
            display: flex;
            align-items: center;
            background-color: #f5f5f5;
            border-radius: 25px;
            padding: 5px 15px;
            border: 1px solid #ddd;
            max-width: 400px;
        }
        
        .search-container.focused {
            border-color: #555555;
            box-shadow: 0 0 5px rgba(85,85,85,0.3);
        }
        
        .search-suggestions {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-top: none;
            border-radius: 0 0 10px 10px;
            max-height: 300px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            display: none;
        }
        
        .search-suggestions.show {
            display: block;
        }
        
        .search-suggestion {
            padding: 12px 15px;
            border-bottom: 1px solid #f0f0f0;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: background 0.2s;
        }
        
        .search-suggestion:hover,
        .search-suggestion.highlighted {
            background: #f8f9fa;
        }
        
        .search-suggestion:last-child {
            border-bottom: none;
        }
        
        .suggestion-icon {
            font-size: 16px;
            color: #666;
            width: 20px;
            text-align: center;
        }
        
        .suggestion-text {
            flex: 1;
        }
        
        .suggestion-main {
            font-weight: 600;
            color: #333;
        }
        
        .suggestion-sub {
            font-size: 12px;
            color: #666;
            margin-top: 2px;
        }
        
        .suggestion-count {
            font-size: 12px;
            color: #999;
            background: #f0f0f0;
            padding: 2px 8px;
            border-radius: 10px;
        }
        
        .search-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin: 15px 0;
            padding: 0 20px;
        }
        
        .search-filter {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 20px;
            padding: 5px 15px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .search-filter:hover {
            background: #e9ecef;
        }
        
        .search-filter.active {
            background: #555555;
            color: white;
            border-color: #555555;
        }
        
        .filter-remove {
            background: none;
            border: none;
            color: inherit;
            cursor: pointer;
            padding: 0;
            margin-left: 5px;
            font-size: 16px;
        }
        
        .search-stats {
            background: #e8f4f8;
            padding: 10px 20px;
            margin-bottom: 15px;
            border-radius: 5px;
            font-size: 14px;
            color: #555;
        }
        
        .no-results {
            text-align: center;
            padding: 40px 20px;
            color: #666;
        }
        
        .no-results h3 {
            margin-bottom: 10px;
            color: #333;
        }
        
        .search-suggestions-category {
            background: #f0f0f0;
            padding: 8px 15px;
            font-size: 12px;
            font-weight: 600;
            color: #666;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .search-container {
                max-width: none;
                flex: 1;
            }
            
            .search-filters {
                padding: 0 15px;
            }
            
            .search-filter {
                font-size: 12px;
                padding: 4px 12px;
            }
        }
        
/* ====== COMPARADOR DE PRODUCTOS ====== */
        .compare-checkbox {
            position: absolute;
            top: 10px;
            left: 10px;
            width: 20px;
            height: 20px;
            accent-color: #555555;
            cursor: pointer;
            z-index: 10;
        }
        
        .product-item {
            position: relative;
        }
        
        .product-item.comparing {
            border: 2px solid #555555;
            box-shadow: 0 0 10px rgba(85,85,85,0.3);
        }
        
        .compare-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #555555;
            color: white;
            padding: 15px 20px;
            transform: translateY(100%);
            transition: transform 0.3s ease;
            z-index: 1000;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
        }
        
        .compare-bar.show {
            transform: translateY(0);
        }
        
        .compare-bar-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
        }
        
        .compare-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .compare-count {
            background: white;
            color: #555555;
            padding: 5px 12px;
            border-radius: 15px;
            font-weight: bold;
            font-size: 14px;
        }
        
        .compare-products-preview {
            display: flex;
            gap: 10px;
            flex: 1;
            overflow-x: auto;
        }
        
        .compare-product-mini {
            background: rgba(255,255,255,0.1);
            padding: 8px 12px;
            border-radius: 5px;
            font-size: 12px;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .compare-product-remove {
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 14px;
            padding: 0;
        }
        
        .compare-actions {
            display: flex;
            gap: 10px;
        }
        
        .compare-btn {
            background: #28a745;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.3s;
        }
        
        .compare-btn:hover {
            background: #218838;
        }
        
        .compare-btn:disabled {
            background: #6c757d;
            cursor: not-allowed;
        }
        
        .clear-compare-btn {
            background: #dc3545;
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
        }
        
        .clear-compare-btn:hover {
            background: #c82333;
        }
        
        /* Modal de comparación */
        .compare-modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.8);
            overflow-y: auto;
        }
        
        .compare-modal-content {
            background-color: white;
            margin: 2% auto;
            padding: 0;
            border-radius: 10px;
            width: 95%;
            max-width: 1400px;
            max-height: 90vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        
        .compare-modal-header {
            background: #555555;
            color: white;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .compare-modal-title {
            font-size: 24px;
            font-weight: bold;
        }
        
        .compare-modal-close {
            background: none;
            border: none;
            color: white;
            font-size: 30px;
            cursor: pointer;
            padding: 0;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .compare-modal-body {
            flex: 1;
            overflow-x: auto;
            overflow-y: auto;
        }
        
        .compare-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 800px;
        }
        
        .compare-table th,
        .compare-table td {
            border: 1px solid #ddd;
            padding: 15px;
            text-align: center;
            vertical-align: top;
        }
        
        .compare-table th {
            background: #f8f9fa;
            font-weight: bold;
            position: sticky;
            top: 0;
            z-index: 10;
        }
        
        .compare-table .row-header {
            background: #f8f9fa;
            font-weight: bold;
            text-align: left;
            position: sticky;
            left: 0;
            z-index: 5;
        }
        
        .compare-product-image {
            width: 120px;
            height: 120px;
            object-fit: cover;
            border-radius: 8px;
            margin: 0 auto;
        }
        
        .compare-product-name {
            font-size: 16px;
            font-weight: bold;
            margin: 10px 0;
            line-height: 1.3;
        }
        
        .compare-product-code {
            font-size: 12px;
            color: #666;
            margin-bottom: 10px;
        }
        
        .compare-price {
            font-size: 18px;
            color: #28a745;
            font-weight: bold;
            margin: 10px 0;
        }
        
        .compare-advantage {
            background: #d4edda;
            border-color: #c3e6cb;
        }
        
        .compare-disadvantage {
            background: #f8d7da;
            border-color: #f5c6cb;
        }
        
        .compare-add-to-cart {
            background: #555555;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            margin-top: 10px;
        }
        
        .compare-add-to-cart:hover {
            background: #333333;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .compare-bar-content {
                flex-direction: column;
                gap: 10px;
            }
            
            .compare-products-preview {
                order: -1;
                width: 100%;
            }
            
            .compare-modal-content {
                width: 98%;
                margin: 1% auto;
            }
            
            .compare-table {
                font-size: 14px;
            }
            
            .compare-table th,
            .compare-table td {
                padding: 8px;
            }
            
            .compare-product-image {
                width: 80px;
                height: 80px;
            }
        }
/* ====== FILTROS AVANZADOS ====== */
        .advanced-filters {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        
        .filters-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }
        
        .filters-title {
            font-size: 18px;
            font-weight: bold;
            color: #333;
        }
        
        .filters-toggle {
            background: none;
            border: 1px solid #ddd;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .filters-toggle:hover {
            background: #f0f0f0;
        }
        
        .filters-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 15px;
        }
        
        .filters-content.collapsed {
            display: none;
        }
        
        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .filter-label {
            font-weight: 600;
            color: #555;
            font-size: 14px;
        }
        
        .price-range {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .price-input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
        }
        
        .price-separator {
            color: #666;
            font-weight: bold;
        }
        
        .filter-select {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            background: white;
        }
        
        .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: 150px;
            overflow-y: auto;
        }
        
        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 5px;
            border-radius: 3px;
            transition: background 0.2s;
        }
        
        .checkbox-item:hover {
            background: #f8f9fa;
        }
        
        .checkbox-item input[type="checkbox"] {
            accent-color: #555555;
        }
        
        .checkbox-item label {
            font-size: 14px;
            cursor: pointer;
            flex: 1;
        }
        
        .checkbox-count {
            font-size: 12px;
            color: #666;
            background: #f0f0f0;
            padding: 2px 6px;
            border-radius: 10px;
        }
        
        .filter-actions {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid #eee;
        }
        
        .filter-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .filter-btn.primary {
            background: #555555;
            color: white;
        }
        
        .filter-btn.primary:hover {
            background: #333333;
        }
        
        .filter-btn.secondary {
            background: #f8f9fa;
            color: #555555;
            border: 1px solid #ddd;
        }
        
        .filter-btn.secondary:hover {
            background: #e9ecef;
        }
        
        .active-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 15px;
        }
        
        .active-filter-tag {
            background: #555555;
            color: white;
            padding: 5px 12px;
            border-radius: 15px;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .active-filter-remove {
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 14px;
            padding: 0;
        }
        
        .sort-controls {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .sort-label {
            font-weight: 600;
            color: #555;
        }
        
        .sort-select {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            background: white;
            min-width: 200px;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .advanced-filters {
                padding: 15px;
            }
            
            .filters-content {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .filter-actions {
                flex-direction: column;
            }
            
            .sort-controls {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }
        }
/* Agregar al final de los estilos, antes del </style> */
@media (max-width: 768px) {
    /* Ajustes generales para móvil */
    body {
        font-size: 14px;
    }
    
    /* Header móvil mejorado */
    .header-top {
        padding: 10px 15px !important;
        gap: 10px !important;
    }
    
    .logo {
        height: 40px !important;
    }
    
    .user-info {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .user-name {
        font-size: 12px !important;
    }
    
    .user-actions button {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    
    /* Navegación móvil */
    .main-nav {
        padding: 0 10px !important;
    }
    
    .nav-button {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }
    
    /* Controles de paginación móvil */
    .pagination-controls {
        padding: 10px !important;
        margin: 15px !important;
        font-size: 13px !important;
    }
    
    .items-per-page {
        font-size: 13px !important;
    }
    
    .items-per-page select {
        padding: 6px !important;
        font-size: 13px !important;
    }
    
    .view-controls {
        gap: 8px !important;
    }
    
    .view-toggle button {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    
    /* Productos móvil */
    .products-container {
        gap: 10px !important;
        margin-bottom: 20px !important;
    }
    
    .product-item {
        padding: 10px !important;
    }
    
    .product-title {
        font-size: 13px !important;
    }
    
    .product-code {
        font-size: 10px !important;
    }
    
    .product-price {
        font-size: 16px !important;
    }
    
    .product-iva {
        font-size: 11px !important;
    }
    
    .add-to-cart {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
    
    /* Botón WhatsApp más pequeño */
    .whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
    
    .whatsapp-float svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Carrito flotante móvil */
    .floating-cart-toggle {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        bottom: 80px !important;
    }
}