/* Importar fuente Roboto */
@import url('//fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* === ESTILOS GLOBALES === */
body {
    background: #f0f2f5;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

/* === CONTENEDOR PRINCIPAL === */
#woo-pos {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-family: 'Roboto', sans-serif;
}

/* === PESTAÑAS === */
.pos-tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab-btn {
    padding: 15px 30px;
    border: none;
    background-color: #f8f9fa;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    text-align: center;
}

.tab-btn:hover {
    background-color: #e9ecef;
    color: #333;
}

.tab-btn.active {
    background-color: #007cba;
    color: white;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #007cba;
}

/* === CONTENIDO DE PESTAÑAS === */
.tab-content {
    min-height: 600px;
    position: relative;
}

.tab-panel {
    display: none !important;
    animation: fadeIn 0.3s ease-in-out;
    width: 100%;
}

.tab-panel.active {
    display: block !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === LAYOUT PRINCIPAL COMPACTO === */
#pos-tab {
    overflow: hidden; /* clearfix */
}

#pos-tab::after {
    content: "";
    display: table;
    clear: both;
}

.pos-left {
    width: 45%;
    float: left;
    padding-right: 15px;
    box-sizing: border-box;
}

.pos-right {
    width: 55%;
    float: right;
    padding-left: 15px;
    box-sizing: border-box;
}

.pos-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.pos-left h2, 
.pos-right h3 {
    text-align: center;
    color: #333;
    margin: 0 0 15px 0;
    font-size: 18px;
}

/* === HISTORIAL === */
#history-tab {
    width: 100%;
    padding: 0;
}

.history-container {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    max-width: 100%;
    overflow-x: auto;
    margin: 0;
}

.history-container h2 {
    text-align: center;
    color: #333;
    margin: 0 0 20px 0;
    font-size: 24px;
}

.history-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.history-count {
    font-weight: 500;
    color: #495057;
    font-size: 16px;
}

#pending-count {
    font-weight: 700;
    color: #007cba;
    background-color: #e3f2fd;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 16px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.history-table th {
    background-color: #007cba;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    font-size: 14px;
}

.history-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
    text-align: center;
    font-size: 14px;
}

.history-table tr:hover {
    background-color: #f8f9fa;
}

.resume-order {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.resume-order:hover {
    background-color: #218838;
}

.resume-order.editing {
    background-color: #ffc107;
    color: #212529;
    cursor: default;
}

.resume-order.editing:hover {
    background-color: #e0a800;
}

.editing-badge {
    background-color: #ffc107;
    color: #212529;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.pending-badge {
    background-color: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.editing-row {
    background-color: #fff3cd !important;
    border-left: 3px solid #ffc107;
}

.editing-row:hover {
    background-color: #ffeaa7 !important;
}

/* === BÚSQUEDA OPTIMIZADA === */
#pos-search {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

#pos-search:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

#search-results {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px; /* Reducido de 12px a 8px */
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.search-item {
    background: white;
    border: 1px solid #e9ecef; /* Reducido de 2px a 1px */
    border-radius: 8px; /* Reducido de 10px a 8px */
    padding: 10px; /* Reducido de 12px a 10px */
    cursor: pointer;
    transition: all 0.2s ease; /* Reducido de 0.3s a 0.2s */
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); /* Sombra más sutil */
    position: relative;
    overflow: hidden;
    min-height: 160px; /* Reducido de 180px a 160px */
    display: flex;
    flex-direction: column;
}

.search-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px; /* Reducido de 3px a 2px */
    background: linear-gradient(90deg, #007cba, #17a2b8);
    transform: scaleX(0);
    transition: transform 0.2s ease; /* Reducido de 0.3s a 0.2s */
}

.search-item:hover::before {
    transform: scaleX(1);
}

.search-item:hover {
    border-color: #007cba;
    transform: translateY(-2px); /* Reducido de -3px a -2px */
    box-shadow: 0 3px 12px rgba(0,123,186,0.12); /* Sombra más sutil */
}

.search-item-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px; /* Reducido de 10px a 8px */
    flex: 1;
}

.search-img {
    width: 65px; /* Aumentado de 60px a 65px */
    height: 65px; /* Aumentado de 60px a 65px */
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px; /* Reducido de 8px a 6px */
    border: 1px solid #f8f9fa; /* Reducido de 2px a 1px */
    background-color: #f8f9fa;
}

