/* Bulk Discount Table Positioning */
.woocommerce div.product form.cart {
    position: relative;
}

.wc-discount-bulk-table {
    margin: 0 0 25px 0;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.wc-discount-bulk-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #007cba, #6f42c1);
}

/* For simple products */
.single-product .wc-discount-bulk-table {
    width: 100%;
    max-width: 600px;
}

/* For variable products */
.variable-product .wc-discount-bulk-table {
    width: 100%;
    max-width: 800px;
}

/* Ensure it appears above variations but before add to cart */
.woocommerce-variation-add-to-cart-disabled + .wc-discount-bulk-table {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .wc-discount-bulk-table {
        margin: 0 0 20px 0;
        padding: 15px;
    }
    
    .single-product .wc-discount-bulk-table,
    .variable-product .wc-discount-bulk-table {
        max-width: 100%;
    }
}

/* Integration with theme styles */
.woocommerce div.product .wc-discount-bulk-table {
    clear: both;
    float: none;
}

/* For themes that use flexbox */
.woocommerce div.product .product_meta + .wc-discount-bulk-table {
    margin-top: 0;
}

/* Ensure it doesn't break with quantity inputs */
.woocommerce div.product form.cart .wc-discount-bulk-table + .quantity {
    margin-top: 15px;
}
.wc-discount-bar {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.wc-discount-bar .discount-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
}

.wc-discount-sale-badge {
    background: #28a745 !important;
}

.discount-savings th,
.discount-savings td {
    color: #28a745;
    font-weight: bold;
}

.woocommerce .cart_totals .discount.fee td {
            color: #007cba;
            font-weight: bold;
        }
        .woocommerce .cart_totals .discount.fee .amount {
            color: #007cba;
        }
        
        /* Enhanced Bulk Discount Table Styles */
.wc-discount-bulk-table {
    margin: 25px 0;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.wc-discount-bulk-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #007cba, #6f42c1);
}

.wc-discount-bulk-table h4 {
    margin: 0 0 15px 0;
    color: #2c3338;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-discount-bulk-table h4::before {
    content: '📊';
    font-size: 20px;
}

.wc-discount-bulk-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wc-discount-bulk-table th {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    font-weight: 600;
    padding: 12px 15px;
    text-align: center;
    border: none;
    position: relative;
}

.wc-discount-bulk-table th:first-child {
    border-radius: 6px 0 0 0;
}

.wc-discount-bulk-table th:last-child {
    border-radius: 0 6px 0 0;
}

.wc-discount-bulk-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.wc-discount-bulk-table tr:hover td {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wc-discount-bulk-table tr:last-child td {
    border-bottom: none;
}

/* Quantity column */
.wc-discount-bulk-table td:first-child {
    font-weight: 600;
    color: #2c3338;
    background: #f8f9fa;
}

/* Price column */
.wc-discount-bulk-table td:nth-child(2) {
    color: #28a745;
    font-weight: 600;
    font-size: 16px;
}

/* Discount column */
.wc-discount-bulk-table td:nth-child(3) {
    color: #dc3545;
    font-weight: 600;
    background: #fff5f5;
}

/* You Save column */
.wc-discount-bulk-table td:nth-child(4) {
    color: #17a2b8;
    font-weight: 600;
    background: #f0f9ff;
}

/* Best value highlight */
.wc-discount-bulk-table tr.best-value {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
}

.wc-discount-bulk-table tr.best-value td {
    font-weight: 700;
    color: #155724;
    border-bottom-color: #28a745;
}

.wc-discount-bulk-table tr.best-value::after {
    content: '⭐ BEST VALUE';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffc107;
    color: #212529;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
}

/* Responsive design for bulk table */
@media (max-width: 768px) {
    .wc-discount-bulk-table {
        padding: 15px;
        margin: 15px 0;
    }
    
    .wc-discount-bulk-table table {
        display: block;
        overflow-x: auto;
    }
    
    .wc-discount-bulk-table th,
    .wc-discount-bulk-table td {
        padding: 8px 10px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .wc-discount-bulk-table h4 {
        font-size: 16px;
    }
}

/* Print styles for bulk table */
@media print {
    .wc-discount-bulk-table {
        border: 1px solid #000;
        box-shadow: none;
        background: white;
    }
    
    .wc-discount-bulk-table::before {
        display: none;
    }
    
    .wc-discount-bulk-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #000;
    }
}

/* Animation for table rows */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-discount-bulk-table tr {
    animation: fadeInUp 0.5s ease forwards;
}

.wc-discount-bulk-table tr:nth-child(1) { animation-delay: 0.1s; }
.wc-discount-bulk-table tr:nth-child(2) { animation-delay: 0.2s; }
.wc-discount-bulk-table tr:nth-child(3) { animation-delay: 0.3s; }
.wc-discount-bulk-table tr:nth-child(4) { animation-delay: 0.4s; }
.wc-discount-bulk-table tr:nth-child(5) { animation-delay: 0.5s; }

/* Enhanced discount bar for bulk discounts */
.wc-discount-bar.bulk-discount {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    color: #155724;
    padding: 12px 20px;
    margin: 20px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.2);
}

.wc-discount-bar.bulk-discount .discount-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wc-discount-bar.bulk-discount .discount-text {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.wc-discount-bar.bulk-discount .discount-details {
    font-size: 12px;
    color: #6c757d;
    margin-left: 10px;
}

/* Cart bulk discount styling */
.woocommerce .cart_totals .bulk-discount.fee td {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.woocommerce .cart_totals .bulk-discount.fee .amount {
    color: #28a745;
    font-weight: bold;
}

.woocommerce .cart_totals .bulk-discount.fee::before {
    content: '🎯 ';
    margin-right: 5px;
}

/* Ascunde pre?urile 0,00 lei ?i afi?eaza FREE */
            .wc-free-replaced {
                color: #28a745 !important;
                font-weight: bold !important;
                font-size: 1.1em !important;
            }
            
            /* For?eaza afi?area FREE pentru elemente specifice */
            .amount:contains("0,00"), 
            .amount:contains("0.00"),
            .woocommerce-Price-amount:contains("0,00"),
            .woocommerce-Price-amount:contains("0.00") {
                color: #28a745 !important;
                font-weight: bold !important;
            }
            
            /* Pentru tabele */
            td:contains("0,00 lei"),
            td:contains("0.00 lei") {
                color: #28a745 !important;
                font-weight: bold !important;
            }
            
            /* Badge pentru produse gratuite */
            .free-product-badge {
                background: #28a745;
                color: white;
                padding: 3px 8px;
                border-radius: 4px;
                font-size: 12px;
                font-weight: bold;
                margin-left: 10px;
            }