.efpm-calculator {
    margin: 20px 0;
}

.efpm-calculator.efpm-standalone {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.efpm-calculator.efpm-integrated {
    background: transparent;
    border: none;
    padding: 0;
    margin: 15px 0;
}

.efpm-calculator-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.efpm-input-wrapper {
    margin-bottom: 15px;
}

.efpm-input-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.efpm-calculator.efpm-integrated .efpm-input-wrapper label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.efpm-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.efpm-qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.efpm-qty-btn:hover {
    background: #f8f9fa;
    border-color: #2271b1;
    color: #2271b1;
}

.efpm-qty-btn:active {
    transform: scale(0.95);
}

.efpm-quantity-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    max-width: 120px;
    text-align: center;
}

.efpm-calculator.efpm-integrated .efpm-quantity-input {
    border: 1.5px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
}

.efpm-quantity-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.efpm-unit-display {
    font-weight: 600;
    font-size: 14px;
    color: #666;
    min-width: 40px;
}

.efpm-info-line {
    margin: 15px 0;
    padding: 12px 15px;
    background: #f8f9fa;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.efpm-calculator.efpm-integrated .efpm-info-line {
    background: rgba(255, 107, 0, 0.08);
    border-left-color: #ff6b00;
}

.efpm-info-line strong {
    color: #2271b1;
}

.efpm-calculator.efpm-integrated .efpm-info-line strong {
    color: #ff6b00;
}

.efpm-unit-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.efpm-cart-unit {
    font-size: 0.85em;
    color: #666;
    margin-left: 3px;
}

.efpm-cart-info {
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.efpm-order-summary {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
}

.efpm-order-summary strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.efpm-order-summary ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
    font-size: 0.9em;
    color: #666;
}

.efpm-order-summary ul li {
    margin-bottom: 3px;
}

@media (max-width: 768px) {
    .efpm-calculator.efpm-standalone {
        padding: 15px;
    }
    
    .efpm-calculator-title {
        font-size: 16px;
    }
    
    .efpm-quantity-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .efpm-summary {
        padding: 15px;
    }
    
    .efpm-summary-row {
        font-size: 13px;
    }
    
    .efpm-summary-total .efpm-summary-value {
        font-size: 16px;
    }
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Layout M2 - Style compatible EFPB */
.m2ListingPage {
    margin-left: 5px;
    vertical-align: middle;
    position: relative;
    top: 5px;
}

.product-summary .cart .m2ListingPage {
    margin-left: 0px !important;
    vertical-align: middle !important;
}

.m2DynamicChangedOnQty {
    margin-bottom: 15px;
}

/* Nouvelle structure pour EFPB */
.efpm-pack-info {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

.efpm-pack-info b {
    color: #2271b1;
}

.efpm-pack-info #paquets_qty,
.efpm-pack-info #paquets_total {
    color: #2271b1;
}

.efpm-summary-line {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.efpm-unit-display {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.efpm-total-price {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.efpm-total-price .replaceTotalPrice {
    color: #2271b1;
}

/* Anciens styles pour compatibilité */
.nomber-de-paquet {
    margin-bottom: 10px;
}

.totalPriceHtml {
    font-size: 16px;
    margin-top: 5px;
}

.totalPriceHtml .replaceTotalPrice {
    font-weight: bold;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .efpm-pack-info {
        font-size: 14px;
    }
    
    .efpm-summary-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .efpm-total-price {
        font-size: 16px;
    }
}

/* Styles pour l'affichage dans le panier */
.efpm-cart-quantity-display {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-weight: 500;
}

.efpm-cart-quantity-display .efpm-unit {
    font-size: 0.9em;
    color: #666;
}

.efpm-cart-price-display {
    display: inline-block;
}

.efpm-cart-price-display .efpm-box-count {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

/* Styles pour la quantity box dans le panier */
.product-quantity .quantity.buttons_added {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.product-quantity .efpm-cart-unit-label {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.9em;
    color: #666;
    vertical-align: middle;
}

.product-quantity .quantity .input-text.qty {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.product-quantity .quantity .button {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.product-quantity .quantity .button:hover {
    background: #f8f9fa;
    border-color: #2271b1;
}