.search-info {
    text-align: center;
    width: 100%;
}

.search-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px; /* Aumentado de 4px a 6px */
    font-size: 13px; /* Aumentado de 12px a 13px */
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px; /* Aumentado de 30px a 34px */
    max-width: 100%; /* Asegurar que use todo el ancho disponible */
}

.search-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px; /* Reducido de 8px a 6px */
    border-top: 1px solid #f0f0f0;
}

.search-price {
    font-weight: 700;
    color: #28a745;
    font-size: 14px;
    margin-bottom: 4px;
}

.search-status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.search-status {
    font-size: 10px; /* Aumentado de 9px a 10px */
    padding: 3px 8px; /* Aumentado padding */
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 100%; /* Usar todo el ancho */
    text-align: center;
}

.search-status.available {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.search-status.unavailable {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.search-add-btn {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 6px 10px; /* Aumentado padding */
    border-radius: 12px;
    font-size: 11px; /* Aumentado de 10px a 11px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s; /* Reducido de 0.3s a 0.2s */
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 100%; /* Usar todo el ancho disponible */
    max-width: none; /* Remover restricción de ancho */
}

.search-add-btn:hover {
    background-color: #0056b3;
    transform: scale(1.02); /* Reducido de 1.05 a 1.02 */
}

.search-add-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px; /* Reducido de 50px a 40px */
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px dashed #dee2e6; /* Reducido de 2px a 1px */
    border-radius: 8px; /* Reducido de 10px a 8px */
    font-size: 14px;
    margin-top: 10px; /* Reducido de 15px a 10px */
}

.no-result i {
    font-size: 24px; /* Reducido de 28px a 24px */
    margin-bottom: 10px; /* Reducido de 12px a 10px */
    display: block;
    color: #adb5bd;
}

.search-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px; /* Reducido de 35px a 30px */
    color: #007cba;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #007cba; /* Reducido de 2px a 1px */
    border-radius: 8px; /* Reducido de 10px a 8px */
    font-size: 14px;
    font-weight: 500;
}

.search-loading i {
    margin-right: 8px;
    font-size: 16px;
}

.more-results-info {
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px; /* Reducido de 12px a 10px */
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 6px; /* Reducido de 8px a 6px */
    color: #856404;
    font-size: 11px;
    font-weight: 500;
    margin-top: 6px; /* Reducido de 8px a 6px */
}

/* Responsive optimizado para mantener 4 columnas */
@media (max-width: 1200px) {
    #search-results {
        gap: 6px; /* Reducido */
    }
    
    .search-item {
        padding: 8px; /* Reducido */
        min-height: 150px; /* Reducido */
    }
    
    .search-img {
        width: 55px; /* Ajustado */
        height: 55px; /* Ajustado */
    }
    
    .search-name {
        font-size: 12px; /* Ajustado */
        min-height: 30px; /* Ajustado */
    }
    
    .search-price {
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    #search-results {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

@media (max-width: 600px) {
    #search-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .search-item {
        min-height: 140px;
        padding: 6px;
    }
    
    .search-img {
        width: 50px;
        height: 50px;
    }
    
    .search-name {
        font-size: 11px;
        min-height: 28px;
    }
    
    .search-price {
        font-size: 12px;
    }
    
    .search-status {
        font-size: 9px;
        padding: 2px 6px;
    }
}

@media (max-width: 400px) {
    #search-results {
        grid-template-columns: 1fr;
    }
    
    .search-item {
        min-height: 130px;
    }
}

/* === CARRITO COMPACTO === */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 12px;
}

.cart-table th {
    background-color: #343a40;
    color: white;
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
}

.cart-table td {
    padding: 4px 2px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    text-align: center;
}

.cart-img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 3px;
}

.product-info {
    max-width: 120px;
    text-align: left;
    padding: 2px 4px;
}

.product-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    line-height: 1.2;
}

.product-meta {
    color: #6c757d;
    font-size: 9px;
    line-height: 1.1;
}

.item-qty, 
.item-price {
    width: 50px;
    padding: 3px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    text-align: center;
    font-size: 11px;
    margin: 0;
}

.item-subtotal {
    font-weight: 600;
    color: #28a745;
    font-size: 11px;
    padding: 2px;
}

.remove-item {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 10px;
    transition: background-color 0.3s;
    line-height: 1;
}

