/* Productos.css - Estilos específicos para la página de productos */

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    z-index: 1;
}

.search-box input:focus {
    outline: none;
    border-color: #17a2b8;
    box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.1);
}

.search-box input::placeholder {
    color: #adb5bd;
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
    align-items: flex-start;
    position: relative;
}



.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 0;
    text-decoration: none !important;
    border: none !important;
    background: none !important;
}

.filter-group .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317a2b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
    text-decoration: none !important;
    border-bottom: 2px solid #e0e6ed !important;
}

.filter-group .form-select:hover {
    border-color: #17a2b8;
    border-bottom-color: #17a2b8 !important;
    text-decoration: none !important;
}

.filter-group .form-select:focus {
    outline: none;
    border-color: #17a2b8;
    border-bottom-color: #17a2b8 !important;
    box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.1);
    text-decoration: none !important;
}

.btn-clear-filters {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-clear-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Botones principales mejorados */
.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background: transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #545b62);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fd7e14, #dc3545);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn i {
    font-size: 1rem;
}

/* Botones específicos con iconos mejorados */
.btn-new-product {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-new-product:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
}

.btn-export {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-export:hover {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(23, 162, 184, 0.4);
}

.filter-options select {
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317a2b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

/* Product Modal Specific Styles */
.modal-content.large {
    max-width: 900px;
    width: 90vw;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.form-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.form-section h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h4 i {
    color: var(--primary-color);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label .form-hint {
    margin-top: 0.25rem;
    margin-left: 0;
}

/* Input Groups */
.input-group {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
}

.input-group-select {
    width: 80px;
    border-radius: 0;
    border-right: none;
    background-color: rgba(var(--primary-rgb), 0.1);
}

.input-group-text {
    padding: 0.75rem;
    background-color: rgba(var(--primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--text-color);
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.input-group .form-input {
    border-radius: 0;
    border-left: none;
}

/* Table Enhancements - Mejorado similar a clientes */
.table-container {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    table-layout: fixed;
}

.data-table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1rem 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    position: relative;
    text-align: center;
    vertical-align: middle;
}

.data-table th:nth-child(1) {
    width: 10%;
}

/* Código */
.data-table th:nth-child(2) {
    width: 18%;
}

/* Nombre */
.data-table th:nth-child(3) {
    width: 10%;
}

/* Familia */
.data-table th:nth-child(4) {
    width: 8%;
}

/* Unidad */
.data-table th:nth-child(5) {
    width: 12%;
}

/* Precio Unit */
.data-table th:nth-child(6) {
    width: 12%;
}

/* Precio c/IVA */
.data-table th:nth-child(7) {
    width: 10%;
}

/* Estado */
.data-table th:nth-child(8) {
    width: 8%;
}

/* Stock */
.data-table th:nth-child(9) {
    width: 12%;
}

/* Acciones */

.data-table th:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-1px);
}

.data-table th i {
    margin-left: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.data-table th:hover i {
    opacity: 1;
}

/* Estilos para columnas ordenadas */
.data-table th.sorted-asc,
.data-table th.sorted-desc {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
}

.data-table th.sorted-asc i.fa-sort-up,
.data-table th.sorted-desc i.fa-sort-down {
    opacity: 1;
    color: #ffd700;
}

.data-table th {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
    transition: all 0.2s ease;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Alineación específica por columna */
.data-table td:nth-child(1) {
    /* Código */
    text-align: center;
    width: 10%;
}

.data-table td:nth-child(2) {
    /* Nombre */
    text-align: left;
    width: 18%;
}

.data-table td:nth-child(3) {
    /* Familia */
    text-align: center;
    width: 10%;
}

.data-table td:nth-child(4) {
    /* Unidad */
    text-align: center;
    width: 8%;
}

.data-table td:nth-child(5) {
    /* Precio Unit */
    text-align: right;
    width: 12%;
}

.data-table td:nth-child(6) {
    /* Precio c/IVA */
    text-align: right;
    width: 12%;
}

.data-table td:nth-child(7) {
    /* Estado */
    text-align: center;
    width: 10%;
}

.data-table td:nth-child(8) {
    /* Stock */
    text-align: center;
    width: 8%;
}

.data-table td:nth-child(9) {
    /* Acciones */
    text-align: center;
    width: 12%;
    padding: 0.5rem;
}

.data-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.02), rgba(var(--secondary-rgb), 0.02));
    transform: translateX(2px);
    box-shadow: 2px 0 0 var(--primary-color);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

/* Estilos específicos para productos en la tabla */
#products-table .product-code {
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#products-table .product-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#products-table .product-description {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#products-table .product-price {
    font-weight: 700;
    color: var(--success-color);
    font-size: 0.9rem;
    font-family: system-ui;
}

#products-table .product-stock {
    font-weight: 600;
    color: var(--text-dark);
}

/* Mejora de botones de acción - AJUSTADOS PARA CELDAS */
.btn-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100px;
    margin: 0 auto;
}

