/* Enhanced Product Row Styles */

/* Product Row Container */
.enhanced-product-row {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-left: 4px solid transparent !important;
    border-top: 1px solid #e3e6f0 !important;
    border-bottom: 1px solid #e3e6f0 !important;
    border-right: 1px solid #e3e6f0 !important;
    transition: all 0.2s ease !important;
    position: relative;
}

.enhanced-product-row:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-left-color: #4e73df !important;
    border-left-width: 4px !important;
    box-shadow: 0 2px 8px rgba(78, 115, 223, 0.1) !important;
}

.enhanced-product-row td {
    border-top: none !important;
    vertical-align: middle !important;
    padding: 12px 8px !important;
}

/* Product Info Container */
.product-info-container {
    padding: 8px 0;
}

.enhanced-product-name {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.enhanced-product-name:hover {
    color: #4e73df;
}

.product-icon {
    color: #4e73df;
    margin-right: 8px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.enhanced-product-name:hover .product-icon {
    color: #375a7f !important;
}

.edit-icon {
    color: #1cc88a !important;
    margin-left: 4px !important;
    font-size: 12px !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s ease !important;
}

.enhanced-product-name:hover .edit-icon {
    opacity: 1 !important;
}

/* Stock Info Container */
.stock-info-container {
    margin-top: 6px;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    border: 1px solid #dee2e6;
    font-size: 12px;
    transition: all 0.3s ease;
}

.stock-icon {
    color: #28a745;
    font-size: 12px;
}

.stock-icon.unlimited {
    color: #17a2b8;
}

.stock-quantity {
    font-weight: 600;
    color: #28a745;
}

.stock-unit {
    color: #6c757d;
    font-style: italic;
}

.stock-label {
    color: #495057;
}

.stock-label.unlimited {
    color: #17a2b8;
    font-weight: 500;
}

.stock-info:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%) !important;
}

/* Enhanced Quantity Container */
.enhanced-quantity-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Quantity Controls Inline */
.quantity-controls-inline {
    display: flex !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

/* Quantity Button Colors */
.btn-quantity.quantity-up {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border-color: #28a745 !important;
    color: white !important;
}

.btn-quantity.quantity-up:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%) !important;
    border-color: #1e7e34 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3) !important;
}

.btn-quantity.quantity-down {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%) !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.btn-quantity.quantity-down:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3) !important;
}

/* Enhanced Quantity Group (for backward compatibility) */
.enhanced-quantity-group {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 2px solid #e3e6f0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.enhanced-quantity-group:hover {
    border-color: #4e73df !important;
    box-shadow: 0 2px 6px rgba(78, 115, 223, 0.1) !important;
}

.enhanced-quantity-group:focus-within {
    border-color: #4e73df !important;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.1) !important;
}

/* Modern Quantity Buttons */
.btn-modern.btn-quantity {
    background: linear-gradient(135deg, #4e73df 0%, #36b9cc 100%) !important;
    border: none !important;
    color: white !important;
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
    position: relative;
    border-radius: 6px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 10 !important;
}

.btn-modern.btn-quantity:hover {
    background: linear-gradient(135deg, #375a7f 0%, #2c8aa6 100%) !important;
    box-shadow: 0 2px 8px rgba(78, 115, 223, 0.3) !important;
}

.btn-modern.btn-quantity:active {
    background: linear-gradient(135deg, #2e4a66 0%, #236b85 100%) !important;
    box-shadow: 0 1px 4px rgba(78, 115, 223, 0.2) !important;
}

.btn-modern.btn-quantity:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.3) !important;
}

/* Enhanced Quantity Input */
.enhanced-quantity-input {
    border: 2px solid #e3e6f0 !important;
    background: #ffffff !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    color: #2c3e50 !important;
    padding: 8px 12px !important;
    min-width: 80px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.enhanced-quantity-input:focus {
    outline: none !important;
    border-color: #4e73df !important;
    background: rgba(78, 115, 223, 0.05) !important;
    color: #4e73df !important;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.1) !important;
}

/* Enhanced Input Fields */
.enhanced-input-field {
    border: 2px solid #e3e6f0 !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    background: #ffffff !important;
}

.enhanced-input-field:focus {
    border-color: #4e73df !important;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.1) !important;
    background: #ffffff !important;
    outline: none !important;
}

.enhanced-input-field:hover {
    border-color: #a8b5d1 !important;
}

/* Remove Button Enhancement */
.enhanced-product-row .btn-danger {
    background: linear-gradient(135deg, #e74a3b 0%, #c0392b 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(231, 74, 59, 0.2) !important;
}

.enhanced-product-row .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
    box-shadow: 0 2px 6px rgba(231, 74, 59, 0.3) !important;
}

.enhanced-product-row .btn-danger:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(231, 74, 59, 0.3) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhanced-product-row {
        border-radius: 8px;
    }
    
    .enhanced-quantity-group {
        border-radius: 6px;
    }
    
    .btn-modern.btn-quantity {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .enhanced-quantity-input {
        min-width: 50px;
        font-size: 14px;
    }
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.enhanced-product-row.new-row {
    animation: fadeIn 0.3s ease-out;
}

/* Prevent layout shifts */
.enhanced-product-row * {
    box-sizing: border-box !important;
}

/* Smooth focus transitions */
.enhanced-product-row input:focus,
.enhanced-product-row select:focus,
.enhanced-product-row button:focus {
    transition: all 0.2s ease !important;
}

/* Loading state */
.enhanced-product-row.loading {
    opacity: 0.7;
    pointer-events: none;
}

.enhanced-product-row.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(78, 115, 223, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}