.remove-item:hover {
    background-color: #c82333;
}

/* === INPUTS GENERALES COMPACTOS === */
#woo-pos input[type="text"],
#woo-pos input[type="number"] {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccd0d5;
    border-radius: 3px;
    box-sizing: border-box;
    transition: border 0.3s ease;
    font-size: 13px;
}

#woo-pos input[type="text"]:focus,
#woo-pos input[type="number"]:focus {
    border-color: #0073aa;
    outline: none;
}

/* === BOTONES COMPACTOS === */
.actions-row {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    align-items: center;
}

.actions-row-second {
    margin: 10px 0;
}

.icon-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: #545b62;
}

.icon-btn-add {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.icon-btn-add:hover {
    background-color: #138496;
}

.big-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    transition: background-color 0.3s;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.big-button:hover {
    background-color: #218838;
}

/* === CAMPOS COMPACTOS === */
.field-company input {
    width: 100%;
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.field-company input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* === TOTAL COMPACTO === */
#cart-total {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

/* === CONTENEDOR PRINCIPAL COMPACTO === */
#woo-pos {
    max-width: 1200px;
    margin: 15px auto;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    font-family: 'Roboto', sans-serif;
}

/* === MODALES === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
}

.close-modal:hover {
    color: #333;
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.modal-content label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.modal-content input:focus {
    outline: none;
    border-color: #007cba;
}

.modal-content button {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-content button:hover {
    background-color: #0056b3;
}

/* === MODAL DE FACTURA === */
#woo-pos-invoice-modal .modal-dialog {
    margin: 2rem auto;
    width: 95%;
    max-width: 1200px;
}

#woo-pos-invoice-modal .modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#woo-pos-invoice-modal .modal-header,
#woo-pos-invoice-modal .modal-footer {
    background-color: #f1f1f1;
    padding: 1rem;
}

#woo-pos-invoice-modal .modal-title {
    font-size: 1.5rem;
    margin: 0;
}

#woo-pos-invoice-modal .modal-body {
    padding: 1.5rem;
    overflow-x: auto;
}

.invoice-print-area {
    width: 100%;
    margin: 0 auto;
    overflow-x: auto;
}

/* === MENSAJES DE ÉXITO === */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1050;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 250px;
}

.success-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.success-toast::before {
    content: "✓";
    margin-right: 8px;
    font-weight: bold;
}

.product-added-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #17a2b8;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1050;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 200px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-added-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.product-added-toast i {
    font-size: 16px;
}

.error-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #dc3545;
    color: white;
    padding: 12px 18px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1050;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 250px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.error-toast i {
    font-size: 16px;
}

.editing-order-message {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    color: #856404;
    text-align: center;
}

.editing-order-message button {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
}

.editing-order-message button:hover {
    background-color: #c9302c;
}

#order-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    color: #155724;
    text-align: center;
    font-size: 16px;
}

/* === ERROR MODAL === */
#error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.error-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.error-modal-content p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #c00;
}

.error-modal-content button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
}

/* === PROCESSING OVERLAY === */
#processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.processing-modal {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* === RESPONSIVE COMPACTO === */
@media (max-width: 768px) {
    #woo-pos {
        margin: 10px;
        padding: 10px;
    }
    
    .pos-tabs {
        margin-bottom: 10px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .pos-left, 
    .pos-right {
        width: 100%;
        float: none;
        padding: 0;
    }
    
    .pos-right {
        margin-top: 15px;
    }
    
    .pos-section {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .actions-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .big-button {
        width: 100%;
        height: 35px;
        font-size: 13px;
    }
    
    .icon-btn {
        height: 35px;
        min-width: 35px;
        font-size: 12px;
    }
    
    .history-actions {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 10px;
    }
    
    .history-table {
        font-size: 11px;
    }
    
    .history-table th,
    .history-table td {
        padding: 6px 4px;
    }
    
    .search-img,
    .cart-img {
        width: 30px;
        height: 30px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .product-info {
        max-width: 100px;
    }
    
    .item-qty,
    .item-price {
        width: 45px;
        padding: 2px;
        font-size: 10px;
    }
    
    .cart-table th {
        padding: 4px 2px;
        font-size: 10px;
    }
    
    .cart-table td {
        padding: 3px 1px;
    }
    
    .product-title {
        font-size: 10px;
    }
    
    .product-meta {
        font-size: 8px;
    }
}