.btn-action {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-action:hover::before {
    left: 100%;
}

.btn-action:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.btn-action:active {
    transform: translateY(0) scale(1);
}

.btn-view {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.btn-view:hover {
    background: linear-gradient(135deg, #138496, #0f6674);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

.btn-edit {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c82333, #b21e2d);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Status Badges - Mejorados */
.status-badges {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    align-items: center;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.status-badge:hover::before {
    left: 100%;
}

.status-badge.sellable {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-color: #c3e6cb;
}

.status-badge.sellable:hover {
    background: linear-gradient(135deg, #c3e6cb, #b8dcc4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(21, 87, 36, 0.2);
}

.status-badge.purchasable {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-color: #bee5eb;
}

.status-badge.purchasable:hover {
    background: linear-gradient(135deg, #bee5eb, #abdde5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(12, 84, 96, 0.2);
}

.status-badge.stock {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-color: #ffeaa7;
}

.status-badge.stock:hover {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(133, 100, 4, 0.2);
}

.status-badge.inactive {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #f5c6cb;
}

.status-badge.inactive:hover {
    background: linear-gradient(135deg, #f5c6cb, #f1b0b7);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(114, 28, 36, 0.2);
}

/* Estado del producto principal */
.product-status {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.product-status.active {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.product-status.inactive {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.product-status.discontinued {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
    border: 1px solid #e5e7eb;
}

.product-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Animaciones y efectos adicionales para la tabla */
@keyframes tableRowHighlight {
    0% {
        background: rgba(var(--primary-rgb), 0.1);
    }

    100% {
        background: transparent;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.data-table tbody tr.new-row {
    animation: tableRowHighlight 2s ease-out;
}

.table-container {
    animation: fadeInUp 0.5s ease-out;
}

/* Efecto de loading para la tabla */
.table-loading {
    position: relative;
}

.table-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

/* Responsive mejoras */
@media (max-width: 768px) {

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .btn-actions {
        gap: 4px;
    }

    .status-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

    #products-table .product-code {
        padding: 4px 6px;
        font-size: 0.8rem;
    }
}

/* Tooltip para botones de acción */
.btn-action {
    position: relative;
}

.btn-action::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.btn-action:hover::after {
    opacity: 1;
}

/* Mejoras de accesibilidad */
.btn-action:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.data-table th:focus {
    outline: 2px solid white;
    outline-offset: -2px;
}

/* Estado vacío de la tabla */
.table-empty {
    text-align: center;
    padding: 3rem 2rem !important;
    color: var(--text-light);
}

.table-empty div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.table-empty i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.table-empty h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 600;
}

.table-empty p {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* Modal de detalles del producto */
.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.detail-section h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.detail-section h4 i {
    color: var(--primary-color);
}

.detail-item {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-item strong {
    color: var(--text-dark);
    margin-right: 0.5rem;
    min-width: 120px;
    display: inline-block;
}

@media (max-width: 768px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Import/Export Modal */
.import-export-options {
    padding: 1rem 0;
}

.option-section {
    padding: 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.option-section h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-section h4 i {
    color: var(--primary-color);
}

.export-options,
.import-options {
    margin: 1rem 0;
}

.export-options .checkbox-label,
.import-options .checkbox-label {
    margin-bottom: 0.5rem;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 1rem 0;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.file-upload-area i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.file-upload-area p {
    margin: 0.5rem 0;
    color: var(--text-color);
    font-weight: 500;
}

.file-upload-area small {
    color: var(--text-muted);
}

.file-upload-area.dragover {
    border-color: var(--success-color);
    background-color: rgba(var(--success-rgb), 0.1);
}

/* Action Buttons */
.action-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    margin: 0 0.125rem;
}

.action-btn.edit {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.action-btn.delete {
    background-color: rgba(var(--danger-rgb), 0.1);
    color: var(--danger-color);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Delete Modal */
.delete-warning {
    text-align: center;
    padding: 1rem;
}

.delete-warning i {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.delete-warning p {
    margin-bottom: 1rem;
}

.delete-warning strong {
    color: var(--danger-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .search-container {
        gap: 1rem;
    }

    .search-box input {
        font-size: 0.95rem;
        padding: 0.9rem 0.9rem 0.9rem 2.8rem;
    }

    .filter-options {
        flex-direction: column;
        width: 100%;
    }

    .filter-group {
        width: 100%;
        min-width: unset;
    }

    .filter-options select {
        width: 100%;
    }

    .btn-clear-filters {
        width: 100%;
    }

    .modal-content.large {
        width: 95vw;
        margin: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-title {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .page-actions {
        display: flex;
        gap: 0.5rem;
    }

    .action-btn {
        padding: 0.375rem;
        font-size: 0.75rem;
    }
}

/* Animation for new products */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-row.new {
    animation: fadeInUp 0.5s ease;
}

/* Loading states */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Estilos para Import/Export modal mejorado */
.import-export-section {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-secondary);
}

.import-export-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-export-section h4::before {
    content: "📊";
    font-size: 1.2rem;
}

.export-subsection,
.import-subsection {
    margin-bottom: 15px;
}

.export-subsection h5,
.import-subsection h5 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 500;
}

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.import-file-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.import-file-input:hover {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.import-file-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Indicadores de formato de archivo */
.file-format-indicator {
    display: inline-block;
    padding: 2px 6px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 5px;
}

.file-format-indicator.xml {
    background-color: #e67e22;
}

.file-format-indicator.xlsx {
    background-color: #27ae60;
}

/* Estilos para progress y status messages */
.import-progress {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}

.import-progress.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.import-success {
    color: #27ae60;
    background-color: rgba(39, 174, 96, 0.1);
    border-left-color: #27ae60;
}

.import-error {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    border-left-color: #e74c3c;
}

/* Estilos para configuración de importación */
.import-config {
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.import-config h6 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.import-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.import-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.import-option label {
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Responsive design para modal mejorado */
@media (max-width: 768px) {
    .import-export-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .export-buttons {
        flex-direction: column;
    }

    .import-export-section h4 {
        font-size: 1rem;
    }
}

/* Estados mejorados para tabla */
.status-active,
.status-inactive {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
    display: inline-block;
    max-width: 80px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-active {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-color: #c3e6cb;
}

.status-inactive {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #f5c6cb;
}

/* Precio formateado */
.price-formatted {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Responsive adjustments para tabla */
@media (max-width: 1200px) {
    .data-table td:nth-child(2) .product-description {
        display: none;
    }

    /* Ocultar columna de familia en pantallas medianas */
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
    }

    .btn-actions {
        gap: 2px;
    }

    .btn-action {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    /* Ocultar más columnas en móviles */
    .data-table th:nth-child(3),
    .data-table td:nth-child(3),
    .data-table th:nth-child(4),
    .data-table td:nth-child(4),
    .data-table th:nth-child(7),
    .data-table td:nth-child(7) {
        display: none;
    }

    .btn-action {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .btn-actions {
        gap: 1px;
    }
}

/* Tooltip para botones */
.btn-action[title] {
    position: relative;
}

.btn-action[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Estilos para preview de importación */
.import-preview {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.import-preview h6 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.preview-table {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: white;
}

.preview-row {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.preview-row:last-child {
    border-bottom: none;
}

.preview-row strong {
    color: var(--text-dark);
    font-family: monospace;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.preview-price {
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.85rem;
}

.preview-more {
    padding: 8px 12px;
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    background: #f8f9fa;
    font-size: 0.8rem;
}

/* Mejoras para las áreas de subida de archivos */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e3f2fd, #f8f9fa);
    transform: translateY(-2px);
}

.file-upload-area i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.file-upload-area p {
    margin: 0.5rem 0;
    color: var(--text-dark);
    font-weight: 500;
}

.file-upload-area small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.file-upload-area.drag-over {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
}

/* Estilos para secciones de importación */
.import-subsection {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.import-subsection h5 {
    margin: 0 0 1rem 0;
    color: var(--text-dark);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-subsection h5 i {
    color: var(--primary-color);
}

/* ======================================
   ESTANDARIZACIÓN DE BOTONES DE MODALES
   ====================================== */

/* Modal footer estandarizado para todos los modales de productos */
#product-modal .modal-footer,
#product-details-modal .modal-footer,
#import-export-modal .modal-footer,
#delete-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1.5rem 2rem;
    gap: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 16px 16px;
}

/* Botones de modal estandarizados */
.modal-footer .btn,
#product-details-modal .btn {
    min-width: 120px !important;
    height: 40px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0 1rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: none !important;
}

/* Botón primario */
.modal-footer .btn-primary,
#product-details-modal .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

.modal-footer .btn-primary:hover,
#product-details-modal .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

/* Botón outline/secundario */
.modal-footer .btn-outline,
.modal-footer .btn-secondary,
#product-details-modal .btn-outline {
    background: white !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.modal-footer .btn-outline:hover,
.modal-footer .btn-secondary:hover,
#product-details-modal .btn-outline:hover {
    background: #f8fafc !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px) !important;
}

/* Botón de peligro */
.modal-footer .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

.modal-footer .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

/* Botón de éxito */
.modal-footer .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.modal-footer .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

/* Botón de advertencia */
.modal-footer .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.modal-footer .btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
}

/* Estilos para status badges en modal de detalles */
.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid transparent;
}

.status-badge.sellable {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-badge.purchasable {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.status-badge.stock {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.status-badge.inactive {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-footer .btn,
    #product-details-modal .btn {
        width: 100%;
        min-width: auto !important;
    }
}

/* =========================== PAGINACIÓN =========================== */

/* Barra de herramientas */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buscador */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    z-index: 2;
}

#product-search-input {
    padding: 0.75rem 3rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    min-width: 350px;
    transition: all 0.3s ease;
}

#product-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

#product-search-input::placeholder {
    color: var(--text-muted);
}

.clear-search-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 3;
}

.clear-search-btn:hover {
    color: var(--error-color);
    background: rgba(var(--error-color-rgb), 0.1);
}

/* Selector de productos por página */
.per-page-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    white-space: nowrap;
}

.per-page-container label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

#products-per-page {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#products-per-page:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.per-page-container span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Información de paginación */
.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Contenedor de paginación */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

/* Botones de paginación */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--card-bg);
    color: var(--text-muted);
}

.pagination-dots {
    padding: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Responsive para paginación */
@media (max-width: 768px) {
    .products-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }

    .toolbar-left {
        flex-direction: column;
        gap: 0.75rem;
    }

    #product-search-input {
        min-width: 100%;
        width: 100% !important;
    }

    .per-page-container {
        margin-left: 0 !important;
        justify-content: center;
    }

    .pagination-container {
        gap: 0.25rem;
        padding: 0.75rem;
        flex-wrap: wrap;
        justify-content: center !important;
    }

    .pagination-btn {
        min-width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .pagination-dots {
        padding: 0.25rem;
    }

    .pagination-info {
        font-size: 0.8rem;
        text-align: center;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .products-toolbar {
        padding: 0.75rem;
    }

    .search-container {
        width: 100%;
    }

    #product-search-input {
        min-width: 100%;
        padding: 0.6rem 2.5rem 0.6rem 2rem;
    }

    .per-page-container {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .per-page-container label,
    .per-page-container span {
        font-size: 0.8rem;
    }

    #products-per-page {
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    .pagination-container {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.75rem;
        padding: 0.25rem;
    }

    .pagination-info {
        font-size: 0.75rem;
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* Ocultar toolbars duplicados - Solo mantener el del HTML */
.table-container .products-toolbar {
    display: none !important;
}

/* Forzar visibilidad de controles de paginación */
.pagination-container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.pagination-container.hidden {
    display: none !important;
}

/* Asegurar que no hay elementos extraños */
.filter-group label,
.filter-group label *,
.filter-group select,
.filter-group .form-select,
#family-filter,
#status-filter {
    text-decoration: none !important;
    border-bottom-style: solid !important;
    background-image: none;
}

/* Eliminar cualquier subrayado o borde inferior extra en los selects */
select.form-select,
.search-section select,
.filter-options select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-decoration: none !important;
}

/* Asegurar que los selects no tengan subrayado al seleccionar */
select.form-select::-moz-focus-inner,
.filter-group select::-moz-focus-inner {
    border: 0;
    padding: 0;
}

select.form-select option,
.filter-group select option {
    text-decoration: none !important;
    background: white;
}