/* Product Card Styles */

.product-card {
    border: 1px solid #f0d4d1;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(231, 51, 45, 0.06);
    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 6px 18px rgba(231, 51, 45, 0.1);
    border-color: #e8c0ba;
}

.product-card .card-header-dark {
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, #d4453b 0%, #a83530 100%) !important;
    border-bottom: none;
    padding: 1.25rem;
}

.product-card .table-responsive {
    position: relative;
}

.product-card .table {
    border-collapse: separate;
    border-spacing: 0;
}

.product-card .table thead th {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #5a6566;
    border: none;
    padding: 1.25rem 1rem;
    background-color: #faf8f7;
    white-space: nowrap;
}

.product-card .table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.product-card .table tbody tr:last-child {
    border-bottom: none;
}

.product-card .table tbody td {
    border: none;
    vertical-align: middle;
}

.product-card .badge {
    transition: all 0.2s ease;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 8px;
}

.product-card .badge.bg-primary {
    background: linear-gradient(135deg, #d4453b 0%, #a83530 100%) !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(231, 51, 45, 0.25);
}

.product-card .badge.bg-danger {
    background: linear-gradient(135deg, #e74a40 0%, #c93635 100%) !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(231, 51, 45, 0.35);
}

.product-card .badge.bg-light {
    background: linear-gradient(135deg, #d8ebe4 0%, #c4e0d6 100%) !important;
    color: #0d4d2d !important;
    border: 1px solid #acd4be;
    font-weight: 600;
}

.product-card .badge.bg-blue {
    background: linear-gradient(135deg, #d8ebe4 0%, #c4e0d6 100%) !important;
    color: #0d4d2d !important;
    box-shadow: 0 2px 6px rgba(0, 105, 62, 0.15);
}

.product-card .btn-outline-primary {
    transition: all 0.2s ease;
    border: 2px solid #d4453b;
    color: #d4453b;
}

.product-card .btn-outline-primary:hover {
    background-color: #d4453b;
    border-color: #d4453b;
    color: white;
    box-shadow: 0 4px 8px rgba(231, 51, 45, 0.2);
}

.product-card .btn-outline-primary:active {
    transform: scale(0.98);
}

.product-card .btn-outline-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(231, 51, 45, 0.2);
}

.product-card .table-responsive {
    border-radius: 0 0 12px 12px;
}

/* Animación suave para badges */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card .badge {
    animation: slideIn 0.3s ease;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

/* Mejora de tipografía */
.product-card .card-title {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 1.25rem;
}

/* Estilos para filas de lotes */
.lot-row td {
    font-variant-numeric: tabular-nums;
    padding: 1.25rem 1rem !important;
    vertical-align: middle;
}

/* Mejora en el spacing */
.product-card .text-muted {
    color: #adb5bd !important;
    font-weight: 500;
}

.product-card .table td {
    vertical-align: middle;
}

/* Suavizar transiciones */
.product-card .btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading State */
.table-loading-wrapper {
    position: relative;
    width: 100%;
}

.table-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 0 0 12px 12px;
}

.loading-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

.loading-body i {
    font-size: 2.5rem;
    color: #d4453b;
    animation: spin 1s linear infinite;
}

.loading-body p {
    color: #495057;
    font-weight: 600;
    margin: 0;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .product-card .card-header-dark {
        padding: 1rem;
        gap: 0.75rem;
    }

    .product-card .card-title {
        font-size: 1rem;
    }

    .product-card .table th,
    .product-card .table td {
        padding: 0.85rem 0.5rem;
        font-size: 0.9rem;
    }

    .product-card .badge {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem !important;
    }

    .loading-spinner i {
        font-size: 2rem;
    }
}
