/* SAT Commerce - integración visual con WCFM */
.sat-commerce-wcfm-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    clear: both;
    width: 100%;
    box-sizing: border-box;
    margin: 22px 0 16px;
    padding: 14px 16px;
    border: 1px solid #dfe6ea;
    border-radius: 8px;
    background: #f8fafb;
}
.sat-commerce-wcfm-heading .sat-commerce-wcfm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #17a2b8;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
}
.sat-commerce-wcfm-heading h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: #18313d !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}
.sat-commerce-wcfm-heading p {
    margin: 3px 0 0 !important;
    color: #667780;
    font-size: 12px;
    line-height: 1.4;
}

/* Forzamos los campos de SAT Commerce a ocupar una fila completa. */
#wcfm_products_manage_form label[for="sat_product_condition"],
#wcfm_products_manage_form label[for="sat_product_installment_mode"],
#wcfm_products_manage_form label[for="sat_product_custom_installments"],
#wcfm_products_manage_form label[for="sat_product_warranty"],
form#wcfm_products_manage_form .sat-commerce-label {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    text-align: left !important;
    box-sizing: border-box;
    color: #263b45;
    font-weight: 600;
}

#wcfm_products_manage_form #sat_product_condition,
#wcfm_products_manage_form #sat_product_installment_mode,
#wcfm_products_manage_form #sat_product_custom_installments,
#wcfm_products_manage_form #sat_product_warranty,
form#wcfm_products_manage_form .sat-commerce-control {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 15px !important;
    box-sizing: border-box !important;
}

#wcfm_products_manage_form #sat_product_condition,
#wcfm_products_manage_form #sat_product_installment_mode,
#wcfm_products_manage_form #sat_product_custom_installments {
    min-height: 40px;
}

#wcfm_products_manage_form #sat_product_warranty {
    min-height: 76px;
    resize: vertical;
}

/* Los contenedores inmediatos también deben limpiar floats de WCFM. */
#wcfm_products_manage_form p:has(#sat_product_condition),
#wcfm_products_manage_form p:has(#sat_product_installment_mode),
#wcfm_products_manage_form p:has(#sat_product_custom_installments),
#wcfm_products_manage_form p:has(#sat_product_warranty) {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.sat-commerce-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .sat-commerce-wcfm-heading {
        padding: 12px;
        align-items: flex-start;
    }
}

/* ===== Visualización pública ===== */
.sat-commerce-loop-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 7px 0 4px;
    line-height: 1.2;
}
.sat-commerce-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 4px 7px;
    border: 1px solid #dde5e9;
    border-radius: 999px;
    background: #f7f9fa;
    color: #263b45;
    font-size: 11px;
    font-weight: 700;
    white-space: normal;
}
.sat-commerce-badge.sat-installments {
    border-color: #bfe3d9;
    background: #effaf6;
    color: #176b55;
}
.sat-commerce-badge.sat-condition {
    border-color: #d9e2f2;
    background: #f3f6fb;
    color: #334f78;
}
.sat-commerce-single-box {
    clear: both;
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid #e0e6e9;
    border-radius: 10px;
    background: #fafcfc;
}
.sat-commerce-single-box h3 {
    margin: 0 0 10px !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    color: #203640;
}
.sat-commerce-single-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}
.sat-commerce-single-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    color: #3d5059;
    font-size: 13px;
    line-height: 1.4;
}
.sat-commerce-single-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    background: #e9f5f2;
    color: #16745e;
    font-size: 12px;
    font-weight: 800;
}
@media (max-width: 600px) {
    .sat-commerce-single-grid { grid-template-columns: 1fr; }
    .sat-commerce-badge { font-size: 10px; padding: 4px 6px; }
}
