/**
 * B2B Tier Pricing & Preorder Plugin Styles - Simple Layout
 */

/* Main Container */
.b2b-tier-pricing-simple {
    margin: 20px 0;
    font-family: inherit;
}

/* Ensure WooCommerce variation attributes (sizes, colors) are visible */
.variations_form .variations,
.variations_form .variations tr,
.variations_form .variations td,
.variations_form .variations th,
.variations_form .variations select,
.variations_form .variations .value,
.variations_form .variations .label {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.variations_form .variations { display: table !important; width: 100%; }
.variations_form .variations select { max-width: 240px; }

/* Quantity input sizing across PDP, mini-cart and cart */
.quantity input.qty,
input.qty,
input[type="number"].qty,
.woocommerce .quantity input.qty,
.woocommerce-page .quantity input.qty,
.widget_shopping_cart .quantity input.qty,
.woocommerce-mini-cart .quantity input.qty,
table.shop_table .product-quantity .qty,
.single-product .quantity input.qty,
form.cart .quantity input.qty,
.woocommerce-cart table.cart .quantity input.qty,
.woocommerce-cart .cart_item .quantity input,
.woocommerce table.shop_table td.product-quantity input,
.cart-container .quantity input.qty,
table.cart td.product-quantity input.qty,
.woocommerce-cart-form .quantity input.qty,
.woocommerce-cart .quantity input,
.woocommerce-cart .quantity input.qty,
td.product-quantity input.qty,
td.product-quantity .quantity input {
    min-width: 100px !important;
    width: 120px !important;
    max-width: 150px !important;
    padding: 10px 8px !important;
    font-size: 15px !important;
    text-align: center !important;
    border: 2px solid #e9ecef !important;
    border-radius: 4px !important;
    background: #fff !important;
    -moz-appearance: textfield;
    appearance: textfield;
    box-sizing: border-box !important;
}

/* Ensure cart page quantity container doesn't constrain the input */
.woocommerce-cart .quantity,
.woocommerce table.cart .quantity,
td.product-quantity .quantity {
    min-width: 80px !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Cart page +/- buttons - reduce to 30% of original size */
.woocommerce-cart .quantity .plus,
.woocommerce-cart .quantity .minus,
.woocommerce-cart table.cart .quantity .plus,
.woocommerce-cart table.cart .quantity .minus,
td.product-quantity .quantity .plus,
td.product-quantity .quantity .minus,
.woocommerce table.cart .quantity button,
.woocommerce-cart .quantity button {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 22px !important;
}

/* Reduce cart quantity input width to match smaller buttons */
.woocommerce-cart .quantity input.qty,
.woocommerce-cart table.cart .quantity input.qty,
td.product-quantity .quantity input.qty {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 60px !important;
    padding: 4px 2px !important;
    font-size: 13px !important;
    height: 24px !important;
}

/* Checkout page quantity field - wider for large numbers (5+ digits) */
.woocommerce-checkout .quantity,
.woocommerce-checkout-review-order .quantity,
.woocommerce-checkout .product-quantity .quantity,
.checkout-order-review .quantity,
body.woocommerce-checkout .quantity,
#order_review .quantity,
.woocommerce-checkout-review-order-table .quantity {
    min-width: 100px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.woocommerce-checkout .quantity input.qty,
.woocommerce-checkout-review-order .quantity input.qty,
.woocommerce-checkout .product-quantity input.qty,
.checkout-order-review .quantity input.qty,
.woocommerce-checkout input.qty,
body.woocommerce-checkout input.qty,
#order_review input.qty,
.woocommerce-checkout-review-order-table input.qty,
.woocommerce-checkout .quantity input[type="number"],
#order_review .quantity input[type="number"] {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 100px !important;
    padding: 6px 8px !important;
    font-size: 14px !important;
    text-align: center !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

/* Checkout page +/- buttons - smaller like cart */
.woocommerce-checkout .quantity .plus,
.woocommerce-checkout .quantity .minus,
.woocommerce-checkout-review-order .quantity .plus,
.woocommerce-checkout-review-order .quantity .minus,
body.woocommerce-checkout .quantity .plus,
body.woocommerce-checkout .quantity .minus,
#order_review .quantity .plus,
#order_review .quantity .minus {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 22px !important;
}

/* Hide spinner buttons for cleaner look */
.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button,
input.qty::-webkit-outer-spin-button,
input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Enable direct typing for large quantities */
.quantity input.qty:focus,
input.qty:focus {
    border-color: #0274be !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(2, 116, 190, 0.1) !important;
}

/* Hide +/- buttons or make them less prominent to encourage direct typing */
.quantity .plus, 
.quantity .minus {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.quantity:hover .plus,
.quantity:hover .minus {
    opacity: 1;
}

/* Ensure +/- buttons don't squeeze the input */
.quantity .minus, .quantity .plus {
    min-width: 36px;
}

/* Availability Status */
.b2b-availability-status {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.b2b-status-badge {
    font-weight: 600;
    font-size: 14px;
    padding: 0;
    margin: 0;
}

.b2b-status-badge.in-stock {
    color: #333;
}

.b2b-status-badge.preorder-only {
    color: #333;
}

.b2b-stock-qty {
    background: #e8f5e8;
    color: #27ae60;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #c3e6c3;
}

/* Tier Header */
.b2b-tier-header {
    margin-bottom: 10px;
}

.b2b-tier-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Tier List */
.b2b-tier-list {
    margin-bottom: 20px;
}

.b2b-tier-row {
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin-bottom: 2px;
}

.b2b-tier-row:hover {
    background: #f8f9fa;
    padding-left: 10px;
}

/* FINAL TIER STYLE OVERRIDE */
.product-info .b2b-tier-list .b2b-tier-row.selected,
.product-info .b2b-tier-list .b2b-tier-row.active {
    background-color: #d4e8d4 !important;
}

.product-info .b2b-tier-list .b2b-tier-row.selected span,
.product-info .b2b-tier-list .b2b-tier-row.active span {
    color: #000000 !important;
    background-image: none !important; /* Remove gradients */
}

.b2b-tier-row {
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin-bottom: 2px;
}

/* Button Styling Updates */
.single_add_to_cart_button {
    background: #27ae60 !important;
    border-color: #27ae60 !important;
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 24px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.single_add_to_cart_button:hover {
    background: #219a52 !important;
    border-color: #219a52 !important;
    transform: translateY(-1px);
}

/* Pre-order button styling */
.b2b-preorder-mode .single_add_to_cart_button {
    background: #27ae60 !important;
    border-color: #27ae60 !important;
}

.b2b-preorder-mode .single_add_to_cart_button:hover {
    background: #219a52 !important;
    border-color: #219a52 !important;
}

/* Minimum Order Quantity */
.b2b-min-order-qty {
    margin: 15px 0;
    font-size: 14px;
    color: #333;
}

.b2b-min-order-qty strong {
    font-weight: 600;
}

.b2b-min-order-qty .qty-value {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e9ecef;
    font-weight: 500;
}

/* Quantity Input Styling */
.quantity input[type="number"] {
    border: 2px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    width: 80px;
    text-align: center;
}

.quantity input[type="number"]:focus {
    border-color: #0274be;
    outline: none;
    box-shadow: 0 0 0 2px rgba(2, 116, 190, 0.1);
}

/* Quantity Controls */
.quantity .qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.quantity .qty-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 3px;
    font-weight: 600;
    color: #666;
    transition: all 0.2s ease;
}

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

/* Pre-order info styling */
.b2b-preorder-info {
    background: #8F9779;
    border: 1px solid #8F9779;
    border-radius: 4px;
    padding: 12px 15px;
    margin: 10px 0;
    font-size: 14px;
}

.b2b-preorder-notice {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #000000;
}

.b2b-preorder-icon {
    margin-right: 8px;
    font-size: 16px;
    color: #000000;
}

.b2b-lead-time {
    margin: 0;
    color: #000000;
    font-size: 13px;
}

/* Preorder Info */
.b2b-preorder-badge {
    background: #f39c12;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0274be;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .b2b-availability-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .b2b-tier-row {
        font-size: 13px;
        padding: 6px 0;
    }
    
    .quantity input[type="number"] {
        width: 70px;
        padding: 6px 10px;
    }
}

/* Legacy Table Styles (for backward compatibility) */
.b2b-tier-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.b2b-tier-table th,
.b2b-tier-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.b2b-tier-table th {
    background: #0274be;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}

.b2b-tier-table tbody tr {
    transition: background-color 0.3s ease;
}

.b2b-tier-table tbody tr:hover {
    background: #f8fbff;
}

.b2b-tier-table tbody tr.hover {
    background: #e8f4fd;
}

.b2b-tier-table th,
.b2b-tier-table td {
    padding: 12px 15px;
}

/**
 * B2B Tier Pricing & Preorder Plugin Styles - Flatsome Compatible
 */

/* Flatsome-styled Tier Pricing */
.b2b-tier-pricing-flatsome {
    margin: 30px 0;
    padding: 0;
}

.b2b-tier-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.b2b-tier-header h4 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
}

.b2b-tier-header p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Tier Cards with Flatsome styling */
.b2b-tier-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.b2b-tier-card:hover {
    border-color: #0274be;
    box-shadow: 0 5px 20px rgba(2, 116, 190, 0.15);
    transform: translateY(-2px);
}

.b2b-tier-card.selected {
    border-color: #0274be;
    background: #f8fcff;
    box-shadow: 0 5px 20px rgba(2, 116, 190, 0.2);
}

.b2b-tier-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.b2b-qty-badge {
    background: #0274be;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b2b-savings-badge {
    background: #ff6b35;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.b2b-tier-price-display {
    margin: 20px 0;
}

.b2b-price-amount {
    font-size: 2em;
    font-weight: 700;
    color: #0274be;
    display: block;
    line-height: 1;
}

.b2b-price-unit {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    display: block;
}

.b2b-delivery-info {
    margin: 15px 0;
    min-height: 60px;
}

.b2b-delivery-option {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
}

.b2b-delivery-option.in-stock {
    background: #e8f5e8;
    color: #2d5016;
    border: 1px solid #c3e6c3;
}

.b2b-delivery-option.preorder {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.b2b-delivery-option i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Flatsome button styling */
.b2b-select-tier {
    width: 100%;
    margin-top: 15px;
    padding: 12px 20px;
    background: #0274be;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.b2b-select-tier:hover {
    background: #025a9c;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(2, 116, 190, 0.3);
}

.b2b-select-tier:active {
    transform: translateY(0);
}

/* Active tier display */
.b2b-active-tier {
    background: #f8fcff;
    border: 2px solid #0274be;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    animation: slideIn 0.3s ease;
}

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

.b2b-active-tier h5 {
    margin: 0 0 15px 0;
    color: #0274be;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b2b-active-tier-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.b2b-active-detail {
    background: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
    font-size: 0.9em;
}

.b2b-active-detail strong {
    color: #0274be;
    display: block;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

/* Legacy tier pricing styles for backward compatibility */
.b2b-tier-pricing {
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.b2b-tier-pricing h3 {
    font-size: 1.4em;
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.b2b-tier-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.b2b-tier-table thead {
    background: #3498db;
    color: #fff;
}

.b2b-tier-table th,
.b2b-tier-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.b2b-tier-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.b2b-tier-table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

.b2b-tier-table tbody tr:last-child td {
    border-bottom: none;
}

/* Preorder Styles */
.b2b-preorder-info {
    background: #8F9779 !important;
    color: #000000 !important;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(143, 151, 121, 0.3);
    position: relative;
    overflow: hidden;
}

.b2b-preorder-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    opacity: 0;
}

.b2b-preorder-notice {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    color: #000000 !important;
}

.b2b-preorder-icon {
    font-size: 1.5em;
    margin-right: 10px;
    animation: pulse 2s infinite;
    color: #000000 !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.b2b-preorder-notice strong {
    font-size: 1.2em;
    font-weight: 700;
    color: #000000 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.b2b-lead-time {
    margin: 0;
    font-size: 1.1em;
    position: relative;
    z-index: 1;
    color: #000000 !important;
}

.b2b-lead-time strong {
    font-weight: 600;
    text-decoration: underline;
}

/* Shop Page Styles */
.b2b-shop-tier-pricing {
    background: #e8f5e8;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
    border-left: 4px solid #27ae60;
}

.b2b-tier-label {
    font-size: 0.9em;
    color: #27ae60;
    font-weight: 600;
}

.b2b-tier-price {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1em;
}

.b2b-preorder-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #8F9779 !important;
    color: #000000 !important;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(143, 151, 121, 0.4);
}

/* Cart and Checkout Styles */
.b2b-tier-discount {
    color: #27ae60;
    font-weight: 600;
}

.b2b-preorder-cart-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Dynamic Price Update Styles */
.b2b-price-update {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    animation: fadeIn 0.5s ease-in;
}

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

.b2b-savings-highlight {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 5px 0;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .b2b-tier-pricing {
        padding: 15px;
        margin: 15px 0;
    }
    
    .b2b-tier-table {
        font-size: 0.9em;
    }
    
    .b2b-tier-table th,
    .b2b-tier-table td {
        padding: 8px 10px;
    }
    
    .b2b-preorder-info {
        padding: 15px;
        margin: 15px 0;
    }
    
    .b2b-preorder-notice {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .b2b-preorder-icon {
        margin-bottom: 5px;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .b2b-tier-table {
        font-size: 0.8em;
    }
    
    .b2b-tier-table th,
    .b2b-tier-table td {
        padding: 6px 8px;
    }
    
    .b2b-tier-pricing h3 {
        font-size: 1.2em;
    }
    
    .b2b-preorder-badge {
        font-size: 0.7em;
        padding: 3px 6px;
    }
}

/* Admin Styles */
.b2b-tier-pricing-group .widefat {
    margin-top: 10px;
}

.b2b-tier-pricing-group input[type="number"] {
    width: 100%;
    max-width: 120px;
}

.b2b-tier-pricing-group .button {
    margin-top: 10px;
}

/* Loading States */
.b2b-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.b2b-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3498db;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility Improvements */
.b2b-tier-pricing:focus-within,
.b2b-preorder-info:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.b2b-tier-table th {
    position: relative;
}

.b2b-tier-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

/* Print Styles */
@media print {
    .b2b-tier-pricing,
    .b2b-preorder-info {
        background: #fff !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        color: #000 !important;
    }
    
    .b2b-preorder-badge {
        background: #000 !important;
        color: #fff !important;
    }
}

/* ------------------------------------------------------------------
   PDP header alignment fixes
   Ensure the "Tier pricing" header aligns left like other product info
------------------------------------------------------------------- */
.b2b-tier-pricing-simple .b2b-tier-header {
    text-align: left !important;
    margin-bottom: 10px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.b2b-tier-pricing-simple .b2b-tier-header h4 {
    display: inline-block;
    margin: 0;
    padding: 0;
}

/* ------------------------------------------------------------------
   Brand overrides (colors + alignment)
   Uses site's CSS variables if present; defines defaults here too
------------------------------------------------------------------- */
:root {
  --b2b-primary: #B7C5BC;
  --b2b-secondary: #E2C9A7;
}

/* Buttons */
.single_add_to_cart_button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--b2b-primary) !important;
  border-color: var(--b2b-primary) !important;
  color: #122 !important;
  transition: all 0.3s ease;
}
.single_add_to_cart_button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--b2b-primary-dark) !important;
  border-color: var(--b2b-primary-dark) !important;
}

/* Mixed order button states */
.single_add_to_cart_button[data-order-type="mixed"] {
  background: linear-gradient(45deg, #28a745, #ffc107) !important;
  color: white !important;
}

.single_add_to_cart_button[data-order-type="preorder"] {
  background: #ffc107 !important;
  border-color: #ffc107 !important;
  color: #212529 !important;
}

.single_add_to_cart_button:disabled {
  background: #6c757d !important;
  border-color: #6c757d !important;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Shop tier snippet */
.b2b-shop-tier-pricing {
  background: #e8f0eb !important;
  border-left-color: #B7C5BC !important;
}

/* Selected tier highlight - Enhanced tier highlighting styles */
.b2b-tier-row.selected,
.b2b-tier-row.active,
.b2b-tier-row.selected.active,
.b2b-tier-card.selected,
.b2b-tier-card.active,
.b2b-tier-card.selected.active {
  background: #d4e8d4 !important;
  border-color: #B7C5BC !important;
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(183, 197, 188, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.b2b-tier-row.selected td,
.b2b-tier-row.active td,
.b2b-tier-row.selected.active td,
.b2b-tier-card.selected .tier-price,
.b2b-tier-card.active .tier-price,
.b2b-tier-card.selected .tier-quantity,
.b2b-tier-card.active .tier-quantity,
.b2b-tier-card.selected .tier-savings,
.b2b-tier-card.active .tier-savings,
.b2b-tier-row.selected span,
.b2b-tier-row.active span,
.b2b-tier-row.selected.active span {
  color: #000000 !important;
  font-weight: 600;
}

/* Override removed - handled by combined selector above */

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 193, 7, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 193, 7, 0.8); }
}

/* Stock Management Styles */
.b2b-stock-quantity-selectors {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin: 15px 0;
}

.b2b-stock-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.b2b-ready-to-buy,
.b2b-preorder {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
}

.b2b-ready-to-buy {
  border-left: 4px solid #28a745;
}

.b2b-preorder {
  border-left: 4px solid #ffc107;
}

.b2b-ready-to-buy label,
.b2b-preorder label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #495057;
}

.b2b-ready-to-buy input,
.b2b-preorder input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
}

.b2b-stock-available,
.b2b-preorder-info {
  display: block;
  font-size: 12px;
  color: #6c757d;
  margin-top: 5px;
}

.b2b-fill-max-stock {
  background: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 8px;
  cursor: pointer;
}

.b2b-fill-max-stock:hover {
  background: #0056b3;
}

.b2b-pricing-breakdown {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
}

.b2b-ready-pricing,
.b2b-preorder-pricing,
.b2b-total-pricing {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f4;
}

.b2b-total-pricing {
  border-bottom: none;
  border-top: 2px solid #dee2e6;
  font-weight: 600;
  font-size: 16px;
}

.b2b-ready-pricing .price {
  color: #28a745;
  font-weight: 600;
}

.b2b-preorder-pricing .price {
  color: #ffc107;
  font-weight: 600;
}

.b2b-total-pricing .price {
  color: #007bff;
  font-weight: 700;
}

@media (max-width: 768px) {
  .b2b-stock-info {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* Enhanced tier card highlighting */
.b2b-tier-card.selected,
.b2b-tier-card.active {
  border-color: #B7C5BC !important;
  background: #d4e8d4 !important;
  box-shadow: 0 5px 20px rgba(183, 197, 188, 0.3) !important;
  transform: translateY(-3px) scale(1.02);
  transition: all 0.3s ease;
}

/* Enhanced table row highlighting */
.b2b-tier-table tbody tr.selected,
.b2b-tier-table tbody tr.active {
  background: #d4e8d4 !important;
  border-left: 4px solid #B7C5BC !important;
  font-weight: 600 !important;
  color: #000000 !important;
}

.b2b-tier-table tbody tr.selected td,
.b2b-tier-table tbody tr.active td {
  color: #000000 !important;
}

/* Stock badge */
.b2b-stock-qty {
  background: #e8f0eb !important;
  color: #2c3e3a !important;
  border-color: #c8dace !important;
}

/* Ensure product info blocks align left consistently */
.product-info, .entry-summary, .b2b-tier-pricing-simple, .b2b-tier-list {
  text-align: left !important;
}
