/**
 * ShopNFood Price Manager - Styles B2B
 */

/* === Message connexion requise === */
.shopnfood-price-hidden {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    text-align: center;
}

.shopnfood-login-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
}

.shopnfood-login-link:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.shopnfood-login-link .dashicons {
    font-size: 18px;
}

/* === Message compte en attente === */
.shopnfood-price-pending {
    padding: 15px 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shopnfood-price-pending .dashicons {
    font-size: 18px;
}

/* === Prix B2B === */
.shopnfood-b2b-price {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.shopnfood-price-carton,
.shopnfood-price-half-palette,
.shopnfood-price-palette {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.shopnfood-price-carton:last-child,
.shopnfood-price-half-palette:last-child,
.shopnfood-price-palette:last-child {
    border-bottom: none;
}

.shopnfood-price-label {
    font-weight: 600;
    color: #495057;
    min-width: 100px;
}

.shopnfood-price-amount {
    font-size: 1.4em;
    font-weight: 700;
    color: #28a745;
}

.shopnfood-price-amount small {
    font-size: 0.6em;
    font-weight: 400;
    color: #6c757d;
    margin-left: 2px;
}

.shopnfood-price-unit {
    font-size: 0.85em;
    color: #6c757d;
    width: 100%;
    padding-left: 110px;
}

.shopnfood-price-category {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dee2e6;
    text-align: right;
}

.shopnfood-price-category small {
    color: #6c757d;
    font-style: italic;
}

/* === Prix indisponible === */
.shopnfood-price-unavailable {
    color: #dc3545;
    font-style: italic;
}

/* === Admin price indicator === */
.shopnfood-admin-price small {
    display: block;
    color: #6c757d;
    font-size: 0.8em;
    margin-top: 5px;
}

/* === Notice de connexion sur page produit === */
.shopnfood-login-notice {
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
}

.shopnfood-login-notice p {
    margin: 0 0 15px;
    color: #495057;
}

.shopnfood-login-notice p:first-child {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.shopnfood-login-notice .button {
    background-color: #667eea;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shopnfood-login-notice .button:hover {
    background-color: #5a6fd6;
    color: #fff;
}

/* === Informations produit B2B === */
.shopnfood-product-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.shopnfood-product-info h4 {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    color: #343a40;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shopnfood-info-table {
    width: 100%;
    border-collapse: collapse;
}

.shopnfood-info-table th,
.shopnfood-info-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9em;
}

.shopnfood-info-table th {
    width: 40%;
    color: #6c757d;
    font-weight: 500;
}

.shopnfood-info-table td {
    color: #343a40;
}

.shopnfood-info-table tr:last-child th,
.shopnfood-info-table tr:last-child td {
    border-bottom: none;
}

/* === Badges produit (NEW, etc.) === */
.shopnfood-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shopnfood-badge-new {
    background-color: #28a745;
    color: #fff;
}

.shopnfood-badge-promo {
    background-color: #dc3545;
    color: #fff;
}

.shopnfood-badge-limited {
    background-color: #ffc107;
    color: #212529;
}

/* === Responsive === */
@media (max-width: 768px) {
    .shopnfood-price-carton,
    .shopnfood-price-half-palette,
    .shopnfood-price-palette {
        flex-direction: column;
        gap: 5px;
    }
    
    .shopnfood-price-unit {
        padding-left: 0;
    }
    
    .shopnfood-info-table th,
    .shopnfood-info-table td {
        display: block;
        width: 100%;
    }
    
    .shopnfood-info-table th {
        border-bottom: none;
        padding-bottom: 2px;
    }
    
    .shopnfood-info-table td {
        padding-top: 2px;
    }
}

/* === Dans la boucle produits (shop) === */
.woocommerce ul.products li.product .shopnfood-price-hidden,
.woocommerce ul.products li.product .shopnfood-price-pending {
    padding: 10px;
    font-size: 0.85em;
}

.woocommerce ul.products li.product .shopnfood-b2b-price {
    padding: 10px;
}

.woocommerce ul.products li.product .shopnfood-price-amount {
    font-size: 1.1em;
}

.woocommerce ul.products li.product .shopnfood-price-unit,
.woocommerce ul.products li.product .shopnfood-price-half-palette,
.woocommerce ul.products li.product .shopnfood-price-palette,
.woocommerce ul.products li.product .shopnfood-price-category {
    display: none;
}

/* === Panier === */
.woocommerce-cart-form .shopnfood-price-amount small,
.woocommerce-checkout .shopnfood-price-amount small {
    font-size: 0.8em;
}
